Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 32f0fd5b authored by Eliad Peller's avatar Eliad Peller Committed by John W. Linville
Browse files

wlcore/wl12xx/wl18xx: configure max_stations per-hw



Each hw supports a different max stations (connected to the
same ap). add a new wl->max_ap_stations and use it instead
of the current common AP_MAX_STATIONS.

Signed-off-by: default avatarEliad Peller <eliad@wizery.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent da08fdfa
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1750,11 +1750,13 @@ static int wl12xx_setup(struct wl1271 *wl)
	struct wl12xx_platform_data *pdata = pdev_data->pdata;

	BUILD_BUG_ON(WL12XX_MAX_LINKS > WLCORE_MAX_LINKS);
	BUILD_BUG_ON(WL12XX_MAX_AP_STATIONS > WL12XX_MAX_LINKS);

	wl->rtable = wl12xx_rtable;
	wl->num_tx_desc = WL12XX_NUM_TX_DESCRIPTORS;
	wl->num_rx_desc = WL12XX_NUM_RX_DESCRIPTORS;
	wl->num_links = WL12XX_MAX_LINKS;
	wl->max_ap_stations = WL12XX_MAX_AP_STATIONS;
	wl->num_channels = 1;
	wl->num_mac_addr = WL12XX_NUM_MAC_ADDRESSES;
	wl->band_rate_to_idx = wl12xx_band_rate_to_idx;
+1 −0
Original line number Diff line number Diff line
@@ -65,6 +65,7 @@

#define WL12XX_RX_BA_MAX_SESSIONS 3

#define WL12XX_MAX_AP_STATIONS 8
#define WL12XX_MAX_LINKS 12

struct wl127x_rx_mem_pool_addr {
+2 −0
Original line number Diff line number Diff line
@@ -1753,11 +1753,13 @@ static int wl18xx_setup(struct wl1271 *wl)
	int ret;

	BUILD_BUG_ON(WL18XX_MAX_LINKS > WLCORE_MAX_LINKS);
	BUILD_BUG_ON(WL18XX_MAX_AP_STATIONS > WL18XX_MAX_LINKS);

	wl->rtable = wl18xx_rtable;
	wl->num_tx_desc = WL18XX_NUM_TX_DESCRIPTORS;
	wl->num_rx_desc = WL18XX_NUM_RX_DESCRIPTORS;
	wl->num_links = WL18XX_MAX_LINKS;
	wl->max_ap_stations = WL18XX_MAX_AP_STATIONS;
	wl->num_channels = 2;
	wl->num_mac_addr = WL18XX_NUM_MAC_ADDRESSES;
	wl->band_rate_to_idx = wl18xx_band_rate_to_idx;
+1 −0
Original line number Diff line number Diff line
@@ -42,6 +42,7 @@

#define WL18XX_RX_BA_MAX_SESSIONS 5

#define WL18XX_MAX_AP_STATIONS 8
#define WL18XX_MAX_LINKS 12

struct wl18xx_priv {
+1 −3
Original line number Diff line number Diff line
@@ -4662,7 +4662,7 @@ static int wl1271_allocate_sta(struct wl1271 *wl,
	int ret;


	if (wl->active_sta_count >= AP_MAX_STATIONS) {
	if (wl->active_sta_count >= wl->max_ap_stations) {
		wl1271_warning("could not allocate HLID - too much stations");
		return -EBUSY;
	}
@@ -5855,8 +5855,6 @@ struct ieee80211_hw *wlcore_alloc_hw(size_t priv_size, u32 aggr_buf_size,
	int i, j, ret;
	unsigned int order;

	BUILD_BUG_ON(AP_MAX_STATIONS > WLCORE_MAX_LINKS);

	hw = ieee80211_alloc_hw(sizeof(*wl), &wl1271_ops);
	if (!hw) {
		wl1271_error("could not alloc ieee80211_hw");
Loading