Skip to contentSkip to conversation

mac80211: set carrier on for monitor interfaces on ieee80211_open

PATCH In review David Gnedt 2 participants 2 messages Jul 19, 2010 mac80211

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mac80211: set carrier on for monitor interfaces on ieee80211_open

If a station interface is reused as monitor interface it is possible that the carrier is still set to off. This breaks packet injection on that monitor interface.
Force the carrier on in monitor interface initialisation like it is also done for other interface types (e.g. adhoc, mesh point, ap).

---
 net/mac80211/iface.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
net/mac80211/iface.c +2 -0
index 910729f..d07d223 100644
@@ -249,6 +249,8 @@ static int ieee80211_open(struct net_device *dev)
 			local->fif_other_bss++;
 
 		ieee80211_configure_filter(local);
+
+		netif_carrier_on(dev);
 		break;
 	default:
 		res = drv_add_interface(local, &sdata->vif);
Signature · 1 line
1.6.3.3
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 7 lines · David Gnedt

If a station interface is reused as monitor interface it is possible that the carrier is still set to off. This breaks packet injection on that monitor interface.
Force the carrier on in monitor interface initialisation like it is also done for other interface types (e.g. adhoc, mesh point, ap).

This looks good,

Quoted 17 lines
---
 net/mac80211/iface.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
net/mac80211/iface.c +2 -0
index 910729f..d07d223 100644
@@ -249,6 +249,8 @@ static int ieee80211_open(struct net_device *dev)
 			local->fif_other_bss++;
 
 		ieee80211_configure_filter(local);
+
+		netif_carrier_on(dev);
 		break;
 	default:
 		res = drv_add_interface(local, &sdata->vif);