diff options
author | Eliad Peller <eliad@wizery.com> | 2011-08-14 06:17:05 -0400 |
---|---|---|
committer | Luciano Coelho <coelho@ti.com> | 2011-08-22 05:35:23 -0400 |
commit | 4d56ad9cae9e8553176427adc2335f8a7f4556b2 (patch) | |
tree | a3e86714bc8b8136e72c963a1a00815ad7bf5a46 /drivers/net/wireless/wl12xx/wl12xx.h | |
parent | 08c1d1c7042330e2280a7718be4ad88c2e8f8268 (diff) |
wl12xx: update fw status struct
Update the fw status struct according to the new fw api
(fw >= 6/7.0.0.35).
All the roles use the same struct now.
The memory accounting was changed a bit according to
the struct changes.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx/wl12xx.h')
-rw-r--r-- | drivers/net/wireless/wl12xx/wl12xx.h | 55 |
1 files changed, 24 insertions, 31 deletions
diff --git a/drivers/net/wireless/wl12xx/wl12xx.h b/drivers/net/wireless/wl12xx/wl12xx.h index 7707895120be..f708cd70185a 100644 --- a/drivers/net/wireless/wl12xx/wl12xx.h +++ b/drivers/net/wireless/wl12xx/wl12xx.h | |||
@@ -137,6 +137,7 @@ extern u32 wl12xx_debug_level; | |||
137 | #define WL1271_DEFAULT_BEACON_INT 100 | 137 | #define WL1271_DEFAULT_BEACON_INT 100 |
138 | #define WL1271_DEFAULT_DTIM_PERIOD 1 | 138 | #define WL1271_DEFAULT_DTIM_PERIOD 1 |
139 | 139 | ||
140 | #define WL12XX_MAX_LINKS 8 | ||
140 | #define WL1271_AP_GLOBAL_HLID 0 | 141 | #define WL1271_AP_GLOBAL_HLID 0 |
141 | #define WL1271_AP_BROADCAST_HLID 1 | 142 | #define WL1271_AP_BROADCAST_HLID 1 |
142 | #define WL1271_AP_STA_HLID_START 2 | 143 | #define WL1271_AP_STA_HLID_START 2 |
@@ -230,23 +231,15 @@ struct wl1271_stats { | |||
230 | /* Broadcast and Global links + links to stations */ | 231 | /* Broadcast and Global links + links to stations */ |
231 | #define AP_MAX_LINKS (AP_MAX_STATIONS + 2) | 232 | #define AP_MAX_LINKS (AP_MAX_STATIONS + 2) |
232 | 233 | ||
233 | /* FW status registers common for AP/STA */ | 234 | /* FW status registers */ |
234 | struct wl1271_fw_common_status { | 235 | struct wl12xx_fw_status { |
235 | __le32 intr; | 236 | __le32 intr; |
236 | u8 fw_rx_counter; | 237 | u8 fw_rx_counter; |
237 | u8 drv_rx_counter; | 238 | u8 drv_rx_counter; |
238 | u8 reserved; | 239 | u8 reserved; |
239 | u8 tx_results_counter; | 240 | u8 tx_results_counter; |
240 | __le32 rx_pkt_descs[NUM_RX_PKT_DESC]; | 241 | __le32 rx_pkt_descs[NUM_RX_PKT_DESC]; |
241 | __le32 tx_released_blks[NUM_TX_QUEUES]; | ||
242 | __le32 fw_localtime; | 242 | __le32 fw_localtime; |
243 | } __packed; | ||
244 | |||
245 | /* FW status registers for AP */ | ||
246 | struct wl1271_fw_ap_status { | ||
247 | struct wl1271_fw_common_status common; | ||
248 | |||
249 | /* Next fields valid only in AP FW */ | ||
250 | 243 | ||
251 | /* | 244 | /* |
252 | * A bitmap (where each bit represents a single HLID) | 245 | * A bitmap (where each bit represents a single HLID) |
@@ -254,29 +247,29 @@ struct wl1271_fw_ap_status { | |||
254 | */ | 247 | */ |
255 | __le32 link_ps_bitmap; | 248 | __le32 link_ps_bitmap; |
256 | 249 | ||
257 | /* Number of freed MBs per HLID */ | 250 | /* |
258 | u8 tx_lnk_free_blks[AP_MAX_LINKS]; | 251 | * A bitmap (where each bit represents a single HLID) to indicate |
259 | u8 padding_1[1]; | 252 | * if the station is in Fast mode |
260 | } __packed; | 253 | */ |
254 | __le32 link_fast_bitmap; | ||
261 | 255 | ||
262 | /* FW status registers for STA */ | 256 | /* Cumulative counter of total released mem blocks since FW-reset */ |
263 | struct wl1271_fw_sta_status { | 257 | __le32 total_released_blks; |
264 | struct wl1271_fw_common_status common; | ||
265 | 258 | ||
266 | u8 tx_total; | 259 | /* Size (in Memory Blocks) of TX pool */ |
267 | u8 reserved1; | 260 | __le32 tx_total; |
268 | __le16 reserved2; | ||
269 | __le32 log_start_addr; | ||
270 | } __packed; | ||
271 | 261 | ||
272 | struct wl1271_fw_full_status { | 262 | /* Cumulative counter of released mem-blocks per AC */ |
273 | union { | 263 | u8 tx_released_blks[NUM_TX_QUEUES]; |
274 | struct wl1271_fw_common_status common; | ||
275 | struct wl1271_fw_sta_status sta; | ||
276 | struct wl1271_fw_ap_status ap; | ||
277 | }; | ||
278 | } __packed; | ||
279 | 264 | ||
265 | /* Cumulative counter of freed MBs per HLID */ | ||
266 | u8 tx_lnk_free_blks[WL12XX_MAX_LINKS]; | ||
267 | |||
268 | /* Cumulative counter of released Voice memory blocks */ | ||
269 | u8 tx_voice_released_blks; | ||
270 | u8 padding_1[7]; | ||
271 | __le32 log_start_addr; | ||
272 | } __packed; | ||
280 | 273 | ||
281 | struct wl1271_rx_mem_pool_addr { | 274 | struct wl1271_rx_mem_pool_addr { |
282 | u32 addr; | 275 | u32 addr; |
@@ -401,7 +394,7 @@ struct wl1271 { | |||
401 | struct wl1271_acx_mem_map *target_mem_map; | 394 | struct wl1271_acx_mem_map *target_mem_map; |
402 | 395 | ||
403 | /* Accounting for allocated / available TX blocks on HW */ | 396 | /* Accounting for allocated / available TX blocks on HW */ |
404 | u32 tx_blocks_freed[NUM_TX_QUEUES]; | 397 | u32 tx_blocks_freed; |
405 | u32 tx_blocks_available; | 398 | u32 tx_blocks_available; |
406 | u32 tx_allocated_blocks; | 399 | u32 tx_allocated_blocks; |
407 | u32 tx_results_count; | 400 | u32 tx_results_count; |
@@ -537,7 +530,7 @@ struct wl1271 { | |||
537 | u32 buffer_cmd; | 530 | u32 buffer_cmd; |
538 | u32 buffer_busyword[WL1271_BUSY_WORD_CNT]; | 531 | u32 buffer_busyword[WL1271_BUSY_WORD_CNT]; |
539 | 532 | ||
540 | struct wl1271_fw_full_status *fw_status; | 533 | struct wl12xx_fw_status *fw_status; |
541 | struct wl1271_tx_hw_res_if *tx_res_if; | 534 | struct wl1271_tx_hw_res_if *tx_res_if; |
542 | 535 | ||
543 | struct ieee80211_vif *vif; | 536 | struct ieee80211_vif *vif; |