aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-fw-file.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-03-09 03:16:35 -0500
committerWey-Yi Guy <wey-yi.w.guy@intel.com>2012-04-16 17:34:44 -0400
commit0479c19d9fd29eceb21111a3fe4a4a00b3037cf5 (patch)
tree4278582c681983d2aea5d39be6e8d1d60746d805 /drivers/net/wireless/iwlwifi/iwl-fw-file.h
parent84965795b2908f2e0be929e71b5bf3b7c6ad5329 (diff)
iwlwifi: remove uCode alternatives mechanism
We've never released firmware using the alternatives mechanism and our build process makes that difficult anyway. This means that in every file we have ever built (except maybe by hand for testing) the listed alternative was 0. Make the alternative field in the TLVs part of the TLV number (thus expanding that to 32 bits); this gives us more TLV numbers (not really needed) and more importantly protects against rogue firmware files that actually do use the alternatives mechanism -- those will now be rejected since they don't contain any valid TLVs. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-fw-file.h')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-fw-file.h15
1 files changed, 3 insertions, 12 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-fw-file.h b/drivers/net/wireless/iwlwifi/iwl-fw-file.h
index c924ccb93c8c..e71564053e7f 100644
--- a/drivers/net/wireless/iwlwifi/iwl-fw-file.h
+++ b/drivers/net/wireless/iwlwifi/iwl-fw-file.h
@@ -93,15 +93,7 @@ struct iwl_ucode_header {
93 * new TLV uCode file layout 93 * new TLV uCode file layout
94 * 94 *
95 * The new TLV file format contains TLVs, that each specify 95 * The new TLV file format contains TLVs, that each specify
96 * some piece of data. To facilitate "groups", for example 96 * some piece of data.
97 * different instruction image with different capabilities,
98 * bundled with the same init image, an alternative mechanism
99 * is provided:
100 * When the alternative field is 0, that means that the item
101 * is always valid. When it is non-zero, then it is only
102 * valid in conjunction with items of the same alternative,
103 * in which case the driver (user) selects one alternative
104 * to use.
105 */ 97 */
106 98
107enum iwl_ucode_tlv_type { 99enum iwl_ucode_tlv_type {
@@ -132,8 +124,7 @@ enum iwl_ucode_tlv_type {
132}; 124};
133 125
134struct iwl_ucode_tlv { 126struct iwl_ucode_tlv {
135 __le16 type; /* see above */ 127 __le32 type; /* see above */
136 __le16 alternative; /* see comment */
137 __le32 length; /* not including type/length fields */ 128 __le32 length; /* not including type/length fields */
138 u8 data[0]; 129 u8 data[0];
139}; 130};
@@ -152,7 +143,7 @@ struct iwl_tlv_ucode_header {
152 u8 human_readable[64]; 143 u8 human_readable[64];
153 __le32 ver; /* major/minor/API/serial */ 144 __le32 ver; /* major/minor/API/serial */
154 __le32 build; 145 __le32 build;
155 __le64 alternatives; /* bitmask of valid alternatives */ 146 __le64 ignore;
156 /* 147 /*
157 * The data contained herein has a TLV layout, 148 * The data contained herein has a TLV layout,
158 * see above for the TLV header and types. 149 * see above for the TLV header and types.