mac80211: fix monitor mode injection
authorFelix Fietkau <nbd@openwrt.org>
Sun, 13 Jan 2013 22:10:14 +0000 (22:10 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Sun, 13 Jan 2013 22:10:14 +0000 (22:10 +0000)
SVN-Revision: 35145

package/mac80211/patches/300-pending_work.patch

index a1204f751343a51d58d8e23096d7a41d56e70194..4d288bf60279fd3991bd86ec2b8627d57ccfc4a9 100644 (file)
        struct ar5416IniArray iniBank7;
        struct ar5416IniArray iniAddac;
        struct ar5416IniArray iniPcieSerdes;
+--- a/net/mac80211/tx.c
++++ b/net/mac80211/tx.c
+@@ -1677,10 +1677,10 @@ netdev_tx_t ieee80211_monitor_start_xmit
+                       chanctx_conf =
+                               rcu_dereference(tmp_sdata->vif.chanctx_conf);
+       }
+-      if (!chanctx_conf)
+-              goto fail_rcu;
+-
+-      chan = chanctx_conf->def.chan;
++      if (chanctx_conf)
++              chan = chanctx_conf->def.chan;
++      else
++              chan = local->_oper_channel;
+       /*
+        * Frame injection is not allowed if beaconing is not allowed