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

Commit 0a1c720c authored by Eliad Peller's avatar Eliad Peller Committed by Luciano Coelho
Browse files

wl18xx: increase MAX_CHANNELS_5GHZ



Some regdomains have more than 23 valid 5ghz channels,
so 18xx's MAX_CHANNELS_5GHZ was increased to 32.

Since now we have different max 5ghz channels values
for wl12xx and wl18xx, add a new wl->max_channels_5ghz
field, and use it for scan channels configuration.

Signed-off-by: default avatarEliad Peller <eliad@wizery.com>
Signed-off-by: default avatarLuciano Coelho <coelho@ti.com>
parent 78e28062
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -704,6 +704,7 @@ static int wl12xx_identify_chip(struct wl1271 *wl)
	wl->scan_templ_id_5 = CMD_TEMPL_APP_PROBE_REQ_5_LEGACY;
	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;
out:
	return ret;
}
+3 −1
Original line number Diff line number Diff line
@@ -26,6 +26,8 @@
#include "../wlcore/cmd.h"
#include "../wlcore/scan.h"

#define WL12XX_MAX_CHANNELS_5GHZ 23

struct basic_scan_params {
	/* Scan option flags (WL1271_SCAN_OPT_*) */
	__le16 scan_options;
@@ -107,7 +109,7 @@ struct wl1271_cmd_sched_scan_config {
	u8 role_id;
	u8 padding[1];
	struct conn_scan_ch_params channels_2[MAX_CHANNELS_2GHZ];
	struct conn_scan_ch_params channels_5[MAX_CHANNELS_5GHZ];
	struct conn_scan_ch_params channels_5[WL12XX_MAX_CHANNELS_5GHZ];
	struct conn_scan_ch_params channels_4[MAX_CHANNELS_4GHZ];
} __packed;

+1 −0
Original line number Diff line number Diff line
@@ -636,6 +636,7 @@ static int wl18xx_identify_chip(struct wl1271 *wl)
	wl->scan_templ_id_5 = CMD_TEMPL_CFG_PROBE_REQ_5;
	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;
out:
	return ret;
}
+3 −1
Original line number Diff line number Diff line
@@ -50,6 +50,8 @@ enum
	WL18XX_SCAN_RATE_6	= 2,
};

#define WL18XX_MAX_CHANNELS_5GHZ 32

struct wl18xx_cmd_scan_params {
	struct wl1271_cmd_header header;

@@ -89,7 +91,7 @@ struct wl18xx_cmd_scan_params {
	union {
		struct {
			struct conn_scan_ch_params channels_2[MAX_CHANNELS_2GHZ];
			struct conn_scan_ch_params channels_5[MAX_CHANNELS_5GHZ];
			struct conn_scan_ch_params channels_5[WL18XX_MAX_CHANNELS_5GHZ];
			struct conn_scan_ch_params channels_4[MAX_CHANNELS_4GHZ];
		};
		struct tracking_ch_params channels_tracking[WL1271_SCAN_MAX_CHANNELS];
+3 −3
Original line number Diff line number Diff line
@@ -228,7 +228,7 @@ wlcore_set_scan_chan_params(struct wl1271 *wl,
					 cfg->channels_5,
					 IEEE80211_BAND_5GHZ,
					 false, true, 0,
					 MAX_CHANNELS_5GHZ,
					 wl->max_channels_5,
					 &n_pactive_ch);
	cfg->dfs =
		wlcore_scan_get_channels(wl,
@@ -239,7 +239,7 @@ wlcore_set_scan_chan_params(struct wl1271 *wl,
					 IEEE80211_BAND_5GHZ,
					 true, true,
					 cfg->passive[1],
					 MAX_CHANNELS_5GHZ,
					 wl->max_channels_5,
					 &n_pactive_ch);
	cfg->active[1] =
		wlcore_scan_get_channels(wl,
@@ -250,7 +250,7 @@ wlcore_set_scan_chan_params(struct wl1271 *wl,
					 IEEE80211_BAND_5GHZ,
					 false, false,
					 cfg->passive[1] + cfg->dfs,
					 MAX_CHANNELS_5GHZ,
					 wl->max_channels_5,
					 &n_pactive_ch);

	/* 802.11j channels are not supported yet */
Loading