summaryrefslogtreecommitdiffstats
path: root/net/mac80211/rx.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2009-07-14 00:33:34 +0200
committerJohn W. Linville <linville@tuxdriver.com>2009-07-27 15:24:06 -0400
commit5061b0c2b9066de426fbc63f1278d2210e789412 (patch)
tree4658cb1a75c2ac37e2eebb3dd67cb3c975297b1f /net/mac80211/rx.c
parent70034918930d2e5b68c09bced637228c50d9561a (diff)
downloadblackbird-op-linux-5061b0c2b9066de426fbc63f1278d2210e789412.tar.gz
blackbird-op-linux-5061b0c2b9066de426fbc63f1278d2210e789412.zip
mac80211: cooperate more with network namespaces
There are still two places in mac80211 that hardcode the initial net namespace (init_net). One of them is mandated by cfg80211 and will be removed by a separate patch, the other one is used for finding the network device of a pending packet via its ifindex. Remove the latter use by keeping track of the device pointer itself, via the vif pointer, and avoid it going stale by dropping pending frames for a given interface when the interface is removed. To keep track of the vif pointer for the correct interface, change the info->control.vif pointer's internal use to always be the correct vif, and only move it to the vif the driver expects (or NULL for monitor interfaces and injected packets) right before giving the packet to the driver. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/rx.c')
-rw-r--r--net/mac80211/rx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 66c797cc85ce..d9df819eef3b 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -1539,7 +1539,7 @@ ieee80211_rx_h_mesh_fwding(struct ieee80211_rx_data *rx)
info = IEEE80211_SKB_CB(fwd_skb);
memset(info, 0, sizeof(*info));
info->flags |= IEEE80211_TX_INTFL_NEED_TXPROCESSING;
- fwd_skb->iif = rx->dev->ifindex;
+ info->control.vif = &rx->sdata->vif;
ieee80211_select_queue(local, fwd_skb);
if (is_multicast_ether_addr(fwd_hdr->addr3))
memcpy(fwd_hdr->addr1, fwd_hdr->addr3,
OpenPOWER on IntegriCloud