aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2012-11-26 14:46:41 -0500
committerJohn W. Linville <linville@tuxdriver.com>2012-11-26 14:46:41 -0500
commit62c8003ecb973986958e9dade4a7e598349caf48 (patch)
tree0e831639cd6449c2955234cfc37ef46481c788d1 /drivers
parente4cb3ff9311e0817e65cda7bc53898348aab7527 (diff)
parentec816087e8978b74c1bd5fae0e335dd97d964e9f (diff)
Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/ath/ath6kl/cfg80211.c27
-rw-r--r--drivers/net/wireless/ath/ath6kl/wmi.c5
-rw-r--r--drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c11
-rw-r--r--drivers/net/wireless/iwlwifi/dvm/dev.h1
-rw-r--r--drivers/net/wireless/iwlwifi/dvm/mac80211.c2
-rw-r--r--drivers/net/wireless/libertas/cfg.c24
-rw-r--r--drivers/net/wireless/mac80211_hwsim.c68
-rw-r--r--drivers/net/wireless/mwifiex/cfg80211.c46
-rw-r--r--drivers/net/wireless/mwifiex/main.h2
-rw-r--r--drivers/net/wireless/mwifiex/sta_event.c1
-rw-r--r--drivers/net/wireless/mwifiex/sta_ioctl.c3
-rw-r--r--drivers/net/wireless/orinoco/cfg.c11
-rw-r--r--drivers/net/wireless/rndis_wlan.c2
-rw-r--r--drivers/net/wireless/ti/wlcore/main.c9
14 files changed, 116 insertions, 96 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c
index 83d8c5eabbee..5516a8ccc3c6 100644
--- a/drivers/net/wireless/ath/ath6kl/cfg80211.c
+++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c
@@ -1074,15 +1074,18 @@ out:
1074void ath6kl_cfg80211_ch_switch_notify(struct ath6kl_vif *vif, int freq, 1074void ath6kl_cfg80211_ch_switch_notify(struct ath6kl_vif *vif, int freq,
1075 enum wmi_phy_mode mode) 1075 enum wmi_phy_mode mode)
1076{ 1076{
1077 enum nl80211_channel_type type; 1077 struct cfg80211_chan_def chandef;
1078 1078
1079 ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, 1079 ath6kl_dbg(ATH6KL_DBG_WLAN_CFG,
1080 "channel switch notify nw_type %d freq %d mode %d\n", 1080 "channel switch notify nw_type %d freq %d mode %d\n",
1081 vif->nw_type, freq, mode); 1081 vif->nw_type, freq, mode);
1082 1082
1083 type = (mode == WMI_11G_HT20) ? NL80211_CHAN_HT20 : NL80211_CHAN_NO_HT; 1083 cfg80211_chandef_create(&chandef,
1084 ieee80211_get_channel(vif->ar->wiphy, freq),
1085 (mode == WMI_11G_HT20) ?
1086 NL80211_CHAN_HT20 : NL80211_CHAN_NO_HT);
1084 1087
1085 cfg80211_ch_switch_notify(vif->ndev, freq, type); 1088 cfg80211_ch_switch_notify(vif->ndev, &chandef);
1086} 1089}
1087 1090
1088static int ath6kl_cfg80211_add_key(struct wiphy *wiphy, struct net_device *ndev, 1091static int ath6kl_cfg80211_add_key(struct wiphy *wiphy, struct net_device *ndev,
@@ -1594,8 +1597,8 @@ static int ath6kl_cfg80211_join_ibss(struct wiphy *wiphy,
1594 vif->ssid_len = ibss_param->ssid_len; 1597 vif->ssid_len = ibss_param->ssid_len;
1595 memcpy(vif->ssid, ibss_param->ssid, vif->ssid_len); 1598 memcpy(vif->ssid, ibss_param->ssid, vif->ssid_len);
1596 1599
1597 if (ibss_param->channel) 1600 if (ibss_param->chandef.chan)
1598 vif->ch_hint = ibss_param->channel->center_freq; 1601 vif->ch_hint = ibss_param->chandef.chan->center_freq;
1599 1602
1600 if (ibss_param->channel_fixed) { 1603 if (ibss_param->channel_fixed) {
1601 /* 1604 /*
@@ -2878,7 +2881,7 @@ static int ath6kl_start_ap(struct wiphy *wiphy, struct net_device *dev,
2878 p.ssid_len = vif->ssid_len; 2881 p.ssid_len = vif->ssid_len;
2879 memcpy(p.ssid, vif->ssid, vif->ssid_len); 2882 memcpy(p.ssid, vif->ssid, vif->ssid_len);
2880 p.dot11_auth_mode = vif->dot11_auth_mode; 2883 p.dot11_auth_mode = vif->dot11_auth_mode;
2881 p.ch = cpu_to_le16(info->channel->center_freq); 2884 p.ch = cpu_to_le16(info->chandef.chan->center_freq);
2882 2885
2883 /* Enable uAPSD support by default */ 2886 /* Enable uAPSD support by default */
2884 res = ath6kl_wmi_ap_set_apsd(ar->wmi, vif->fw_vif_idx, true); 2887 res = ath6kl_wmi_ap_set_apsd(ar->wmi, vif->fw_vif_idx, true);
@@ -2909,8 +2912,9 @@ static int ath6kl_start_ap(struct wiphy *wiphy, struct net_device *dev,
2909 return res; 2912 return res;
2910 } 2913 }
2911 2914
2912 if (ath6kl_set_htcap(vif, info->channel->band, 2915 if (ath6kl_set_htcap(vif, info->chandef.chan->band,
2913 info->channel_type != NL80211_CHAN_NO_HT)) 2916 cfg80211_get_chandef_type(&info->chandef)
2917 != NL80211_CHAN_NO_HT))
2914 return -EIO; 2918 return -EIO;
2915 2919
2916 /* 2920 /*
@@ -3006,7 +3010,6 @@ static int ath6kl_change_station(struct wiphy *wiphy, struct net_device *dev,
3006static int ath6kl_remain_on_channel(struct wiphy *wiphy, 3010static int ath6kl_remain_on_channel(struct wiphy *wiphy,
3007 struct wireless_dev *wdev, 3011 struct wireless_dev *wdev,
3008 struct ieee80211_channel *chan, 3012 struct ieee80211_channel *chan,
3009 enum nl80211_channel_type channel_type,
3010 unsigned int duration, 3013 unsigned int duration,
3011 u64 *cookie) 3014 u64 *cookie)
3012{ 3015{
@@ -3165,10 +3168,8 @@ static bool ath6kl_is_p2p_go_ssid(const u8 *buf, size_t len)
3165 3168
3166static int ath6kl_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev, 3169static int ath6kl_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
3167 struct ieee80211_channel *chan, bool offchan, 3170 struct ieee80211_channel *chan, bool offchan,
3168 enum nl80211_channel_type channel_type, 3171 unsigned int wait, const u8 *buf, size_t len,
3169 bool channel_type_valid, unsigned int wait, 3172 bool no_cck, bool dont_wait_for_ack, u64 *cookie)
3170 const u8 *buf, size_t len, bool no_cck,
3171 bool dont_wait_for_ack, u64 *cookie)
3172{ 3173{
3173 struct ath6kl_vif *vif = ath6kl_vif_from_wdev(wdev); 3174 struct ath6kl_vif *vif = ath6kl_vif_from_wdev(wdev);
3174 struct ath6kl *ar = ath6kl_priv(vif->ndev); 3175 struct ath6kl *ar = ath6kl_priv(vif->ndev);
diff --git a/drivers/net/wireless/ath/ath6kl/wmi.c b/drivers/net/wireless/ath/ath6kl/wmi.c
index 55ccf9770339..998f8b0f62fd 100644
--- a/drivers/net/wireless/ath/ath6kl/wmi.c
+++ b/drivers/net/wireless/ath/ath6kl/wmi.c
@@ -474,7 +474,7 @@ static int ath6kl_wmi_remain_on_chnl_event_rx(struct wmi *wmi, u8 *datap,
474 return -EINVAL; 474 return -EINVAL;
475 } 475 }
476 id = vif->last_roc_id; 476 id = vif->last_roc_id;
477 cfg80211_ready_on_channel(&vif->wdev, id, chan, NL80211_CHAN_NO_HT, 477 cfg80211_ready_on_channel(&vif->wdev, id, chan,
478 dur, GFP_ATOMIC); 478 dur, GFP_ATOMIC);
479 479
480 return 0; 480 return 0;
@@ -513,8 +513,7 @@ static int ath6kl_wmi_cancel_remain_on_chnl_event_rx(struct wmi *wmi,
513 else 513 else
514 id = vif->last_roc_id; /* timeout on uncanceled r-o-c */ 514 id = vif->last_roc_id; /* timeout on uncanceled r-o-c */
515 vif->last_cancel_roc_id = 0; 515 vif->last_cancel_roc_id = 0;
516 cfg80211_remain_on_channel_expired(&vif->wdev, id, chan, 516 cfg80211_remain_on_channel_expired(&vif->wdev, id, chan, GFP_ATOMIC);
517 NL80211_CHAN_NO_HT, GFP_ATOMIC);
518 517
519 return 0; 518 return 0;
520} 519}
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
index 769c134c6618..2044fdb55558 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
@@ -1013,8 +1013,8 @@ brcmf_cfg80211_join_ibss(struct wiphy *wiphy, struct net_device *ndev,
1013 else 1013 else
1014 WL_CONN("No BSSID specified\n"); 1014 WL_CONN("No BSSID specified\n");
1015 1015
1016 if (params->channel) 1016 if (params->chandef.chan)
1017 WL_CONN("channel: %d\n", params->channel->center_freq); 1017 WL_CONN("channel: %d\n", params->chandef.chan->center_freq);
1018 else 1018 else
1019 WL_CONN("no channel specified\n"); 1019 WL_CONN("no channel specified\n");
1020 1020
@@ -1087,12 +1087,12 @@ brcmf_cfg80211_join_ibss(struct wiphy *wiphy, struct net_device *ndev,
1087 } 1087 }
1088 1088
1089 /* Channel */ 1089 /* Channel */
1090 if (params->channel) { 1090 if (params->chandef.chan) {
1091 u32 target_channel; 1091 u32 target_channel;
1092 1092
1093 cfg->channel = 1093 cfg->channel =
1094 ieee80211_frequency_to_channel( 1094 ieee80211_frequency_to_channel(
1095 params->channel->center_freq); 1095 params->chandef.chan->center_freq);
1096 if (params->channel_fixed) { 1096 if (params->channel_fixed) {
1097 /* adding chanspec */ 1097 /* adding chanspec */
1098 brcmf_ch_to_chanspec(cfg->channel, 1098 brcmf_ch_to_chanspec(cfg->channel,
@@ -3506,7 +3506,8 @@ brcmf_cfg80211_start_ap(struct wiphy *wiphy, struct net_device *ndev,
3506 s32 bssidx = 0; 3506 s32 bssidx = 0;
3507 3507
3508 WL_TRACE("channel_type=%d, beacon_interval=%d, dtim_period=%d,\n", 3508 WL_TRACE("channel_type=%d, beacon_interval=%d, dtim_period=%d,\n",
3509 settings->channel_type, settings->beacon_interval, 3509 cfg80211_get_chandef_type(&settings->chandef),
3510 settings->beacon_interval,
3510 settings->dtim_period); 3511 settings->dtim_period);
3511 WL_TRACE("ssid=%s(%zu), auth_type=%d, inactivity_timeout=%d\n", 3512 WL_TRACE("ssid=%s(%zu), auth_type=%d, inactivity_timeout=%d\n",
3512 settings->ssid, settings->ssid_len, settings->auth_type, 3513 settings->ssid, settings->ssid_len, settings->auth_type,
diff --git a/drivers/net/wireless/iwlwifi/dvm/dev.h b/drivers/net/wireless/iwlwifi/dvm/dev.h
index 8141f91c3725..29c571a56251 100644
--- a/drivers/net/wireless/iwlwifi/dvm/dev.h
+++ b/drivers/net/wireless/iwlwifi/dvm/dev.h
@@ -789,7 +789,6 @@ struct iwl_priv {
789 /* remain-on-channel offload support */ 789 /* remain-on-channel offload support */
790 struct ieee80211_channel *hw_roc_channel; 790 struct ieee80211_channel *hw_roc_channel;
791 struct delayed_work hw_roc_disable_work; 791 struct delayed_work hw_roc_disable_work;
792 enum nl80211_channel_type hw_roc_chantype;
793 int hw_roc_duration; 792 int hw_roc_duration;
794 bool hw_roc_setup, hw_roc_start_notified; 793 bool hw_roc_setup, hw_roc_start_notified;
795 794
diff --git a/drivers/net/wireless/iwlwifi/dvm/mac80211.c b/drivers/net/wireless/iwlwifi/dvm/mac80211.c
index 932ad357edbd..fb959b00b208 100644
--- a/drivers/net/wireless/iwlwifi/dvm/mac80211.c
+++ b/drivers/net/wireless/iwlwifi/dvm/mac80211.c
@@ -1037,7 +1037,6 @@ done:
1037static int iwlagn_mac_remain_on_channel(struct ieee80211_hw *hw, 1037static int iwlagn_mac_remain_on_channel(struct ieee80211_hw *hw,
1038 struct ieee80211_vif *vif, 1038 struct ieee80211_vif *vif,
1039 struct ieee80211_channel *channel, 1039 struct ieee80211_channel *channel,
1040 enum nl80211_channel_type channel_type,
1041 int duration) 1040 int duration)
1042{ 1041{
1043 struct iwl_priv *priv = IWL_MAC80211_GET_DVM(hw); 1042 struct iwl_priv *priv = IWL_MAC80211_GET_DVM(hw);
@@ -1069,7 +1068,6 @@ static int iwlagn_mac_remain_on_channel(struct ieee80211_hw *hw,
1069 } 1068 }
1070 1069
1071 priv->hw_roc_channel = channel; 1070 priv->hw_roc_channel = channel;
1072 priv->hw_roc_chantype = channel_type;
1073 /* convert from ms to TU */ 1071 /* convert from ms to TU */
1074 priv->hw_roc_duration = DIV_ROUND_UP(1000 * duration, 1024); 1072 priv->hw_roc_duration = DIV_ROUND_UP(1000 * duration, 1024);
1075 priv->hw_roc_start_notified = false; 1073 priv->hw_roc_start_notified = false;
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/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
index 3baa51f1bb83..2aa8a1aa1184 100644
--- a/drivers/net/wireless/mac80211_hwsim.c
+++ b/drivers/net/wireless/mac80211_hwsim.c
@@ -681,7 +681,7 @@ static void mac80211_hwsim_tx_iter(void *_data, u8 *addr,
681 return; 681 return;
682 682
683 if (!hwsim_chans_compat(data->channel, 683 if (!hwsim_chans_compat(data->channel,
684 rcu_dereference(vif->chanctx_conf)->channel)) 684 rcu_dereference(vif->chanctx_conf)->def.chan))
685 return; 685 return;
686 686
687 data->receive = true; 687 data->receive = true;
@@ -832,7 +832,7 @@ static void mac80211_hwsim_tx(struct ieee80211_hw *hw,
832 } else { 832 } else {
833 chanctx_conf = rcu_dereference(txi->control.vif->chanctx_conf); 833 chanctx_conf = rcu_dereference(txi->control.vif->chanctx_conf);
834 if (chanctx_conf) 834 if (chanctx_conf)
835 channel = chanctx_conf->channel; 835 channel = chanctx_conf->def.chan;
836 else 836 else
837 channel = NULL; 837 channel = NULL;
838 } 838 }
@@ -977,7 +977,7 @@ static void mac80211_hwsim_beacon_tx(void *arg, u8 *mac,
977 return; 977 return;
978 978
979 mac80211_hwsim_tx_frame(hw, skb, 979 mac80211_hwsim_tx_frame(hw, skb,
980 rcu_dereference(vif->chanctx_conf)->channel); 980 rcu_dereference(vif->chanctx_conf)->def.chan);
981} 981}
982 982
983 983
@@ -1107,9 +1107,8 @@ static void mac80211_hwsim_bss_info_changed(struct ieee80211_hw *hw,
1107 } 1107 }
1108 1108
1109 if (changed & BSS_CHANGED_HT) { 1109 if (changed & BSS_CHANGED_HT) {
1110 wiphy_debug(hw->wiphy, " HT: op_mode=0x%x, chantype=%s\n", 1110 wiphy_debug(hw->wiphy, " HT: op_mode=0x%x\n",
1111 info->ht_operation_mode, 1111 info->ht_operation_mode);
1112 hwsim_chantypes[info->channel_type]);
1113 } 1112 }
1114 1113
1115 if (changed & BSS_CHANGED_BASIC_RATES) { 1114 if (changed & BSS_CHANGED_BASIC_RATES) {
@@ -1368,7 +1367,6 @@ static int mac80211_hwsim_hw_scan(struct ieee80211_hw *hw,
1368 struct cfg80211_scan_request *req) 1367 struct cfg80211_scan_request *req)
1369{ 1368{
1370 struct mac80211_hwsim_data *hwsim = hw->priv; 1369 struct mac80211_hwsim_data *hwsim = hw->priv;
1371 int i;
1372 1370
1373 mutex_lock(&hwsim->mutex); 1371 mutex_lock(&hwsim->mutex);
1374 if (WARN_ON(hwsim->tmp_chan || hwsim->hw_scan_request)) { 1372 if (WARN_ON(hwsim->tmp_chan || hwsim->hw_scan_request)) {
@@ -1381,11 +1379,6 @@ static int mac80211_hwsim_hw_scan(struct ieee80211_hw *hw,
1381 mutex_unlock(&hwsim->mutex); 1379 mutex_unlock(&hwsim->mutex);
1382 1380
1383 wiphy_debug(hw->wiphy, "hwsim hw_scan request\n"); 1381 wiphy_debug(hw->wiphy, "hwsim hw_scan request\n");
1384 for (i = 0; i < req->n_channels; i++)
1385 printk(KERN_DEBUG "hwsim hw_scan freq %d\n",
1386 req->channels[i]->center_freq);
1387 print_hex_dump(KERN_DEBUG, "scan IEs: ", DUMP_PREFIX_OFFSET,
1388 16, 1, req->ie, req->ie_len, 1);
1389 1382
1390 ieee80211_queue_delayed_work(hwsim->hw, &hwsim->hw_scan, 0); 1383 ieee80211_queue_delayed_work(hwsim->hw, &hwsim->hw_scan, 0);
1391 1384
@@ -1455,7 +1448,6 @@ static void hw_roc_done(struct work_struct *work)
1455static int mac80211_hwsim_roc(struct ieee80211_hw *hw, 1448static int mac80211_hwsim_roc(struct ieee80211_hw *hw,
1456 struct ieee80211_vif *vif, 1449 struct ieee80211_vif *vif,
1457 struct ieee80211_channel *chan, 1450 struct ieee80211_channel *chan,
1458 enum nl80211_channel_type channel_type,
1459 int duration) 1451 int duration)
1460{ 1452{
1461 struct mac80211_hwsim_data *hwsim = hw->priv; 1453 struct mac80211_hwsim_data *hwsim = hw->priv;
@@ -1498,16 +1490,20 @@ static int mac80211_hwsim_add_chanctx(struct ieee80211_hw *hw,
1498 struct ieee80211_chanctx_conf *ctx) 1490 struct ieee80211_chanctx_conf *ctx)
1499{ 1491{
1500 hwsim_set_chanctx_magic(ctx); 1492 hwsim_set_chanctx_magic(ctx);
1501 wiphy_debug(hw->wiphy, "add channel context %d MHz/%d\n", 1493 wiphy_debug(hw->wiphy,
1502 ctx->channel->center_freq, ctx->channel_type); 1494 "add channel context control: %d MHz/width: %d/cfreqs:%d/%d MHz\n",
1495 ctx->def.chan->center_freq, ctx->def.width,
1496 ctx->def.center_freq1, ctx->def.center_freq2);
1503 return 0; 1497 return 0;
1504} 1498}
1505 1499
1506static void mac80211_hwsim_remove_chanctx(struct ieee80211_hw *hw, 1500static void mac80211_hwsim_remove_chanctx(struct ieee80211_hw *hw,
1507 struct ieee80211_chanctx_conf *ctx) 1501 struct ieee80211_chanctx_conf *ctx)
1508{ 1502{
1509 wiphy_debug(hw->wiphy, "remove channel context %d MHz/%d\n", 1503 wiphy_debug(hw->wiphy,
1510 ctx->channel->center_freq, ctx->channel_type); 1504 "remove channel context control: %d MHz/width: %d/cfreqs:%d/%d MHz\n",
1505 ctx->def.chan->center_freq, ctx->def.width,
1506 ctx->def.center_freq1, ctx->def.center_freq2);
1511 hwsim_check_chanctx_magic(ctx); 1507 hwsim_check_chanctx_magic(ctx);
1512 hwsim_clear_chanctx_magic(ctx); 1508 hwsim_clear_chanctx_magic(ctx);
1513} 1509}
@@ -1517,8 +1513,10 @@ static void mac80211_hwsim_change_chanctx(struct ieee80211_hw *hw,
1517 u32 changed) 1513 u32 changed)
1518{ 1514{
1519 hwsim_check_chanctx_magic(ctx); 1515 hwsim_check_chanctx_magic(ctx);
1520 wiphy_debug(hw->wiphy, "change channel context %#x (%d MHz/%d)\n", 1516 wiphy_debug(hw->wiphy,
1521 changed, ctx->channel->center_freq, ctx->channel_type); 1517 "change channel context control: %d MHz/width: %d/cfreqs:%d/%d MHz\n",
1518 ctx->def.chan->center_freq, ctx->def.width,
1519 ctx->def.center_freq1, ctx->def.center_freq2);
1522} 1520}
1523 1521
1524static int mac80211_hwsim_assign_vif_chanctx(struct ieee80211_hw *hw, 1522static int mac80211_hwsim_assign_vif_chanctx(struct ieee80211_hw *hw,
@@ -1640,7 +1638,7 @@ static void hwsim_send_ps_poll(void *dat, u8 *mac, struct ieee80211_vif *vif)
1640 1638
1641 rcu_read_lock(); 1639 rcu_read_lock();
1642 mac80211_hwsim_tx_frame(data->hw, skb, 1640 mac80211_hwsim_tx_frame(data->hw, skb,
1643 rcu_dereference(vif->chanctx_conf)->channel); 1641 rcu_dereference(vif->chanctx_conf)->def.chan);
1644 rcu_read_unlock(); 1642 rcu_read_unlock();
1645} 1643}
1646 1644
@@ -1672,7 +1670,7 @@ static void hwsim_send_nullfunc(struct mac80211_hwsim_data *data, u8 *mac,
1672 1670
1673 rcu_read_lock(); 1671 rcu_read_lock();
1674 mac80211_hwsim_tx_frame(data->hw, skb, 1672 mac80211_hwsim_tx_frame(data->hw, skb,
1675 rcu_dereference(vif->chanctx_conf)->channel); 1673 rcu_dereference(vif->chanctx_conf)->def.chan);
1676 rcu_read_unlock(); 1674 rcu_read_unlock();
1677} 1675}
1678 1676
@@ -2204,6 +2202,34 @@ static int __init init_mac80211_hwsim(void)
2204 sband->ht_cap.mcs.tx_params = IEEE80211_HT_MCS_TX_DEFINED; 2202 sband->ht_cap.mcs.tx_params = IEEE80211_HT_MCS_TX_DEFINED;
2205 2203
2206 hw->wiphy->bands[band] = sband; 2204 hw->wiphy->bands[band] = sband;
2205
2206 if (channels == 1)
2207 continue;
2208
2209 sband->vht_cap.vht_supported = true;
2210 sband->vht_cap.cap =
2211 IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_11454 |
2212 IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160_80PLUS80MHZ |
2213 IEEE80211_VHT_CAP_RXLDPC |
2214 IEEE80211_VHT_CAP_SHORT_GI_80 |
2215 IEEE80211_VHT_CAP_SHORT_GI_160 |
2216 IEEE80211_VHT_CAP_TXSTBC |
2217 IEEE80211_VHT_CAP_RXSTBC_1 |
2218 IEEE80211_VHT_CAP_RXSTBC_2 |
2219 IEEE80211_VHT_CAP_RXSTBC_3 |
2220 IEEE80211_VHT_CAP_RXSTBC_4 |
2221 IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT;
2222 sband->vht_cap.vht_mcs.rx_mcs_map =
2223 cpu_to_le16(IEEE80211_VHT_MCS_SUPPORT_0_8 << 0 |
2224 IEEE80211_VHT_MCS_SUPPORT_0_8 << 2 |
2225 IEEE80211_VHT_MCS_SUPPORT_0_9 << 4 |
2226 IEEE80211_VHT_MCS_SUPPORT_0_8 << 6 |
2227 IEEE80211_VHT_MCS_SUPPORT_0_8 << 8 |
2228 IEEE80211_VHT_MCS_SUPPORT_0_9 << 10 |
2229 IEEE80211_VHT_MCS_SUPPORT_0_9 << 12 |
2230 IEEE80211_VHT_MCS_SUPPORT_0_8 << 14);
2231 sband->vht_cap.vht_mcs.tx_mcs_map =
2232 sband->vht_cap.vht_mcs.rx_mcs_map;
2207 } 2233 }
2208 /* By default all radios are belonging to the first group */ 2234 /* By default all radios are belonging to the first group */
2209 data->group = 1; 2235 data->group = 1;
diff --git a/drivers/net/wireless/mwifiex/cfg80211.c b/drivers/net/wireless/mwifiex/cfg80211.c
index 41be319665eb..3b1c27712ad9 100644
--- a/drivers/net/wireless/mwifiex/cfg80211.c
+++ b/drivers/net/wireless/mwifiex/cfg80211.c
@@ -180,10 +180,8 @@ mwifiex_form_mgmt_frame(struct sk_buff *skb, const u8 *buf, size_t len)
180static int 180static int
181mwifiex_cfg80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev, 181mwifiex_cfg80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
182 struct ieee80211_channel *chan, bool offchan, 182 struct ieee80211_channel *chan, bool offchan,
183 enum nl80211_channel_type channel_type, 183 unsigned int wait, const u8 *buf, size_t len,
184 bool channel_type_valid, unsigned int wait, 184 bool no_cck, bool dont_wait_for_ack, u64 *cookie)
185 const u8 *buf, size_t len, bool no_cck,
186 bool dont_wait_for_ack, u64 *cookie)
187{ 185{
188 struct sk_buff *skb; 186 struct sk_buff *skb;
189 u16 pkt_len; 187 u16 pkt_len;
@@ -253,7 +251,6 @@ static int
253mwifiex_cfg80211_remain_on_channel(struct wiphy *wiphy, 251mwifiex_cfg80211_remain_on_channel(struct wiphy *wiphy,
254 struct wireless_dev *wdev, 252 struct wireless_dev *wdev,
255 struct ieee80211_channel *chan, 253 struct ieee80211_channel *chan,
256 enum nl80211_channel_type channel_type,
257 unsigned int duration, u64 *cookie) 254 unsigned int duration, u64 *cookie)
258{ 255{
259 struct mwifiex_private *priv = mwifiex_netdev_get_priv(wdev->netdev); 256 struct mwifiex_private *priv = mwifiex_netdev_get_priv(wdev->netdev);
@@ -271,15 +268,14 @@ mwifiex_cfg80211_remain_on_channel(struct wiphy *wiphy,
271 } 268 }
272 269
273 ret = mwifiex_remain_on_chan_cfg(priv, HostCmd_ACT_GEN_SET, chan, 270 ret = mwifiex_remain_on_chan_cfg(priv, HostCmd_ACT_GEN_SET, chan,
274 &channel_type, duration); 271 duration);
275 272
276 if (!ret) { 273 if (!ret) {
277 *cookie = random32() | 1; 274 *cookie = random32() | 1;
278 priv->roc_cfg.cookie = *cookie; 275 priv->roc_cfg.cookie = *cookie;
279 priv->roc_cfg.chan = *chan; 276 priv->roc_cfg.chan = *chan;
280 priv->roc_cfg.chan_type = channel_type;
281 277
282 cfg80211_ready_on_channel(wdev, *cookie, chan, channel_type, 278 cfg80211_ready_on_channel(wdev, *cookie, chan,
283 duration, GFP_ATOMIC); 279 duration, GFP_ATOMIC);
284 280
285 wiphy_dbg(wiphy, "info: ROC, cookie = 0x%llx\n", *cookie); 281 wiphy_dbg(wiphy, "info: ROC, cookie = 0x%llx\n", *cookie);
@@ -302,13 +298,11 @@ mwifiex_cfg80211_cancel_remain_on_channel(struct wiphy *wiphy,
302 return -ENOENT; 298 return -ENOENT;
303 299
304 ret = mwifiex_remain_on_chan_cfg(priv, HostCmd_ACT_GEN_REMOVE, 300 ret = mwifiex_remain_on_chan_cfg(priv, HostCmd_ACT_GEN_REMOVE,
305 &priv->roc_cfg.chan, 301 &priv->roc_cfg.chan, 0);
306 &priv->roc_cfg.chan_type, 0);
307 302
308 if (!ret) { 303 if (!ret) {
309 cfg80211_remain_on_channel_expired(wdev, cookie, 304 cfg80211_remain_on_channel_expired(wdev, cookie,
310 &priv->roc_cfg.chan, 305 &priv->roc_cfg.chan,
311 priv->roc_cfg.chan_type,
312 GFP_ATOMIC); 306 GFP_ATOMIC);
313 307
314 memset(&priv->roc_cfg, 0, sizeof(struct mwifiex_roc_cfg)); 308 memset(&priv->roc_cfg, 0, sizeof(struct mwifiex_roc_cfg));
@@ -1297,21 +1291,23 @@ static int mwifiex_cfg80211_start_ap(struct wiphy *wiphy,
1297 return -EINVAL; 1291 return -EINVAL;
1298 } 1292 }
1299 1293
1300 bss_cfg->channel = 1294 bss_cfg->channel = ieee80211_frequency_to_channel(
1301 (u8)ieee80211_frequency_to_channel(params->channel->center_freq); 1295 params->chandef.chan->center_freq);
1302 1296
1303 /* Set appropriate bands */ 1297 /* Set appropriate bands */
1304 if (params->channel->band == IEEE80211_BAND_2GHZ) { 1298 if (params->chandef.chan->band == IEEE80211_BAND_2GHZ) {
1305 bss_cfg->band_cfg = BAND_CONFIG_BG; 1299 bss_cfg->band_cfg = BAND_CONFIG_BG;
1306 1300
1307 if (params->channel_type == NL80211_CHAN_NO_HT) 1301 if (cfg80211_get_chandef_type(&params->chandef) ==
1302 NL80211_CHAN_NO_HT)
1308 config_bands = BAND_B | BAND_G; 1303 config_bands = BAND_B | BAND_G;
1309 else 1304 else
1310 config_bands = BAND_B | BAND_G | BAND_GN; 1305 config_bands = BAND_B | BAND_G | BAND_GN;
1311 } else { 1306 } else {
1312 bss_cfg->band_cfg = BAND_CONFIG_A; 1307 bss_cfg->band_cfg = BAND_CONFIG_A;
1313 1308
1314 if (params->channel_type == NL80211_CHAN_NO_HT) 1309 if (cfg80211_get_chandef_type(&params->chandef) ==
1310 NL80211_CHAN_NO_HT)
1315 config_bands = BAND_A; 1311 config_bands = BAND_A;
1316 else 1312 else
1317 config_bands = BAND_AN | BAND_A; 1313 config_bands = BAND_AN | BAND_A;
@@ -1684,7 +1680,7 @@ static int mwifiex_set_ibss_params(struct mwifiex_private *priv,
1684 int index = 0, i; 1680 int index = 0, i;
1685 u8 config_bands = 0; 1681 u8 config_bands = 0;
1686 1682
1687 if (params->channel->band == IEEE80211_BAND_2GHZ) { 1683 if (params->chandef.chan->band == IEEE80211_BAND_2GHZ) {
1688 if (!params->basic_rates) { 1684 if (!params->basic_rates) {
1689 config_bands = BAND_B | BAND_G; 1685 config_bands = BAND_B | BAND_G;
1690 } else { 1686 } else {
@@ -1709,10 +1705,12 @@ static int mwifiex_set_ibss_params(struct mwifiex_private *priv,
1709 } 1705 }
1710 } 1706 }
1711 1707
1712 if (params->channel_type != NL80211_CHAN_NO_HT) 1708 if (cfg80211_get_chandef_type(&params->chandef) !=
1709 NL80211_CHAN_NO_HT)
1713 config_bands |= BAND_GN; 1710 config_bands |= BAND_GN;
1714 } else { 1711 } else {
1715 if (params->channel_type == NL80211_CHAN_NO_HT) 1712 if (cfg80211_get_chandef_type(&params->chandef) !=
1713 NL80211_CHAN_NO_HT)
1716 config_bands = BAND_A; 1714 config_bands = BAND_A;
1717 else 1715 else
1718 config_bands = BAND_AN | BAND_A; 1716 config_bands = BAND_AN | BAND_A;
@@ -1729,9 +1727,10 @@ static int mwifiex_set_ibss_params(struct mwifiex_private *priv,
1729 } 1727 }
1730 1728
1731 adapter->sec_chan_offset = 1729 adapter->sec_chan_offset =
1732 mwifiex_chan_type_to_sec_chan_offset(params->channel_type); 1730 mwifiex_chan_type_to_sec_chan_offset(
1733 priv->adhoc_channel = 1731 cfg80211_get_chandef_type(&params->chandef));
1734 ieee80211_frequency_to_channel(params->channel->center_freq); 1732 priv->adhoc_channel = ieee80211_frequency_to_channel(
1733 params->chandef.chan->center_freq);
1735 1734
1736 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",
1737 config_bands, priv->adhoc_channel, adapter->sec_chan_offset); 1736 config_bands, priv->adhoc_channel, adapter->sec_chan_offset);
@@ -1765,7 +1764,8 @@ mwifiex_cfg80211_join_ibss(struct wiphy *wiphy, struct net_device *dev,
1765 1764
1766 ret = mwifiex_cfg80211_assoc(priv, params->ssid_len, params->ssid, 1765 ret = mwifiex_cfg80211_assoc(priv, params->ssid_len, params->ssid,
1767 params->bssid, priv->bss_mode, 1766 params->bssid, priv->bss_mode,
1768 params->channel, NULL, params->privacy); 1767 params->chandef.chan, NULL,
1768 params->privacy);
1769done: 1769done:
1770 if (!ret) { 1770 if (!ret) {
1771 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/mwifiex/main.h b/drivers/net/wireless/mwifiex/main.h
index db57dd430e92..1b3cfc821940 100644
--- a/drivers/net/wireless/mwifiex/main.h
+++ b/drivers/net/wireless/mwifiex/main.h
@@ -371,7 +371,6 @@ struct wps {
371struct mwifiex_roc_cfg { 371struct mwifiex_roc_cfg {
372 u64 cookie; 372 u64 cookie;
373 struct ieee80211_channel chan; 373 struct ieee80211_channel chan;
374 enum nl80211_channel_type chan_type;
375}; 374};
376 375
377struct mwifiex_adapter; 376struct mwifiex_adapter;
@@ -1018,7 +1017,6 @@ int mwifiex_get_ver_ext(struct mwifiex_private *priv);
1018 1017
1019int mwifiex_remain_on_chan_cfg(struct mwifiex_private *priv, u16 action, 1018int mwifiex_remain_on_chan_cfg(struct mwifiex_private *priv, u16 action,
1020 struct ieee80211_channel *chan, 1019 struct ieee80211_channel *chan,
1021 enum nl80211_channel_type *channel_type,
1022 unsigned int duration); 1020 unsigned int duration);
1023 1021
1024int mwifiex_set_bss_role(struct mwifiex_private *priv, u8 bss_role); 1022int mwifiex_set_bss_role(struct mwifiex_private *priv, u8 bss_role);
diff --git a/drivers/net/wireless/mwifiex/sta_event.c b/drivers/net/wireless/mwifiex/sta_event.c
index 5b0d71969ba7..41aafc7454ed 100644
--- a/drivers/net/wireless/mwifiex/sta_event.c
+++ b/drivers/net/wireless/mwifiex/sta_event.c
@@ -421,7 +421,6 @@ int mwifiex_process_sta_event(struct mwifiex_private *priv)
421 cfg80211_remain_on_channel_expired(priv->wdev, 421 cfg80211_remain_on_channel_expired(priv->wdev,
422 priv->roc_cfg.cookie, 422 priv->roc_cfg.cookie,
423 &priv->roc_cfg.chan, 423 &priv->roc_cfg.chan,
424 priv->roc_cfg.chan_type,
425 GFP_ATOMIC); 424 GFP_ATOMIC);
426 425
427 memset(&priv->roc_cfg, 0x00, sizeof(struct mwifiex_roc_cfg)); 426 memset(&priv->roc_cfg, 0x00, sizeof(struct mwifiex_roc_cfg));
diff --git a/drivers/net/wireless/mwifiex/sta_ioctl.c b/drivers/net/wireless/mwifiex/sta_ioctl.c
index c8b50c70a03d..237c8d2ba9f2 100644
--- a/drivers/net/wireless/mwifiex/sta_ioctl.c
+++ b/drivers/net/wireless/mwifiex/sta_ioctl.c
@@ -1044,7 +1044,6 @@ mwifiex_get_ver_ext(struct mwifiex_private *priv)
1044int 1044int
1045mwifiex_remain_on_chan_cfg(struct mwifiex_private *priv, u16 action, 1045mwifiex_remain_on_chan_cfg(struct mwifiex_private *priv, u16 action,
1046 struct ieee80211_channel *chan, 1046 struct ieee80211_channel *chan,
1047 enum nl80211_channel_type *ct,
1048 unsigned int duration) 1047 unsigned int duration)
1049{ 1048{
1050 struct host_cmd_ds_remain_on_chan roc_cfg; 1049 struct host_cmd_ds_remain_on_chan roc_cfg;
@@ -1054,7 +1053,7 @@ mwifiex_remain_on_chan_cfg(struct mwifiex_private *priv, u16 action,
1054 roc_cfg.action = cpu_to_le16(action); 1053 roc_cfg.action = cpu_to_le16(action);
1055 if (action == HostCmd_ACT_GEN_SET) { 1054 if (action == HostCmd_ACT_GEN_SET) {
1056 roc_cfg.band_cfg = chan->band; 1055 roc_cfg.band_cfg = chan->band;
1057 sc = mwifiex_chan_type_to_sec_chan_offset(*ct); 1056 sc = mwifiex_chan_type_to_sec_chan_offset(NL80211_CHAN_NO_HT);
1058 roc_cfg.band_cfg |= (sc << 2); 1057 roc_cfg.band_cfg |= (sc << 2);
1059 1058
1060 roc_cfg.channel = 1059 roc_cfg.channel =
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;
diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c
index 380cf1ff6cd1..4f1a05b92d2d 100644
--- a/drivers/net/wireless/ti/wlcore/main.c
+++ b/drivers/net/wireless/ti/wlcore/main.c
@@ -3791,7 +3791,7 @@ static void wl1271_bss_info_changed_ap(struct wl1271 *wl,
3791 3791
3792 /* Handle HT information change */ 3792 /* Handle HT information change */
3793 if ((changed & BSS_CHANGED_HT) && 3793 if ((changed & BSS_CHANGED_HT) &&
3794 (bss_conf->channel_type != NL80211_CHAN_NO_HT)) { 3794 (bss_conf->chandef.width != NL80211_CHAN_WIDTH_20_NOHT)) {
3795 ret = wl1271_acx_set_ht_information(wl, wlvif, 3795 ret = wl1271_acx_set_ht_information(wl, wlvif,
3796 bss_conf->ht_operation_mode); 3796 bss_conf->ht_operation_mode);
3797 if (ret < 0) { 3797 if (ret < 0) {
@@ -3905,7 +3905,8 @@ sta_not_found:
3905 u32 rates; 3905 u32 rates;
3906 int ieoffset; 3906 int ieoffset;
3907 wlvif->aid = bss_conf->aid; 3907 wlvif->aid = bss_conf->aid;
3908 wlvif->channel_type = bss_conf->channel_type; 3908 wlvif->channel_type =
3909 cfg80211_get_chandef_type(&bss_conf->chandef);
3909 wlvif->beacon_int = bss_conf->beacon_int; 3910 wlvif->beacon_int = bss_conf->beacon_int;
3910 do_join = true; 3911 do_join = true;
3911 set_assoc = true; 3912 set_assoc = true;
@@ -4071,7 +4072,7 @@ sta_not_found:
4071 /* Handle new association with HT. Do this after join. */ 4072 /* Handle new association with HT. Do this after join. */
4072 if (sta_exists) { 4073 if (sta_exists) {
4073 if ((changed & BSS_CHANGED_HT) && 4074 if ((changed & BSS_CHANGED_HT) &&
4074 (bss_conf->channel_type != NL80211_CHAN_NO_HT)) { 4075 (bss_conf->chandef.width != NL80211_CHAN_WIDTH_20_NOHT)) {
4075 ret = wl1271_acx_set_ht_capabilities(wl, 4076 ret = wl1271_acx_set_ht_capabilities(wl,
4076 &sta_ht_cap, 4077 &sta_ht_cap,
4077 true, 4078 true,
@@ -4098,7 +4099,7 @@ sta_not_found:
4098 4099
4099 /* Handle HT information change. Done after join. */ 4100 /* Handle HT information change. Done after join. */
4100 if ((changed & BSS_CHANGED_HT) && 4101 if ((changed & BSS_CHANGED_HT) &&
4101 (bss_conf->channel_type != NL80211_CHAN_NO_HT)) { 4102 (bss_conf->chandef.width != NL80211_CHAN_WIDTH_20_NOHT)) {
4102 ret = wl1271_acx_set_ht_information(wl, wlvif, 4103 ret = wl1271_acx_set_ht_information(wl, wlvif,
4103 bss_conf->ht_operation_mode); 4104 bss_conf->ht_operation_mode);
4104 if (ret < 0) { 4105 if (ret < 0) {