wlcore: set max num of Rx BA sessions per chip
authorIgal Chernobelsky <igalc@ti.com>
Tue, 12 Mar 2013 15:19:35 +0000 (17:19 +0200)
committerLuciano Coelho <coelho@ti.com>
Mon, 25 Mar 2013 10:33:11 +0000 (12:33 +0200)
Maximum number of supported RX BA sessions depends on chip type.
wl18xx supports 5 RX BA sessions while wl12xx supports 3.

Signed-off-by: Igal Chernobelsky <igalc@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
drivers/net/wireless/ti/wl12xx/main.c
drivers/net/wireless/ti/wl12xx/wl12xx.h
drivers/net/wireless/ti/wl18xx/main.c
drivers/net/wireless/ti/wl18xx/wl18xx.h
drivers/net/wireless/ti/wlcore/acx.h
drivers/net/wireless/ti/wlcore/main.c
drivers/net/wireless/ti/wlcore/wlcore.h

index 09694e39bb147dff54622c16983595029a79e4a0..1c627da85083949c9dd9837e09b53b5ca8a9ac74 100644 (file)
@@ -723,6 +723,7 @@ static int wl12xx_identify_chip(struct wl1271 *wl)
        wl->sched_scan_templ_id_2_4 = CMD_TEMPL_CFG_PROBE_REQ_2_4;
        wl->sched_scan_templ_id_5 = CMD_TEMPL_CFG_PROBE_REQ_5;
        wl->max_channels_5 = WL12XX_MAX_CHANNELS_5GHZ;
+       wl->ba_rx_session_count_max = WL12XX_RX_BA_MAX_SESSIONS;
 out:
        return ret;
 }
index d4552857480ca92d6c72461067ec54c813c421d8..222d03540200498a9400c9dc867159780bdf9311 100644 (file)
@@ -63,6 +63,8 @@
 
 #define WL12XX_NUM_MAC_ADDRESSES 2
 
+#define WL12XX_RX_BA_MAX_SESSIONS 3
+
 struct wl127x_rx_mem_pool_addr {
        u32 addr;
        u32 addr_extra;
index da3ef1b10a9cd55dbb3a64f423dfdc4918bb7a74..b670776f9bb271e21788ace8e3c5d1a59dcd6d8a 100644 (file)
@@ -678,6 +678,7 @@ static int wl18xx_identify_chip(struct wl1271 *wl)
        wl->sched_scan_templ_id_2_4 = CMD_TEMPL_PROBE_REQ_2_4_PERIODIC;
        wl->sched_scan_templ_id_5 = CMD_TEMPL_PROBE_REQ_5_PERIODIC;
        wl->max_channels_5 = WL18XX_MAX_CHANNELS_5GHZ;
+       wl->ba_rx_session_count_max = WL18XX_RX_BA_MAX_SESSIONS;
 out:
        return ret;
 }
index b6739e79efcfa33bc45c18ad9f205bcdbc2dce5a..9204e07ee432fe483a343f008ee1ce91f2752149 100644 (file)
@@ -29,7 +29,7 @@
 #define WL18XX_IFTYPE_VER      5
 #define WL18XX_MAJOR_VER       WLCORE_FW_VER_IGNORE
 #define WL18XX_SUBTYPE_VER     WLCORE_FW_VER_IGNORE
-#define WL18XX_MINOR_VER       28
+#define WL18XX_MINOR_VER       39
 
 #define WL18XX_CMD_MAX_SIZE          740
 
@@ -40,6 +40,8 @@
 
 #define WL18XX_NUM_MAC_ADDRESSES 3
 
+#define WL18XX_RX_BA_MAX_SESSIONS 5
+
 struct wl18xx_priv {
        /* buffer for sending commands to FW */
        u8 cmd_buf[WL18XX_CMD_MAX_SIZE];
index 126536c6a3933929f683940de3cc8670988caaea..1a61e8550b7bd42028b0c6640f3f9ec98cc56b6d 100644 (file)
@@ -728,8 +728,6 @@ struct wl1271_acx_ht_information {
        u8 padding[2];
 } __packed;
 
-#define RX_BA_MAX_SESSIONS 3
-
 struct wl1271_acx_ba_initiator_policy {
        struct acx_header header;
 
index 2c2ff3e1f849047de636a7ff6da4149b26380755..3fc86c4d2c7bba9824fdbbb654ade16c8e658f86 100644 (file)
@@ -4784,7 +4784,7 @@ static int wl1271_op_ampdu_action(struct ieee80211_hw *hw,
                        break;
                }
 
-               if (wl->ba_rx_session_count >= RX_BA_MAX_SESSIONS) {
+               if (wl->ba_rx_session_count >= wl->ba_rx_session_count_max) {
                        ret = -EBUSY;
                        wl1271_error("exceeded max RX BA sessions");
                        break;
index af9fecaefc30801cd96a35942ca2a4a48b900f49..0034979e97cbaa0316dfd2a62db2e5be59b7f058 100644 (file)
@@ -390,6 +390,9 @@ struct wl1271 {
        /* number of currently active RX BA sessions */
        int ba_rx_session_count;
 
+       /* Maximum number of supported RX BA sessions */
+       int ba_rx_session_count_max;
+
        /* AP-mode - number of currently connected stations */
        int active_sta_count;