mac80211: Initialize vif pointer
PATCH 1/1 mac80211: Initialize vif pointer
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.
---
net/mac80211/ieee80211_sta.c +1 -0
@@ -2536,6 +2536,7 @@ static int ieee80211_sta_join_ibss(struct net_device *dev, }memset (&control,0 ,sizeof (control)); + control.vif = &sdata->vif;rate_control_get_rate (dev, local->oper_hw_mode, skb, &ratesel);if (!ratesel.rate) { printk(KERN_DEBUG "%s: Failed to determine TX rate "
Quoted 4 lines · Ivo van Doorn
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.
Good catch, thanks Ivo. I'd prefer if it was set a few lines lower though where all the other control members are initialised. Mind respinning? Feel free to add
Quoted 22 lines
Signed-off-by Ivo van Doorn <[email protected]>---
net/mac80211/ieee80211_sta.c +1
-1@@ -2536,6 +2536,7 @@ static int ieee80211_sta_join_ibss(struct net_device *dev, }memset (&control,0 ,sizeof (control)); + control.vif = &sdata->vif;rate_control_get_rate (dev, local->oper_hw_mode, skb, &ratesel);if (!ratesel.rate) { printk(KERN_DEBUG "%s: Failed to determine TX rate " -To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 10 lines · Johannes Berg
Quoted 4 lines · Ivo van Doorn
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.Good catch, thanks Ivo. I'd prefer if it was set a few lines lower though where all the other control members are initialised. Mind respinning? Feel free to add
Not a problem, I just discovered a second location where the
vif is uninitialized for beaconing so I was preparing a second patch already. :)
Quoted 26 lines
Acked-by Johannes Berg <[email protected]>Quoted 22 lines
Signed-off-by Ivo van Doorn <[email protected]>---
net/mac80211/ieee80211_sta.c +1
-1@@ -2536,6 +2536,7 @@ static int ieee80211_sta_join_ibss(struct net_device *dev, }memset (&control,0 ,sizeof (control)); + control.vif = &sdata->vif;rate_control_get_rate (dev, local->oper_hw_mode, skb, &ratesel);if (!ratesel.rate) { printk(KERN_DEBUG "%s: Failed to determine TX rate " -To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH v2 1/1 mac80211: Initialize vif pointer
In reply to Ivo van DoornBefore 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().
---
net/mac80211/ieee80211_sta.c +1 -0
@@ -2542,6 +2542,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)) ?
net/mac80211/tx.c +1 -0
@@ -1753,6 +1753,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)) ?