diff options
author | Levi, Shahar <shahar_levi@ti.com> | 2011-01-23 01:27:22 -0500 |
---|---|---|
committer | Luciano Coelho <coelho@ti.com> | 2011-01-24 15:58:20 -0500 |
commit | 4b7fac77b4c1badac84df3dcbdf07199d94cb1c3 (patch) | |
tree | 5296c389602351400fae7986d456e16442b8010d /drivers/net/wireless/wl12xx/init.c | |
parent | 6c89b7b2f856a2b67f53313ddfa3af4ab52bae28 (diff) |
wl12xx: BA initiator support
Add 80211n BA initiator session support wl1271 driver.
Include BA supported FW version auto detection mechanism.
BA initiator session management included in FW independently.
Signed-off-by: Shahar Levi <shahar_levi@ti.com>
Reviewed-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx/init.c')
-rw-r--r-- | drivers/net/wireless/wl12xx/init.c | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/drivers/net/wireless/wl12xx/init.c b/drivers/net/wireless/wl12xx/init.c index bdb61232f80c..2348eadc0de1 100644 --- a/drivers/net/wireless/wl12xx/init.c +++ b/drivers/net/wireless/wl12xx/init.c | |||
@@ -455,6 +455,43 @@ static int wl1271_ap_hw_init_post_mem(struct wl1271 *wl) | |||
455 | return 0; | 455 | return 0; |
456 | } | 456 | } |
457 | 457 | ||
458 | static void wl1271_check_ba_support(struct wl1271 *wl) | ||
459 | { | ||
460 | /* validate FW cose ver x.x.x.50-60.x */ | ||
461 | if ((wl->chip.fw_ver[3] >= WL12XX_BA_SUPPORT_FW_COST_VER2_START) && | ||
462 | (wl->chip.fw_ver[3] < WL12XX_BA_SUPPORT_FW_COST_VER2_END)) { | ||
463 | wl->ba_support = true; | ||
464 | return; | ||
465 | } | ||
466 | |||
467 | wl->ba_support = false; | ||
468 | } | ||
469 | |||
470 | static int wl1271_set_ba_policies(struct wl1271 *wl) | ||
471 | { | ||
472 | u8 tid_index; | ||
473 | u8 ret = 0; | ||
474 | |||
475 | /* Reset the BA RX indicators */ | ||
476 | wl->ba_allowed = true; | ||
477 | wl->ba_rx_bitmap = 0; | ||
478 | |||
479 | /* validate that FW support BA */ | ||
480 | wl1271_check_ba_support(wl); | ||
481 | |||
482 | if (wl->ba_support) | ||
483 | /* 802.11n initiator BA session setting */ | ||
484 | for (tid_index = 0; tid_index < CONF_TX_MAX_TID_COUNT; | ||
485 | ++tid_index) { | ||
486 | ret = wl1271_acx_set_ba_session(wl, WLAN_BACK_INITIATOR, | ||
487 | tid_index, true); | ||
488 | if (ret < 0) | ||
489 | break; | ||
490 | } | ||
491 | |||
492 | return ret; | ||
493 | } | ||
494 | |||
458 | int wl1271_hw_init(struct wl1271 *wl) | 495 | int wl1271_hw_init(struct wl1271 *wl) |
459 | { | 496 | { |
460 | struct conf_tx_ac_category *conf_ac; | 497 | struct conf_tx_ac_category *conf_ac; |
@@ -568,6 +605,11 @@ int wl1271_hw_init(struct wl1271 *wl) | |||
568 | if (ret < 0) | 605 | if (ret < 0) |
569 | goto out_free_memmap; | 606 | goto out_free_memmap; |
570 | 607 | ||
608 | /* Configure initiator BA sessions policies */ | ||
609 | ret = wl1271_set_ba_policies(wl); | ||
610 | if (ret < 0) | ||
611 | goto out_free_memmap; | ||
612 | |||
571 | return 0; | 613 | return 0; |
572 | 614 | ||
573 | out_free_memmap: | 615 | out_free_memmap: |