tree-wide: replace config_enabled() with IS_ENABLED()
[cascardo/linux.git] / drivers / net / wireless / ath / ath6kl / cfg80211.c
index ef5b40e..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;
 }
 
@@ -1111,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);
@@ -2978,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);
@@ -3881,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;