mac80211: add explicit monitor interface if needed
[deliverable/linux.git] / net / mac80211 / util.c
index a18b693042b2b5a4ce8f1a07d628b0ac83534cfa..9e8f4b892555f71036191f2e9fad7404cb51e8c0 100644 (file)
@@ -1223,6 +1223,16 @@ int ieee80211_reconfig(struct ieee80211_local *local)
                                   IEEE80211_TPT_LEDTRIG_FL_RADIO, 0);
 
        /* add interfaces */
+       sdata = rtnl_dereference(local->monitor_sdata);
+       if (sdata) {
+               res = drv_add_interface(local, sdata);
+               if (WARN_ON(res)) {
+                       rcu_assign_pointer(local->monitor_sdata, NULL);
+                       synchronize_net();
+                       kfree(sdata);
+               }
+       }
+
        list_for_each_entry(sdata, &local->interfaces, list) {
                if (sdata->vif.type != NL80211_IFTYPE_AP_VLAN &&
                    sdata->vif.type != NL80211_IFTYPE_MONITOR &&
This page took 0.032997 seconds and 5 git commands to generate.