mac80211: Initialize vif pointer
authorIvo van Doorn <ivdoorn@gmail.com>
Sun, 13 Jan 2008 13:16:47 +0000 (14:16 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Jan 2008 23:10:08 +0000 (15:10 -0800)
Before calling update_beacon() mac80211 must
initialize the control.vif pointer so it can
be used by the driver to determine which
interface is trying to send the beacon.

v2: ieee80211_beacon_get() should also initialize the
vif pointer since it can be called by mac80211 internally
before calling config_interface().

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/mac80211/ieee80211_sta.c
net/mac80211/tx.c

index 866eb8078121b08925202569db8e48a0d91194a8..8b47d81fc716708841e2b2995a9e2e3334f2ae4b 100644 (file)
@@ -2787,6 +2787,7 @@ static int ieee80211_sta_join_ibss(struct net_device *dev,
                               "for IBSS beacon\n", dev->name);
                        break;
                }
+               control.vif = &sdata->vif;
                control.tx_rate =
                        (sdata->bss_conf.use_short_preamble &&
                        (ratesel.rate->flags & IEEE80211_RATE_PREAMBLE2)) ?
index f9088fe34d598c65ef4678910f7492f12a46525e..67b509edd431024ea62623d023f5cf309005af64 100644 (file)
@@ -1752,6 +1752,7 @@ struct sk_buff *ieee80211_beacon_get(struct ieee80211_hw *hw,
                        goto out;
                }
 
+               control->vif = vif;
                control->tx_rate =
                        (sdata->bss_conf.use_short_preamble &&
                        (rsel.rate->flags & IEEE80211_RATE_PREAMBLE2)) ?