aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath6kl/cfg80211.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/ath/ath6kl/cfg80211.c')
-rw-r--r--drivers/net/wireless/ath/ath6kl/cfg80211.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c
index 752ffc4f4166..5c9736a94e54 100644
--- a/drivers/net/wireless/ath/ath6kl/cfg80211.c
+++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c
@@ -402,7 +402,7 @@ static bool ath6kl_is_valid_iftype(struct ath6kl *ar, enum nl80211_iftype type,
402 if (type == NL80211_IFTYPE_STATION || 402 if (type == NL80211_IFTYPE_STATION ||
403 type == NL80211_IFTYPE_AP || type == NL80211_IFTYPE_ADHOC) { 403 type == NL80211_IFTYPE_AP || type == NL80211_IFTYPE_ADHOC) {
404 for (i = 0; i < ar->vif_max; i++) { 404 for (i = 0; i < ar->vif_max; i++) {
405 if ((ar->avail_idx_map >> i) & BIT(0)) { 405 if ((ar->avail_idx_map) & BIT(i)) {
406 *if_idx = i; 406 *if_idx = i;
407 return true; 407 return true;
408 } 408 }
@@ -412,7 +412,7 @@ static bool ath6kl_is_valid_iftype(struct ath6kl *ar, enum nl80211_iftype type,
412 if (type == NL80211_IFTYPE_P2P_CLIENT || 412 if (type == NL80211_IFTYPE_P2P_CLIENT ||
413 type == NL80211_IFTYPE_P2P_GO) { 413 type == NL80211_IFTYPE_P2P_GO) {
414 for (i = ar->max_norm_iface; i < ar->vif_max; i++) { 414 for (i = ar->max_norm_iface; i < ar->vif_max; i++) {
415 if ((ar->avail_idx_map >> i) & BIT(0)) { 415 if ((ar->avail_idx_map) & BIT(i)) {
416 *if_idx = i; 416 *if_idx = i;
417 return true; 417 return true;
418 } 418 }
@@ -1535,7 +1535,9 @@ static int ath6kl_cfg80211_del_iface(struct wiphy *wiphy,
1535 1535
1536 ath6kl_cfg80211_vif_stop(vif, test_bit(WMI_READY, &ar->flag)); 1536 ath6kl_cfg80211_vif_stop(vif, test_bit(WMI_READY, &ar->flag));
1537 1537
1538 rtnl_lock();
1538 ath6kl_cfg80211_vif_cleanup(vif); 1539 ath6kl_cfg80211_vif_cleanup(vif);
1540 rtnl_unlock();
1539 1541
1540 return 0; 1542 return 0;
1541} 1543}
@@ -2990,13 +2992,15 @@ static int ath6kl_change_station(struct wiphy *wiphy, struct net_device *dev,
2990{ 2992{
2991 struct ath6kl *ar = ath6kl_priv(dev); 2993 struct ath6kl *ar = ath6kl_priv(dev);
2992 struct ath6kl_vif *vif = netdev_priv(dev); 2994 struct ath6kl_vif *vif = netdev_priv(dev);
2995 int err;
2993 2996
2994 if (vif->nw_type != AP_NETWORK) 2997 if (vif->nw_type != AP_NETWORK)
2995 return -EOPNOTSUPP; 2998 return -EOPNOTSUPP;
2996 2999
2997 /* Use this only for authorizing/unauthorizing a station */ 3000 err = cfg80211_check_station_change(wiphy, params,
2998 if (!(params->sta_flags_mask & BIT(NL80211_STA_FLAG_AUTHORIZED))) 3001 CFG80211_STA_AP_MLME_CLIENT);
2999 return -EOPNOTSUPP; 3002 if (err)
3003 return err;
3000 3004
3001 if (params->sta_flags_set & BIT(NL80211_STA_FLAG_AUTHORIZED)) 3005 if (params->sta_flags_set & BIT(NL80211_STA_FLAG_AUTHORIZED))
3002 return ath6kl_wmi_ap_set_mlme(ar->wmi, vif->fw_vif_idx, 3006 return ath6kl_wmi_ap_set_mlme(ar->wmi, vif->fw_vif_idx,
@@ -3659,7 +3663,6 @@ struct wireless_dev *ath6kl_interface_add(struct ath6kl *ar, const char *name,
3659 vif->sme_state = SME_DISCONNECTED; 3663 vif->sme_state = SME_DISCONNECTED;
3660 set_bit(WLAN_ENABLED, &vif->flags); 3664 set_bit(WLAN_ENABLED, &vif->flags);
3661 ar->wlan_pwr_state = WLAN_POWER_STATE_ON; 3665 ar->wlan_pwr_state = WLAN_POWER_STATE_ON;
3662 set_bit(NETDEV_REGISTERED, &vif->flags);
3663 3666
3664 if (type == NL80211_IFTYPE_ADHOC) 3667 if (type == NL80211_IFTYPE_ADHOC)
3665 ar->ibss_if_active = true; 3668 ar->ibss_if_active = true;