Commit 1aed8964 authored by Karthik Ananthapadmanabha's avatar Karthik Ananthapadmanabha Committed by Kalle Valo

mwifiex: apply radar flag

When IEEE80211_CHAN_RADAR is set by cfg80211, passive scan must be
performed. In mwifiex,active scan is performed even though flag is
set from cfg80211. mwifiex_reg_apply_radar_flags() function added
in this patch correctly uses radar flag.
Signed-off-by: default avatarKarthik Ananthapadmanabha <karthida@marvell.com>
Signed-off-by: default avatarAmitkumar Karwar <akarwar@marvell.com>
Signed-off-by: default avatarGanapathi Bhat <gbhat@marvell.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 495d36e6
...@@ -594,6 +594,24 @@ int mwifiex_send_domain_info_cmd_fw(struct wiphy *wiphy) ...@@ -594,6 +594,24 @@ int mwifiex_send_domain_info_cmd_fw(struct wiphy *wiphy)
return 0; return 0;
} }
static void mwifiex_reg_apply_radar_flags(struct wiphy *wiphy)
{
struct ieee80211_supported_band *sband;
struct ieee80211_channel *chan;
unsigned int i;
if (!wiphy->bands[NL80211_BAND_5GHZ])
return;
sband = wiphy->bands[NL80211_BAND_5GHZ];
for (i = 0; i < sband->n_channels; i++) {
chan = &sband->channels[i];
if ((!(chan->flags & IEEE80211_CHAN_DISABLED)) &&
(chan->flags & IEEE80211_CHAN_RADAR))
chan->flags |= IEEE80211_CHAN_NO_IR;
}
}
/* /*
* CFG802.11 regulatory domain callback function. * CFG802.11 regulatory domain callback function.
* *
...@@ -613,6 +631,7 @@ static void mwifiex_reg_notifier(struct wiphy *wiphy, ...@@ -613,6 +631,7 @@ static void mwifiex_reg_notifier(struct wiphy *wiphy,
mwifiex_dbg(adapter, INFO, mwifiex_dbg(adapter, INFO,
"info: cfg80211 regulatory domain callback for %c%c\n", "info: cfg80211 regulatory domain callback for %c%c\n",
request->alpha2[0], request->alpha2[1]); request->alpha2[0], request->alpha2[1]);
mwifiex_reg_apply_radar_flags(wiphy);
switch (request->initiator) { switch (request->initiator) {
case NL80211_REGDOM_SET_BY_DRIVER: case NL80211_REGDOM_SET_BY_DRIVER:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment