Commit 4ce9fad3 authored by Eliad Peller's avatar Eliad Peller Committed by Kalle Valo

wlcore: allow using dfs channels

Since we are going to support dfs channels, there
is no reason to mark them as NO_IR (having
the DFS flag is enough anyway).

Additionally, when setting the regdomain configuration,
enable usable dfs channels.
Signed-off-by: default avatarEliad Peller <eliad@wizery.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 830513ab
...@@ -1687,9 +1687,7 @@ int wlcore_cmd_regdomain_config_locked(struct wl1271 *wl) ...@@ -1687,9 +1687,7 @@ int wlcore_cmd_regdomain_config_locked(struct wl1271 *wl)
{ {
struct wl12xx_cmd_regdomain_dfs_config *cmd = NULL; struct wl12xx_cmd_regdomain_dfs_config *cmd = NULL;
int ret = 0, i, b, ch_bit_idx; int ret = 0, i, b, ch_bit_idx;
struct ieee80211_channel *channel;
u32 tmp_ch_bitmap[2]; u32 tmp_ch_bitmap[2];
u16 ch;
struct wiphy *wiphy = wl->hw->wiphy; struct wiphy *wiphy = wl->hw->wiphy;
struct ieee80211_supported_band *band; struct ieee80211_supported_band *band;
bool timeout = false; bool timeout = false;
...@@ -1704,14 +1702,18 @@ int wlcore_cmd_regdomain_config_locked(struct wl1271 *wl) ...@@ -1704,14 +1702,18 @@ int wlcore_cmd_regdomain_config_locked(struct wl1271 *wl)
for (b = IEEE80211_BAND_2GHZ; b <= IEEE80211_BAND_5GHZ; b++) { for (b = IEEE80211_BAND_2GHZ; b <= IEEE80211_BAND_5GHZ; b++) {
band = wiphy->bands[b]; band = wiphy->bands[b];
for (i = 0; i < band->n_channels; i++) { for (i = 0; i < band->n_channels; i++) {
channel = &band->channels[i]; struct ieee80211_channel *channel = &band->channels[i];
ch = channel->hw_value; u16 ch = channel->hw_value;
u32 flags = channel->flags;
if (channel->flags & (IEEE80211_CHAN_DISABLED | if (flags & (IEEE80211_CHAN_DISABLED |
IEEE80211_CHAN_RADAR |
IEEE80211_CHAN_NO_IR)) IEEE80211_CHAN_NO_IR))
continue; continue;
if ((flags & IEEE80211_CHAN_RADAR) &&
channel->dfs_state != NL80211_DFS_AVAILABLE)
continue;
ch_bit_idx = wlcore_get_reg_conf_ch_idx(b, ch); ch_bit_idx = wlcore_get_reg_conf_ch_idx(b, ch);
if (ch_bit_idx < 0) if (ch_bit_idx < 0)
continue; continue;
......
...@@ -79,23 +79,9 @@ static int wl12xx_set_authorized(struct wl1271 *wl, struct wl12xx_vif *wlvif) ...@@ -79,23 +79,9 @@ static int wl12xx_set_authorized(struct wl1271 *wl, struct wl12xx_vif *wlvif)
static void wl1271_reg_notify(struct wiphy *wiphy, static void wl1271_reg_notify(struct wiphy *wiphy,
struct regulatory_request *request) struct regulatory_request *request)
{ {
struct ieee80211_supported_band *band;
struct ieee80211_channel *ch;
int i;
struct ieee80211_hw *hw = wiphy_to_ieee80211_hw(wiphy); struct ieee80211_hw *hw = wiphy_to_ieee80211_hw(wiphy);
struct wl1271 *wl = hw->priv; struct wl1271 *wl = hw->priv;
band = wiphy->bands[IEEE80211_BAND_5GHZ];
for (i = 0; i < band->n_channels; i++) {
ch = &band->channels[i];
if (ch->flags & IEEE80211_CHAN_DISABLED)
continue;
if (ch->flags & IEEE80211_CHAN_RADAR)
ch->flags |= IEEE80211_CHAN_NO_IR;
}
wlcore_regdomain_config(wl); wlcore_regdomain_config(wl);
} }
......
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