Merge tag 'mac80211-next-for-net-next-2021-08-20' of git://git.kernel.org/pub/scm...
[linux-2.6-microblaze.git] / net / mac80211 / main.c
index 05f4c3c..45fb517 100644 (file)
@@ -260,6 +260,8 @@ static void ieee80211_restart_work(struct work_struct *work)
        flush_work(&local->radar_detected_work);
 
        rtnl_lock();
+       /* we might do interface manipulations, so need both */
+       wiphy_lock(local->hw.wiphy);
 
        WARN(test_bit(SCAN_HW_SCANNING, &local->scanning),
             "%s called with hardware scan in progress\n", __func__);
@@ -1018,7 +1020,7 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
 
                        iftd = &sband->iftype_data[i];
 
-                       supp_he = supp_he || (iftd && iftd->he_cap.has_he);
+                       supp_he = supp_he || iftd->he_cap.has_he;
                }
 
                /* HT, VHT, HE require QoS, thus >= 4 queues */