tree-wide: replace config_enabled() with IS_ENABLED()
[cascardo/linux.git] / drivers / net / wireless / ath / ath6kl / cfg80211.c
index 4e11ba0..72e2ec6 100644 (file)
@@ -847,8 +847,6 @@ static int ath6kl_cfg80211_disconnect(struct wiphy *wiphy,
 
        up(&ar->sem);
 
-       vif->sme_state = SME_DISCONNECTED;
-
        return 0;
 }
 
@@ -859,7 +857,11 @@ void ath6kl_cfg80211_disconnect_event(struct ath6kl_vif *vif, u8 reason,
        struct ath6kl *ar = vif->ar;
 
        if (vif->scan_req) {
-               cfg80211_scan_done(vif->scan_req, true);
+               struct cfg80211_scan_info info = {
+                       .aborted = true,
+               };
+
+               cfg80211_scan_done(vif->scan_req, &info);
                vif->scan_req = NULL;
        }
 
@@ -1069,6 +1071,9 @@ static int ath6kl_cfg80211_scan(struct wiphy *wiphy,
 void ath6kl_cfg80211_scan_complete_event(struct ath6kl_vif *vif, bool aborted)
 {
        struct ath6kl *ar = vif->ar;
+       struct cfg80211_scan_info info = {
+               .aborted = aborted,
+       };
        int i;
 
        ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, "%s: status%s\n", __func__,
@@ -1089,7 +1094,7 @@ void ath6kl_cfg80211_scan_complete_event(struct ath6kl_vif *vif, bool aborted)
        }
 
 out:
-       cfg80211_scan_done(vif->scan_req, aborted);
+       cfg80211_scan_done(vif->scan_req, &info);
        vif->scan_req = NULL;
 }
 
@@ -1104,7 +1109,8 @@ void ath6kl_cfg80211_ch_switch_notify(struct ath6kl_vif *vif, int freq,
 
        cfg80211_chandef_create(&chandef,
                                ieee80211_get_channel(vif->ar->wiphy, freq),
-                               (mode == WMI_11G_HT20) ?
+                               (mode == WMI_11G_HT20 &&
+                                ath6kl_band_2ghz.ht_cap.ht_supported) ?
                                        NL80211_CHAN_HT20 : NL80211_CHAN_NO_HT);
 
        mutex_lock(&vif->wdev.mtx);
@@ -2971,6 +2977,7 @@ static int ath6kl_stop_ap(struct wiphy *wiphy, struct net_device *dev)
 
        ath6kl_wmi_disconnect_cmd(ar->wmi, vif->fw_vif_idx);
        clear_bit(CONNECTED, &vif->flags);
+       netif_carrier_off(vif->ndev);
 
        /* Restore ht setting in firmware */
        return ath6kl_restore_htcap(vif);
@@ -3614,7 +3621,11 @@ void ath6kl_cfg80211_vif_stop(struct ath6kl_vif *vif, bool wmi_ready)
        }
 
        if (vif->scan_req) {
-               cfg80211_scan_done(vif->scan_req, true);
+               struct cfg80211_scan_info info = {
+                       .aborted = true,
+               };
+
+               cfg80211_scan_done(vif->scan_req, &info);
                vif->scan_req = NULL;
        }
 
@@ -3870,7 +3881,7 @@ int ath6kl_cfg80211_init(struct ath6kl *ar)
                                          BIT(NL80211_IFTYPE_P2P_CLIENT);
        }
 
-       if (config_enabled(CONFIG_ATH6KL_REGDOMAIN) &&
+       if (IS_ENABLED(CONFIG_ATH6KL_REGDOMAIN) &&
            test_bit(ATH6KL_FW_CAPABILITY_REGDOMAIN, ar->fw_capabilities)) {
                wiphy->reg_notifier = ath6kl_cfg80211_reg_notify;
                ar->wiphy->features |= NL80211_FEATURE_CELL_BASE_REG_HINTS;