diff options
author | Eliad Peller <eliad@wizery.com> | 2014-12-29 01:24:11 -0500 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2015-01-09 08:48:02 -0500 |
commit | 4ce9fad35a4ae21c393a89001b8ef33fa8c2033b (patch) | |
tree | d303aa2abe6c4707ae9f5867d6763816c00ab42e /drivers/net/wireless/ti | |
parent | 830513abc6ea2b1828b83b37300711984bae89f6 (diff) |
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: Eliad Peller <eliad@wizery.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/ti')
-rw-r--r-- | drivers/net/wireless/ti/wlcore/cmd.c | 16 | ||||
-rw-r--r-- | drivers/net/wireless/ti/wlcore/main.c | 14 |
2 files changed, 9 insertions, 21 deletions
diff --git a/drivers/net/wireless/ti/wlcore/cmd.c b/drivers/net/wireless/ti/wlcore/cmd.c index aacad4eee070..50ca10c95a18 100644 --- a/drivers/net/wireless/ti/wlcore/cmd.c +++ b/drivers/net/wireless/ti/wlcore/cmd.c | |||
@@ -1687,9 +1687,7 @@ int wlcore_cmd_regdomain_config_locked(struct wl1271 *wl) | |||
1687 | { | 1687 | { |
1688 | struct wl12xx_cmd_regdomain_dfs_config *cmd = NULL; | 1688 | struct wl12xx_cmd_regdomain_dfs_config *cmd = NULL; |
1689 | int ret = 0, i, b, ch_bit_idx; | 1689 | int ret = 0, i, b, ch_bit_idx; |
1690 | struct ieee80211_channel *channel; | ||
1691 | u32 tmp_ch_bitmap[2]; | 1690 | u32 tmp_ch_bitmap[2]; |
1692 | u16 ch; | ||
1693 | struct wiphy *wiphy = wl->hw->wiphy; | 1691 | struct wiphy *wiphy = wl->hw->wiphy; |
1694 | struct ieee80211_supported_band *band; | 1692 | struct ieee80211_supported_band *band; |
1695 | bool timeout = false; | 1693 | bool timeout = false; |
@@ -1704,12 +1702,16 @@ int wlcore_cmd_regdomain_config_locked(struct wl1271 *wl) | |||
1704 | for (b = IEEE80211_BAND_2GHZ; b <= IEEE80211_BAND_5GHZ; b++) { | 1702 | for (b = IEEE80211_BAND_2GHZ; b <= IEEE80211_BAND_5GHZ; b++) { |
1705 | band = wiphy->bands[b]; | 1703 | band = wiphy->bands[b]; |
1706 | for (i = 0; i < band->n_channels; i++) { | 1704 | for (i = 0; i < band->n_channels; i++) { |
1707 | channel = &band->channels[i]; | 1705 | struct ieee80211_channel *channel = &band->channels[i]; |
1708 | ch = channel->hw_value; | 1706 | u16 ch = channel->hw_value; |
1707 | u32 flags = channel->flags; | ||
1709 | 1708 | ||
1710 | if (channel->flags & (IEEE80211_CHAN_DISABLED | | 1709 | if (flags & (IEEE80211_CHAN_DISABLED | |
1711 | IEEE80211_CHAN_RADAR | | 1710 | IEEE80211_CHAN_NO_IR)) |
1712 | IEEE80211_CHAN_NO_IR)) | 1711 | continue; |
1712 | |||
1713 | if ((flags & IEEE80211_CHAN_RADAR) && | ||
1714 | channel->dfs_state != NL80211_DFS_AVAILABLE) | ||
1713 | continue; | 1715 | continue; |
1714 | 1716 | ||
1715 | ch_bit_idx = wlcore_get_reg_conf_ch_idx(b, ch); | 1717 | ch_bit_idx = wlcore_get_reg_conf_ch_idx(b, ch); |
diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c index 2cbec03049e6..a393ae8fa81b 100644 --- a/drivers/net/wireless/ti/wlcore/main.c +++ b/drivers/net/wireless/ti/wlcore/main.c | |||
@@ -79,23 +79,9 @@ static int wl12xx_set_authorized(struct wl1271 *wl, struct wl12xx_vif *wlvif) | |||
79 | static void wl1271_reg_notify(struct wiphy *wiphy, | 79 | static void wl1271_reg_notify(struct wiphy *wiphy, |
80 | struct regulatory_request *request) | 80 | struct regulatory_request *request) |
81 | { | 81 | { |
82 | struct ieee80211_supported_band *band; | ||
83 | struct ieee80211_channel *ch; | ||
84 | int i; | ||
85 | struct ieee80211_hw *hw = wiphy_to_ieee80211_hw(wiphy); | 82 | struct ieee80211_hw *hw = wiphy_to_ieee80211_hw(wiphy); |
86 | struct wl1271 *wl = hw->priv; | 83 | struct wl1271 *wl = hw->priv; |
87 | 84 | ||
88 | band = wiphy->bands[IEEE80211_BAND_5GHZ]; | ||
89 | for (i = 0; i < band->n_channels; i++) { | ||
90 | ch = &band->channels[i]; | ||
91 | if (ch->flags & IEEE80211_CHAN_DISABLED) | ||
92 | continue; | ||
93 | |||
94 | if (ch->flags & IEEE80211_CHAN_RADAR) | ||
95 | ch->flags |= IEEE80211_CHAN_NO_IR; | ||
96 | |||
97 | } | ||
98 | |||
99 | wlcore_regdomain_config(wl); | 85 | wlcore_regdomain_config(wl); |
100 | } | 86 | } |
101 | 87 | ||