diff options
Diffstat (limited to 'drivers/net/wireless/wl12xx/wl1271.h')
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1271.h | 34 |
1 files changed, 30 insertions, 4 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1271.h b/drivers/net/wireless/wl12xx/wl1271.h index d0938db043b3..97ea5096bc8c 100644 --- a/drivers/net/wireless/wl12xx/wl1271.h +++ b/drivers/net/wireless/wl12xx/wl1271.h | |||
@@ -43,7 +43,7 @@ enum { | |||
43 | DEBUG_SPI = BIT(1), | 43 | DEBUG_SPI = BIT(1), |
44 | DEBUG_BOOT = BIT(2), | 44 | DEBUG_BOOT = BIT(2), |
45 | DEBUG_MAILBOX = BIT(3), | 45 | DEBUG_MAILBOX = BIT(3), |
46 | DEBUG_NETLINK = BIT(4), | 46 | DEBUG_TESTMODE = BIT(4), |
47 | DEBUG_EVENT = BIT(5), | 47 | DEBUG_EVENT = BIT(5), |
48 | DEBUG_TX = BIT(6), | 48 | DEBUG_TX = BIT(6), |
49 | DEBUG_RX = BIT(7), | 49 | DEBUG_RX = BIT(7), |
@@ -109,7 +109,33 @@ enum { | |||
109 | 109 | ||
110 | #define WL1271_FW_NAME "wl1271-fw.bin" | 110 | #define WL1271_FW_NAME "wl1271-fw.bin" |
111 | #define WL1271_NVS_NAME "wl1271-nvs.bin" | 111 | #define WL1271_NVS_NAME "wl1271-nvs.bin" |
112 | #define WL1271_NVS_LEN 468 | 112 | |
113 | /* NVS data structure */ | ||
114 | #define WL1271_NVS_SECTION_SIZE 468 | ||
115 | |||
116 | #define WL1271_NVS_GENERAL_PARAMS_SIZE 57 | ||
117 | #define WL1271_NVS_GENERAL_PARAMS_SIZE_PADDED \ | ||
118 | (WL1271_NVS_GENERAL_PARAMS_SIZE + 1) | ||
119 | #define WL1271_NVS_STAT_RADIO_PARAMS_SIZE 17 | ||
120 | #define WL1271_NVS_STAT_RADIO_PARAMS_SIZE_PADDED \ | ||
121 | (WL1271_NVS_STAT_RADIO_PARAMS_SIZE + 1) | ||
122 | #define WL1271_NVS_DYN_RADIO_PARAMS_SIZE 65 | ||
123 | #define WL1271_NVS_DYN_RADIO_PARAMS_SIZE_PADDED \ | ||
124 | (WL1271_NVS_DYN_RADIO_PARAMS_SIZE + 1) | ||
125 | #define WL1271_NVS_FEM_COUNT 2 | ||
126 | #define WL1271_NVS_INI_SPARE_SIZE 124 | ||
127 | |||
128 | struct wl1271_nvs_file { | ||
129 | /* NVS section */ | ||
130 | u8 nvs[WL1271_NVS_SECTION_SIZE]; | ||
131 | |||
132 | /* INI section */ | ||
133 | u8 general_params[WL1271_NVS_GENERAL_PARAMS_SIZE_PADDED]; | ||
134 | u8 stat_radio_params[WL1271_NVS_STAT_RADIO_PARAMS_SIZE_PADDED]; | ||
135 | u8 dyn_radio_params[WL1271_NVS_FEM_COUNT] | ||
136 | [WL1271_NVS_DYN_RADIO_PARAMS_SIZE_PADDED]; | ||
137 | u8 ini_spare[WL1271_NVS_INI_SPARE_SIZE]; | ||
138 | } __attribute__ ((packed)); | ||
113 | 139 | ||
114 | /* | 140 | /* |
115 | * Enable/disable 802.11a support for WL1273 | 141 | * Enable/disable 802.11a support for WL1273 |
@@ -342,8 +368,7 @@ struct wl1271 { | |||
342 | 368 | ||
343 | u8 *fw; | 369 | u8 *fw; |
344 | size_t fw_len; | 370 | size_t fw_len; |
345 | u8 *nvs; | 371 | struct wl1271_nvs_file *nvs; |
346 | size_t nvs_len; | ||
347 | 372 | ||
348 | u8 bssid[ETH_ALEN]; | 373 | u8 bssid[ETH_ALEN]; |
349 | u8 mac_addr[ETH_ALEN]; | 374 | u8 mac_addr[ETH_ALEN]; |
@@ -461,6 +486,7 @@ int wl1271_plt_stop(struct wl1271 *wl); | |||
461 | 486 | ||
462 | static inline bool wl1271_11a_enabled(void) | 487 | static inline bool wl1271_11a_enabled(void) |
463 | { | 488 | { |
489 | /* FIXME: this could be determined based on the NVS-INI file */ | ||
464 | #ifdef WL1271_80211A_ENABLED | 490 | #ifdef WL1271_80211A_ENABLED |
465 | return true; | 491 | return true; |
466 | #else | 492 | #else |