mac80211: another fix for monitor mode handling (fixes #13071)
authorFelix Fietkau <nbd@openwrt.org>
Sat, 2 Mar 2013 18:07:02 +0000 (18:07 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Sat, 2 Mar 2013 18:07:02 +0000 (18:07 +0000)
SVN-Revision: 35846

package/mac80211/patches/300-pending_work.patch

index 508a674c5a68d078c9e7c839844a6e3b8849f9fb..2d46059c35409e48e8a4cdc6a95e19275a4bb74e 100644 (file)
        u32 changed = 0;
        int res;
        u32 hw_reconf_flags = 0;
-@@ -595,30 +594,8 @@ int ieee80211_do_open(struct wireless_de
+@@ -541,6 +540,9 @@ int ieee80211_do_open(struct wireless_de
+               ieee80211_adjust_monitor_flags(sdata, 1);
+               ieee80211_configure_filter(local);
++              mutex_lock(&local->mtx);
++              ieee80211_recalc_idle(local);
++              mutex_unlock(&local->mtx);
+               netif_carrier_on(dev);
+               break;
+@@ -595,30 +597,8 @@ int ieee80211_do_open(struct wireless_de
  
        set_bit(SDATA_STATE_RUNNING, &sdata->state);
  
  
        /*
         * set_multicast_list will be invoked by the networking core
-@@ -1022,6 +999,72 @@ static void ieee80211_if_setup(struct ne
+@@ -817,6 +797,9 @@ static void ieee80211_do_stop(struct iee
+               ieee80211_adjust_monitor_flags(sdata, -1);
+               ieee80211_configure_filter(local);
++              mutex_lock(&local->mtx);
++              ieee80211_recalc_idle(local);
++              mutex_unlock(&local->mtx);
+               break;
+       case NL80211_IFTYPE_P2P_DEVICE:
+               /* relies on synchronize_rcu() below */
+@@ -1022,6 +1005,72 @@ static void ieee80211_if_setup(struct ne
        dev->destructor = free_netdev;
  }
  
  static void ieee80211_iface_work(struct work_struct *work)
  {
        struct ieee80211_sub_if_data *sdata =
-@@ -1126,6 +1169,9 @@ static void ieee80211_iface_work(struct 
+@@ -1126,6 +1175,9 @@ static void ieee80211_iface_work(struct 
                                break;
                        ieee80211_mesh_rx_queued_mgmt(sdata, skb);
                        break;