tuxsavvy / agere_fw_utils (public) (License: Dual BSD 3-clause and GPLv2) (since 2021-02-07) (hash sha1)
Personal fork of https://repo.or.cz/agere_fw_utils.git
List of commits:
Subject Hash Author Date (UTC)
Use C99 types 11362c209f9ec7369931b9a25a407c21476c48e4 David Kilroy 2008-10-26 14:30:03
hfwget refactorring posted as hfwget2 April 2008 9b77acdf3330592acda5261d282c579cc1497637 David Kilroy 2008-10-26 14:27:32
dump_fw and hfwget posted Sep 2007 77d205076542510222c6e8359bb2647b0d4e0873 David Kilroy 2008-10-26 14:22:02
Add hfwget.c from hermesap-0.2 9239c21487b524cf0f87b4ffa4828793713fbecd David Kilroy 2008-10-26 14:20:38
dump_fw posted June 2007 617a0ae960430d0d93a533ac5dffc7b9c07a777a David Kilroy 2008-10-26 14:19:45
Commit 11362c209f9ec7369931b9a25a407c21476c48e4 - Use C99 types
Author: David Kilroy
Author date (UTC): 2008-10-26 14:30
Committer name: David Kilroy
Committer date (UTC): 2008-10-26 14:30
Parent(s): 9b77acdf3330592acda5261d282c579cc1497637
Signer:
Signing key:
Signing status: N
Tree: 76a6f1c716959766d6812b5dc7f7fa0ad644811a
File Lines added Lines deleted
dump_fw.c 23 21
File dump_fw.c changed (mode: 100644) (index 65c74a4..561dd2a)
54 54 */ */
55 55
56 56 #include <stdio.h> #include <stdio.h>
57 #include <stdint.h>
57 58 #include <stdlib.h> #include <stdlib.h>
58 59 #include <string.h> #include <string.h>
59 60 #include "dhf.h" #include "dhf.h"
60 61
61 #define AP_SUFFIX "_ap.fw"
62 #define STA_SUFFIX "_sta.fw"
62 #define AP_SUFFIX "_ap_fw.bin"
63 #define STA_SUFFIX "_sta_fw.bin"
63 64 #define VERSION "HFW000" #define VERSION "HFW000"
64 65
65 66 /* 0xAABB to 0xBBAA */ /* 0xAABB to 0xBBAA */
 
89 90 int host_bytes_in_word_be = 0; int host_bytes_in_word_be = 0;
90 91 int host_words_in_dword_be = 0; int host_words_in_dword_be = 0;
91 92
92 #define host_to_le16(value) \
93 host_bytes_in_word_be ? swap_bytes_16(value) : (value);
94 #define host_to_le32(value) \
95 host_words_in_dword_be ? \
96 (host_bytes_in_word_be ? reverse_bytes_32(value) \
97 : swap_bytes_32(value)) : \
98 (host_bytes_in_word_be ? swap_words_32(value) : (value));
99
100 #define le16_to_host(value) \
101 host_bytes_in_word_be ? swap_bytes_16(value) : (value);
102 #define le32_to_host(value) \
103 host_words_in_dword_be ? \
104 (host_bytes_in_word_be ? reverse_bytes_32(value) \
105 : swap_bytes_32(value)) : \
106 (host_bytes_in_word_be ? swap_words_32(value) : (value));
107
108 typedef unsigned int u32;
109 typedef unsigned short u16;
110 typedef unsigned char u8;
93 #define host_to_le16(value) \
94 (host_bytes_in_word_be ? swap_bytes_16(value) : (value))
95 #define host_to_le32(value) \
96 (host_words_in_dword_be ? \
97 (host_bytes_in_word_be ? reverse_bytes_32(value) \
98 : swap_bytes_32(value)) : \
99 (host_bytes_in_word_be ? swap_words_32(value) : (value)))
100
101 #define le16_to_host(value) \
102 (host_bytes_in_word_be ? swap_bytes_16(value) : (value))
103 #define le32_to_host(value) \
104 (host_words_in_dword_be ? \
105 (host_bytes_in_word_be ? reverse_bytes_32(value) \
106 : swap_bytes_32(value)) : \
107 (host_bytes_in_word_be ? swap_words_32(value) : (value)))
108
109 /* Use C99 exact width types */
110 typedef uint32_t u32;
111 typedef uint16_t u16;
112 typedef uint8_t u8;
111 113
112 114 /* Checking endianess at runtime because performance isn't an issue, /* Checking endianess at runtime because performance isn't an issue,
113 115 * and I'd rather not add a configure step since this is slotting into the * and I'd rather not add a configure step since this is slotting into the
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/tuxsavvy/agere_fw_utils

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/tuxsavvy/agere_fw_utils

Clone this repository using git:
git clone git://git.rocketgit.com/user/tuxsavvy/agere_fw_utils

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main