aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/ath/ath6kl/cfg80211.c22
-rw-r--r--drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c11
-rw-r--r--drivers/net/wireless/libertas/cfg.c24
-rw-r--r--drivers/net/wireless/mwifiex/cfg80211.c30
-rw-r--r--drivers/net/wireless/orinoco/cfg.c11
-rw-r--r--drivers/net/wireless/rndis_wlan.c2
6 files changed, 56 insertions, 44 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c
index 74091d33ed6c..c0cc2e59fe6c 100644
--- a/drivers/net/wireless/ath/ath6kl/cfg80211.c
+++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c
@@ -1093,15 +1093,20 @@ out:
1093void ath6kl_cfg80211_ch_switch_notify(struct ath6kl_vif *vif, int freq, 1093void ath6kl_cfg80211_ch_switch_notify(struct ath6kl_vif *vif, int freq,
1094 enum wmi_phy_mode mode) 1094 enum wmi_phy_mode mode)
1095{ 1095{
1096 enum nl80211_channel_type type; 1096 struct cfg80211_chan_def chandef;
1097 1097
1098 ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, 1098 ath6kl_dbg(ATH6KL_DBG_WLAN_CFG,
1099 "channel switch notify nw_type %d freq %d mode %d\n", 1099 "channel switch notify nw_type %d freq %d mode %d\n",
1100 vif->nw_type, freq, mode); 1100 vif->nw_type, freq, mode);
1101 1101
1102 type = (mode == WMI_11G_HT20) ? NL80211_CHAN_HT20 : NL80211_CHAN_NO_HT; 1102 chandef.chan = ieee80211_get_channel(vif->ar->wiphy, freq);
1103 if (WARN_ON(!chandef.chan))
1104 return;
1105
1106 chandef._type = (mode == WMI_11G_HT20) ?
1107 NL80211_CHAN_HT20 : NL80211_CHAN_NO_HT;
1103 1108
1104 cfg80211_ch_switch_notify(vif->ndev, freq, type); 1109 cfg80211_ch_switch_notify(vif->ndev, &chandef);
1105} 1110}
1106 1111
1107static int ath6kl_cfg80211_add_key(struct wiphy *wiphy, struct net_device *ndev, 1112static int ath6kl_cfg80211_add_key(struct wiphy *wiphy, struct net_device *ndev,
@@ -1613,8 +1618,8 @@ static int ath6kl_cfg80211_join_ibss(struct wiphy *wiphy,
1613 vif->ssid_len = ibss_param->ssid_len; 1618 vif->ssid_len = ibss_param->ssid_len;
1614 memcpy(vif->ssid, ibss_param->ssid, vif->ssid_len); 1619 memcpy(vif->ssid, ibss_param->ssid, vif->ssid_len);
1615 1620
1616 if (ibss_param->channel) 1621 if (ibss_param->chandef.chan)
1617 vif->ch_hint = ibss_param->channel->center_freq; 1622 vif->ch_hint = ibss_param->chandef.chan->center_freq;
1618 1623
1619 if (ibss_param->channel_fixed) { 1624 if (ibss_param->channel_fixed) {
1620 /* 1625 /*
@@ -2856,7 +2861,7 @@ static int ath6kl_start_ap(struct wiphy *wiphy, struct net_device *dev,
2856 p.ssid_len = vif->ssid_len; 2861 p.ssid_len = vif->ssid_len;
2857 memcpy(p.ssid, vif->ssid, vif->ssid_len); 2862 memcpy(p.ssid, vif->ssid, vif->ssid_len);
2858 p.dot11_auth_mode = vif->dot11_auth_mode; 2863 p.dot11_auth_mode = vif->dot11_auth_mode;
2859 p.ch = cpu_to_le16(info->channel->center_freq); 2864 p.ch = cpu_to_le16(info->chandef.chan->center_freq);
2860 2865
2861 /* Enable uAPSD support by default */ 2866 /* Enable uAPSD support by default */
2862 res = ath6kl_wmi_ap_set_apsd(ar->wmi, vif->fw_vif_idx, true); 2867 res = ath6kl_wmi_ap_set_apsd(ar->wmi, vif->fw_vif_idx, true);
@@ -2880,8 +2885,9 @@ static int ath6kl_start_ap(struct wiphy *wiphy, struct net_device *dev,
2880 return res; 2885 return res;
2881 } 2886 }
2882 2887
2883 if (ath6kl_set_htcap(vif, info->channel->band, 2888 if (ath6kl_set_htcap(vif, info->chandef.chan->band,
2884 info->channel_type != NL80211_CHAN_NO_HT)) 2889 cfg80211_get_chandef_type(&info->chandef)
2890 != NL80211_CHAN_NO_HT))
2885 return -EIO; 2891 return -EIO;
2886 2892
2887 /* 2893 /*
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
index 904c94121c13..b596ca4f22bd 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
@@ -1212,8 +1212,8 @@ brcmf_cfg80211_join_ibss(struct wiphy *wiphy, struct net_device *ndev,
1212 else 1212 else
1213 WL_CONN("No BSSID specified\n"); 1213 WL_CONN("No BSSID specified\n");
1214 1214
1215 if (params->channel) 1215 if (params->chandef.chan)
1216 WL_CONN("channel: %d\n", params->channel->center_freq); 1216 WL_CONN("channel: %d\n", params->chandef.chan->center_freq);
1217 else 1217 else
1218 WL_CONN("no channel specified\n"); 1218 WL_CONN("no channel specified\n");
1219 1219
@@ -1286,12 +1286,12 @@ brcmf_cfg80211_join_ibss(struct wiphy *wiphy, struct net_device *ndev,
1286 } 1286 }
1287 1287
1288 /* Channel */ 1288 /* Channel */
1289 if (params->channel) { 1289 if (params->chandef.chan) {
1290 u32 target_channel; 1290 u32 target_channel;
1291 1291
1292 cfg->channel = 1292 cfg->channel =
1293 ieee80211_frequency_to_channel( 1293 ieee80211_frequency_to_channel(
1294 params->channel->center_freq); 1294 params->chandef.chan->center_freq);
1295 if (params->channel_fixed) { 1295 if (params->channel_fixed) {
1296 /* adding chanspec */ 1296 /* adding chanspec */
1297 brcmf_ch_to_chanspec(cfg->channel, 1297 brcmf_ch_to_chanspec(cfg->channel,
@@ -3938,7 +3938,8 @@ brcmf_cfg80211_start_ap(struct wiphy *wiphy, struct net_device *ndev,
3938 s32 bssidx = 0; 3938 s32 bssidx = 0;
3939 3939
3940 WL_TRACE("channel_type=%d, beacon_interval=%d, dtim_period=%d,\n", 3940 WL_TRACE("channel_type=%d, beacon_interval=%d, dtim_period=%d,\n",
3941 settings->channel_type, settings->beacon_interval, 3941 cfg80211_get_chandef_type(&settings->chandef),
3942 settings->beacon_interval,
3942 settings->dtim_period); 3943 settings->dtim_period);
3943 WL_TRACE("ssid=%s(%d), auth_type=%d, inactivity_timeout=%d\n", 3944 WL_TRACE("ssid=%s(%d), auth_type=%d, inactivity_timeout=%d\n",
3944 settings->ssid, settings->ssid_len, settings->auth_type, 3945 settings->ssid, settings->ssid_len, settings->auth_type,
diff --git a/drivers/net/wireless/libertas/cfg.c b/drivers/net/wireless/libertas/cfg.c
index 1c10b542ab23..ec36868f6fc5 100644
--- a/drivers/net/wireless/libertas/cfg.c
+++ b/drivers/net/wireless/libertas/cfg.c
@@ -436,19 +436,19 @@ static int lbs_add_wpa_tlv(u8 *tlv, const u8 *ie, u8 ie_len)
436 */ 436 */
437 437
438static int lbs_cfg_set_monitor_channel(struct wiphy *wiphy, 438static int lbs_cfg_set_monitor_channel(struct wiphy *wiphy,
439 struct ieee80211_channel *channel, 439 struct cfg80211_chan_def *chandef)
440 enum nl80211_channel_type channel_type)
441{ 440{
442 struct lbs_private *priv = wiphy_priv(wiphy); 441 struct lbs_private *priv = wiphy_priv(wiphy);
443 int ret = -ENOTSUPP; 442 int ret = -ENOTSUPP;
444 443
445 lbs_deb_enter_args(LBS_DEB_CFG80211, "freq %d, type %d", 444 lbs_deb_enter_args(LBS_DEB_CFG80211, "freq %d, type %d",
446 channel->center_freq, channel_type); 445 chandef->chan->center_freq,
446 cfg80211_get_chandef_type(chandef));
447 447
448 if (channel_type != NL80211_CHAN_NO_HT) 448 if (cfg80211_get_chandef_type(chandef) != NL80211_CHAN_NO_HT)
449 goto out; 449 goto out;
450 450
451 ret = lbs_set_channel(priv, channel->hw_value); 451 ret = lbs_set_channel(priv, chandef->chan->hw_value);
452 452
453 out: 453 out:
454 lbs_deb_leave_args(LBS_DEB_CFG80211, "ret %d", ret); 454 lbs_deb_leave_args(LBS_DEB_CFG80211, "ret %d", ret);
@@ -1734,7 +1734,7 @@ static void lbs_join_post(struct lbs_private *priv,
1734 /* Fake DS channel IE */ 1734 /* Fake DS channel IE */
1735 *fake++ = WLAN_EID_DS_PARAMS; 1735 *fake++ = WLAN_EID_DS_PARAMS;
1736 *fake++ = 1; 1736 *fake++ = 1;
1737 *fake++ = params->channel->hw_value; 1737 *fake++ = params->chandef.chan->hw_value;
1738 /* Fake IBSS params IE */ 1738 /* Fake IBSS params IE */
1739 *fake++ = WLAN_EID_IBSS_PARAMS; 1739 *fake++ = WLAN_EID_IBSS_PARAMS;
1740 *fake++ = 2; 1740 *fake++ = 2;
@@ -1755,7 +1755,7 @@ static void lbs_join_post(struct lbs_private *priv,
1755 lbs_deb_hex(LBS_DEB_CFG80211, "IE", fake_ie, fake - fake_ie); 1755 lbs_deb_hex(LBS_DEB_CFG80211, "IE", fake_ie, fake - fake_ie);
1756 1756
1757 bss = cfg80211_inform_bss(priv->wdev->wiphy, 1757 bss = cfg80211_inform_bss(priv->wdev->wiphy,
1758 params->channel, 1758 params->chandef.chan,
1759 bssid, 1759 bssid,
1760 0, 1760 0,
1761 capability, 1761 capability,
@@ -1833,7 +1833,7 @@ static int lbs_ibss_join_existing(struct lbs_private *priv,
1833 cmd.bss.beaconperiod = cpu_to_le16(params->beacon_interval); 1833 cmd.bss.beaconperiod = cpu_to_le16(params->beacon_interval);
1834 cmd.bss.ds.header.id = WLAN_EID_DS_PARAMS; 1834 cmd.bss.ds.header.id = WLAN_EID_DS_PARAMS;
1835 cmd.bss.ds.header.len = 1; 1835 cmd.bss.ds.header.len = 1;
1836 cmd.bss.ds.channel = params->channel->hw_value; 1836 cmd.bss.ds.channel = params->chandef.chan->hw_value;
1837 cmd.bss.ibss.header.id = WLAN_EID_IBSS_PARAMS; 1837 cmd.bss.ibss.header.id = WLAN_EID_IBSS_PARAMS;
1838 cmd.bss.ibss.header.len = 2; 1838 cmd.bss.ibss.header.len = 2;
1839 cmd.bss.ibss.atimwindow = 0; 1839 cmd.bss.ibss.atimwindow = 0;
@@ -1942,7 +1942,7 @@ static int lbs_ibss_start_new(struct lbs_private *priv,
1942 cmd.ibss.atimwindow = 0; 1942 cmd.ibss.atimwindow = 0;
1943 cmd.ds.header.id = WLAN_EID_DS_PARAMS; 1943 cmd.ds.header.id = WLAN_EID_DS_PARAMS;
1944 cmd.ds.header.len = 1; 1944 cmd.ds.header.len = 1;
1945 cmd.ds.channel = params->channel->hw_value; 1945 cmd.ds.channel = params->chandef.chan->hw_value;
1946 /* Only v8 and below support setting probe delay */ 1946 /* Only v8 and below support setting probe delay */
1947 if (MRVL_FW_MAJOR_REV(priv->fwrelease) <= 8) 1947 if (MRVL_FW_MAJOR_REV(priv->fwrelease) <= 8)
1948 cmd.probedelay = cpu_to_le16(CMD_SCAN_PROBE_DELAY_TIME); 1948 cmd.probedelay = cpu_to_le16(CMD_SCAN_PROBE_DELAY_TIME);
@@ -1987,18 +1987,18 @@ static int lbs_join_ibss(struct wiphy *wiphy, struct net_device *dev,
1987 1987
1988 lbs_deb_enter(LBS_DEB_CFG80211); 1988 lbs_deb_enter(LBS_DEB_CFG80211);
1989 1989
1990 if (!params->channel) { 1990 if (!params->chandef.chan) {
1991 ret = -ENOTSUPP; 1991 ret = -ENOTSUPP;
1992 goto out; 1992 goto out;
1993 } 1993 }
1994 1994
1995 ret = lbs_set_channel(priv, params->channel->hw_value); 1995 ret = lbs_set_channel(priv, params->chandef.chan->hw_value);
1996 if (ret) 1996 if (ret)
1997 goto out; 1997 goto out;
1998 1998
1999 /* Search if someone is beaconing. This assumes that the 1999 /* Search if someone is beaconing. This assumes that the
2000 * bss list is populated already */ 2000 * bss list is populated already */
2001 bss = cfg80211_get_bss(wiphy, params->channel, params->bssid, 2001 bss = cfg80211_get_bss(wiphy, params->chandef.chan, params->bssid,
2002 params->ssid, params->ssid_len, 2002 params->ssid, params->ssid_len,
2003 WLAN_CAPABILITY_IBSS, WLAN_CAPABILITY_IBSS); 2003 WLAN_CAPABILITY_IBSS, WLAN_CAPABILITY_IBSS);
2004 2004
diff --git a/drivers/net/wireless/mwifiex/cfg80211.c b/drivers/net/wireless/mwifiex/cfg80211.c
index f69190b492aa..42be612faf0f 100644
--- a/drivers/net/wireless/mwifiex/cfg80211.c
+++ b/drivers/net/wireless/mwifiex/cfg80211.c
@@ -1291,21 +1291,23 @@ static int mwifiex_cfg80211_start_ap(struct wiphy *wiphy,
1291 return -EINVAL; 1291 return -EINVAL;
1292 } 1292 }
1293 1293
1294 bss_cfg->channel = 1294 bss_cfg->channel = ieee80211_frequency_to_channel(
1295 (u8)ieee80211_frequency_to_channel(params->channel->center_freq); 1295 params->chandef.chan->center_freq);
1296 1296
1297 /* Set appropriate bands */ 1297 /* Set appropriate bands */
1298 if (params->channel->band == IEEE80211_BAND_2GHZ) { 1298 if (params->chandef.chan->band == IEEE80211_BAND_2GHZ) {
1299 bss_cfg->band_cfg = BAND_CONFIG_BG; 1299 bss_cfg->band_cfg = BAND_CONFIG_BG;
1300 1300
1301 if (params->channel_type == NL80211_CHAN_NO_HT) 1301 if (cfg80211_get_chandef_type(&params->chandef) ==
1302 NL80211_CHAN_NO_HT)
1302 config_bands = BAND_B | BAND_G; 1303 config_bands = BAND_B | BAND_G;
1303 else 1304 else
1304 config_bands = BAND_B | BAND_G | BAND_GN; 1305 config_bands = BAND_B | BAND_G | BAND_GN;
1305 } else { 1306 } else {
1306 bss_cfg->band_cfg = BAND_CONFIG_A; 1307 bss_cfg->band_cfg = BAND_CONFIG_A;
1307 1308
1308 if (params->channel_type == NL80211_CHAN_NO_HT) 1309 if (cfg80211_get_chandef_type(&params->chandef) ==
1310 NL80211_CHAN_NO_HT)
1309 config_bands = BAND_A; 1311 config_bands = BAND_A;
1310 else 1312 else
1311 config_bands = BAND_AN | BAND_A; 1313 config_bands = BAND_AN | BAND_A;
@@ -1678,7 +1680,7 @@ static int mwifiex_set_ibss_params(struct mwifiex_private *priv,
1678 int index = 0, i; 1680 int index = 0, i;
1679 u8 config_bands = 0; 1681 u8 config_bands = 0;
1680 1682
1681 if (params->channel->band == IEEE80211_BAND_2GHZ) { 1683 if (params->chandef.chan->band == IEEE80211_BAND_2GHZ) {
1682 if (!params->basic_rates) { 1684 if (!params->basic_rates) {
1683 config_bands = BAND_B | BAND_G; 1685 config_bands = BAND_B | BAND_G;
1684 } else { 1686 } else {
@@ -1703,10 +1705,12 @@ static int mwifiex_set_ibss_params(struct mwifiex_private *priv,
1703 } 1705 }
1704 } 1706 }
1705 1707
1706 if (params->channel_type != NL80211_CHAN_NO_HT) 1708 if (cfg80211_get_chandef_type(&params->chandef) !=
1709 NL80211_CHAN_NO_HT)
1707 config_bands |= BAND_GN; 1710 config_bands |= BAND_GN;
1708 } else { 1711 } else {
1709 if (params->channel_type == NL80211_CHAN_NO_HT) 1712 if (cfg80211_get_chandef_type(&params->chandef) !=
1713 NL80211_CHAN_NO_HT)
1710 config_bands = BAND_A; 1714 config_bands = BAND_A;
1711 else 1715 else
1712 config_bands = BAND_AN | BAND_A; 1716 config_bands = BAND_AN | BAND_A;
@@ -1723,9 +1727,10 @@ static int mwifiex_set_ibss_params(struct mwifiex_private *priv,
1723 } 1727 }
1724 1728
1725 adapter->sec_chan_offset = 1729 adapter->sec_chan_offset =
1726 mwifiex_chan_type_to_sec_chan_offset(params->channel_type); 1730 mwifiex_chan_type_to_sec_chan_offset(
1727 priv->adhoc_channel = 1731 cfg80211_get_chandef_type(&params->chandef));
1728 ieee80211_frequency_to_channel(params->channel->center_freq); 1732 priv->adhoc_channel = ieee80211_frequency_to_channel(
1733 params->chandef.chan->center_freq);
1729 1734
1730 wiphy_dbg(wiphy, "info: set ibss band %d, chan %d, chan offset %d\n", 1735 wiphy_dbg(wiphy, "info: set ibss band %d, chan %d, chan offset %d\n",
1731 config_bands, priv->adhoc_channel, adapter->sec_chan_offset); 1736 config_bands, priv->adhoc_channel, adapter->sec_chan_offset);
@@ -1759,7 +1764,8 @@ mwifiex_cfg80211_join_ibss(struct wiphy *wiphy, struct net_device *dev,
1759 1764
1760 ret = mwifiex_cfg80211_assoc(priv, params->ssid_len, params->ssid, 1765 ret = mwifiex_cfg80211_assoc(priv, params->ssid_len, params->ssid,
1761 params->bssid, priv->bss_mode, 1766 params->bssid, priv->bss_mode,
1762 params->channel, NULL, params->privacy); 1767 params->chandef.chan, NULL,
1768 params->privacy);
1763done: 1769done:
1764 if (!ret) { 1770 if (!ret) {
1765 cfg80211_ibss_joined(priv->netdev, priv->cfg_bssid, GFP_KERNEL); 1771 cfg80211_ibss_joined(priv->netdev, priv->cfg_bssid, GFP_KERNEL);
diff --git a/drivers/net/wireless/orinoco/cfg.c b/drivers/net/wireless/orinoco/cfg.c
index 7b751fba7e1f..d01edd2c50c5 100644
--- a/drivers/net/wireless/orinoco/cfg.c
+++ b/drivers/net/wireless/orinoco/cfg.c
@@ -161,24 +161,23 @@ static int orinoco_scan(struct wiphy *wiphy,
161} 161}
162 162
163static int orinoco_set_monitor_channel(struct wiphy *wiphy, 163static int orinoco_set_monitor_channel(struct wiphy *wiphy,
164 struct ieee80211_channel *chan, 164 struct cfg80211_chan_def *chandef)
165 enum nl80211_channel_type channel_type)
166{ 165{
167 struct orinoco_private *priv = wiphy_priv(wiphy); 166 struct orinoco_private *priv = wiphy_priv(wiphy);
168 int err = 0; 167 int err = 0;
169 unsigned long flags; 168 unsigned long flags;
170 int channel; 169 int channel;
171 170
172 if (!chan) 171 if (!chandef->chan)
173 return -EINVAL; 172 return -EINVAL;
174 173
175 if (channel_type != NL80211_CHAN_NO_HT) 174 if (cfg80211_get_chandef_type(chandef) != NL80211_CHAN_NO_HT)
176 return -EINVAL; 175 return -EINVAL;
177 176
178 if (chan->band != IEEE80211_BAND_2GHZ) 177 if (chandef->chan->band != IEEE80211_BAND_2GHZ)
179 return -EINVAL; 178 return -EINVAL;
180 179
181 channel = ieee80211_freq_to_dsss_chan(chan->center_freq); 180 channel = ieee80211_freq_to_dsss_chan(chandef->chan->center_freq);
182 181
183 if ((channel < 1) || (channel > NUM_CHANNELS) || 182 if ((channel < 1) || (channel > NUM_CHANNELS) ||
184 !(priv->channel_mask & (1 << (channel - 1)))) 183 !(priv->channel_mask & (1 << (channel - 1))))
diff --git a/drivers/net/wireless/rndis_wlan.c b/drivers/net/wireless/rndis_wlan.c
index 5390af36c064..abe1d039be81 100644
--- a/drivers/net/wireless/rndis_wlan.c
+++ b/drivers/net/wireless/rndis_wlan.c
@@ -2293,7 +2293,7 @@ static int rndis_join_ibss(struct wiphy *wiphy, struct net_device *dev,
2293{ 2293{
2294 struct rndis_wlan_private *priv = wiphy_priv(wiphy); 2294 struct rndis_wlan_private *priv = wiphy_priv(wiphy);
2295 struct usbnet *usbdev = priv->usbdev; 2295 struct usbnet *usbdev = priv->usbdev;
2296 struct ieee80211_channel *channel = params->channel; 2296 struct ieee80211_channel *channel = params->chandef.chan;
2297 struct ndis_80211_ssid ssid; 2297 struct ndis_80211_ssid ssid;
2298 enum nl80211_auth_type auth_type; 2298 enum nl80211_auth_type auth_type;
2299 int ret, alg, length, chan = -1; 2299 int ret, alg, length, chan = -1;