1 Each hw supports a different max stations (connected to the
2 same ap). add a new wl->max_ap_stations and use it instead
3 of the current common AP_MAX_STATIONS.
5 Signed-off-by: Eliad Peller <eliad@wizery.com>
8 drivers/net/wireless/ti/wl12xx/main.c | 2 ++
9 drivers/net/wireless/ti/wl12xx/wl12xx.h | 1 +
10 drivers/net/wireless/ti/wl18xx/main.c | 2 ++
11 drivers/net/wireless/ti/wl18xx/wl18xx.h | 1 +
12 drivers/net/wireless/ti/wlcore/main.c | 4 +---
13 drivers/net/wireless/ti/wlcore/wlcore.h | 2 ++
14 drivers/net/wireless/ti/wlcore/wlcore_i.h | 2 --
15 7 files changed, 9 insertions(+), 5 deletions(-)
17 --- a/drivers/net/wireless/ti/wl12xx/main.c
18 +++ b/drivers/net/wireless/ti/wl12xx/main.c
19 @@ -1750,11 +1750,13 @@ static int wl12xx_setup(struct wl1271 *w
20 struct wl12xx_platform_data *pdata = pdev_data->pdata;
22 BUILD_BUG_ON(WL12XX_MAX_LINKS > WLCORE_MAX_LINKS);
23 + BUILD_BUG_ON(WL12XX_MAX_AP_STATIONS > WL12XX_MAX_LINKS);
25 wl->rtable = wl12xx_rtable;
26 wl->num_tx_desc = WL12XX_NUM_TX_DESCRIPTORS;
27 wl->num_rx_desc = WL12XX_NUM_RX_DESCRIPTORS;
28 wl->num_links = WL12XX_MAX_LINKS;
29 + wl->max_ap_stations = WL12XX_MAX_AP_STATIONS;
31 wl->num_mac_addr = WL12XX_NUM_MAC_ADDRESSES;
32 wl->band_rate_to_idx = wl12xx_band_rate_to_idx;
33 --- a/drivers/net/wireless/ti/wl12xx/wl12xx.h
34 +++ b/drivers/net/wireless/ti/wl12xx/wl12xx.h
37 #define WL12XX_RX_BA_MAX_SESSIONS 3
39 +#define WL12XX_MAX_AP_STATIONS 8
40 #define WL12XX_MAX_LINKS 12
42 struct wl127x_rx_mem_pool_addr {
43 --- a/drivers/net/wireless/ti/wl18xx/main.c
44 +++ b/drivers/net/wireless/ti/wl18xx/main.c
45 @@ -1753,11 +1753,13 @@ static int wl18xx_setup(struct wl1271 *w
48 BUILD_BUG_ON(WL18XX_MAX_LINKS > WLCORE_MAX_LINKS);
49 + BUILD_BUG_ON(WL18XX_MAX_AP_STATIONS > WL18XX_MAX_LINKS);
51 wl->rtable = wl18xx_rtable;
52 wl->num_tx_desc = WL18XX_NUM_TX_DESCRIPTORS;
53 wl->num_rx_desc = WL18XX_NUM_RX_DESCRIPTORS;
54 wl->num_links = WL18XX_MAX_LINKS;
55 + wl->max_ap_stations = WL18XX_MAX_AP_STATIONS;
57 wl->num_mac_addr = WL18XX_NUM_MAC_ADDRESSES;
58 wl->band_rate_to_idx = wl18xx_band_rate_to_idx;
59 --- a/drivers/net/wireless/ti/wl18xx/wl18xx.h
60 +++ b/drivers/net/wireless/ti/wl18xx/wl18xx.h
63 #define WL18XX_RX_BA_MAX_SESSIONS 5
65 +#define WL18XX_MAX_AP_STATIONS 8
66 #define WL18XX_MAX_LINKS 12
69 --- a/drivers/net/wireless/ti/wlcore/main.c
70 +++ b/drivers/net/wireless/ti/wlcore/main.c
71 @@ -4695,7 +4695,7 @@ static int wl1271_allocate_sta(struct wl
75 - if (wl->active_sta_count >= AP_MAX_STATIONS) {
76 + if (wl->active_sta_count >= wl->max_ap_stations) {
77 wl1271_warning("could not allocate HLID - too much stations");
80 @@ -5888,8 +5888,6 @@ struct ieee80211_hw *wlcore_alloc_hw(siz
84 - BUILD_BUG_ON(AP_MAX_STATIONS > WLCORE_MAX_LINKS);
86 hw = ieee80211_alloc_hw(sizeof(*wl), &wl1271_ops);
88 wl1271_error("could not alloc ieee80211_hw");
89 --- a/drivers/net/wireless/ti/wlcore/wlcore.h
90 +++ b/drivers/net/wireless/ti/wlcore/wlcore.h
91 @@ -440,6 +440,8 @@ struct wl1271 {
93 /* number of links the HW supports */
95 + /* max stations a single AP can support */
98 /* translate HW Tx rates to standard rate-indices */
99 const u8 **band_rate_to_idx;
100 --- a/drivers/net/wireless/ti/wlcore/wlcore_i.h
101 +++ b/drivers/net/wireless/ti/wlcore/wlcore_i.h
102 @@ -123,8 +123,6 @@ struct wl1271_chip {
104 #define NUM_TX_QUEUES 4
106 -#define AP_MAX_STATIONS 8
108 struct wl_fw_status {