]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - net/mac80211/main.c
Merge tag 'mac80211-next-for-davem-2015-05-29' of git://git.kernel.org/pub/scm/linux...
[karo-tx-linux.git] / net / mac80211 / main.c
index df3051d96afffbd1257442a16c3a2f198629fbcc..674164fe5cdba12156b15e8e8a493e56b90dbb6e 100644 (file)
@@ -41,9 +41,6 @@ void ieee80211_configure_filter(struct ieee80211_local *local)
        unsigned int changed_flags;
        unsigned int new_flags = 0;
 
-       if (atomic_read(&local->iff_promiscs))
-               new_flags |= FIF_PROMISC_IN_BSS;
-
        if (atomic_read(&local->iff_allmultis))
                new_flags |= FIF_ALLMULTI;
 
@@ -249,6 +246,7 @@ static void ieee80211_restart_work(struct work_struct *work)
 {
        struct ieee80211_local *local =
                container_of(work, struct ieee80211_local, restart_work);
+       struct ieee80211_sub_if_data *sdata;
 
        /* wait for scan work complete */
        flush_workqueue(local->workqueue);
@@ -257,6 +255,8 @@ static void ieee80211_restart_work(struct work_struct *work)
             "%s called with hardware scan in progress\n", __func__);
 
        rtnl_lock();
+       list_for_each_entry(sdata, &local->interfaces, list)
+               flush_delayed_work(&sdata->dec_tailroom_needed_wk);
        ieee80211_scan_cancel(local);
        ieee80211_reconfig(local);
        rtnl_unlock();
@@ -646,7 +646,7 @@ struct ieee80211_hw *ieee80211_alloc_hw_nm(size_t priv_data_len,
        skb_queue_head_init(&local->skb_queue);
        skb_queue_head_init(&local->skb_queue_unreliable);
 
-       ieee80211_led_names(local);
+       ieee80211_alloc_led_names(local);
 
        ieee80211_roc_setup(local);
 
@@ -771,8 +771,13 @@ static int ieee80211_init_cipher_suites(struct ieee80211_local *local)
                        suites[w++] = WLAN_CIPHER_SUITE_BIP_GMAC_256;
                }
 
-               for (r = 0; r < local->hw.n_cipher_schemes; r++)
+               for (r = 0; r < local->hw.n_cipher_schemes; r++) {
                        suites[w++] = cs[r].cipher;
+                       if (WARN_ON(cs[r].pn_len > IEEE80211_MAX_PN_LEN)) {
+                               kfree(suites);
+                               return -EINVAL;
+                       }
+               }
        }
 
        local->hw.wiphy->cipher_suites = suites;
@@ -840,7 +845,8 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
 
        /* Only HW csum features are currently compatible with mac80211 */
        feature_whitelist = NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM |
-                           NETIF_F_HW_CSUM;
+                           NETIF_F_HW_CSUM | NETIF_F_SG | NETIF_F_HIGHDMA |
+                           NETIF_F_GSO_SOFTWARE;
        if (WARN_ON(hw->netdev_features & ~feature_whitelist))
                return -EINVAL;
 
@@ -1209,6 +1215,8 @@ void ieee80211_free_hw(struct ieee80211_hw *hw)
 
        sta_info_stop(local);
 
+       ieee80211_free_led_names(local);
+
        wiphy_free(local->hw.wiphy);
 }
 EXPORT_SYMBOL(ieee80211_free_hw);