]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - net/mac80211/main.c
Merge tag 'late-mvebu-rebased' of git://git.kernel.org/pub/scm/linux/kernel/git/arm...
[karo-tx-linux.git] / net / mac80211 / main.c
index 38b3468bc515dd0ab915910fe3bf1ffeb61be523..1a8591b77a13d1ff1e41a67f6c8ed8c57daa83e9 100644 (file)
@@ -501,6 +501,11 @@ static const struct ieee80211_ht_cap mac80211_ht_capa_mod_mask = {
        },
 };
 
+static const u8 extended_capabilities[] = {
+       0, 0, 0, 0, 0, 0, 0,
+       WLAN_EXT_CAPA8_OPMODE_NOTIF,
+};
+
 struct ieee80211_hw *ieee80211_alloc_hw(size_t priv_data_len,
                                        const struct ieee80211_ops *ops)
 {
@@ -557,14 +562,17 @@ struct ieee80211_hw *ieee80211_alloc_hw(size_t priv_data_len,
                        WIPHY_FLAG_REPORTS_OBSS |
                        WIPHY_FLAG_OFFCHAN_TX;
 
+       wiphy->extended_capabilities = extended_capabilities;
+       wiphy->extended_capabilities_mask = extended_capabilities;
+       wiphy->extended_capabilities_len = ARRAY_SIZE(extended_capabilities);
+
        if (ops->remain_on_channel)
                wiphy->flags |= WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL;
 
        wiphy->features |= NL80211_FEATURE_SK_TX_STATUS |
                           NL80211_FEATURE_SAE |
                           NL80211_FEATURE_HT_IBSS |
-                          NL80211_FEATURE_VIF_TXPOWER |
-                          NL80211_FEATURE_FULL_AP_CLIENT_STATE;
+                          NL80211_FEATURE_VIF_TXPOWER;
 
        if (!ops->hw_scan)
                wiphy->features |= NL80211_FEATURE_LOW_PRIORITY_SCAN |
@@ -621,6 +629,9 @@ struct ieee80211_hw *ieee80211_alloc_hw(size_t priv_data_len,
 
        INIT_WORK(&local->restart_work, ieee80211_restart_work);
 
+       INIT_WORK(&local->radar_detected_work,
+                 ieee80211_dfs_radar_detected_work);
+
        INIT_WORK(&local->reconfig_filter, ieee80211_reconfig_filter);
        local->smps_mode = IEEE80211_SMPS_OFF;
 
@@ -636,8 +647,6 @@ struct ieee80211_hw *ieee80211_alloc_hw(size_t priv_data_len,
 
        spin_lock_init(&local->ack_status_lock);
        idr_init(&local->ack_status_frames);
-       /* preallocate at least one entry */
-       idr_pre_get(&local->ack_status_frames, GFP_KERNEL);
 
        sta_info_init(local);
 
@@ -713,6 +722,16 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
                 */
                if (local->hw.wiphy->interface_modes & BIT(NL80211_IFTYPE_WDS))
                        return -EINVAL;
+
+               /* DFS currently not supported with channel context drivers */
+               for (i = 0; i < local->hw.wiphy->n_iface_combinations; i++) {
+                       const struct ieee80211_iface_combination *comb;
+
+                       comb = &local->hw.wiphy->iface_combinations[i];
+
+                       if (comb->radar_detect_widths)
+                               return -EINVAL;
+               }
        }
 
        /* Only HW csum features are currently compatible with mac80211 */
@@ -1152,8 +1171,7 @@ static void __exit ieee80211_exit(void)
        rc80211_minstrel_ht_exit();
        rc80211_minstrel_exit();
 
-       if (mesh_allocated)
-               ieee80211s_stop();
+       ieee80211s_stop();
 
        ieee80211_iface_exit();