linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mac80211: Initialize vif pointer
@ 2008-01-13 13:02 Ivo van Doorn
  2008-01-13 13:07 ` Johannes Berg
  2008-01-13 13:16 ` [PATCH v2] " Ivo van Doorn
  0 siblings, 2 replies; 4+ messages in thread
From: Ivo van Doorn @ 2008-01-13 13:02 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless, rt2400-devel

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.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
---

diff --git a/net/mac80211/ieee80211_sta.c b/net/mac80211/ieee80211_sta.c
index 4f5d5c6..8a35fed 100644
--- a/net/mac80211/ieee80211_sta.c
+++ b/net/mac80211/ieee80211_sta.c
@@ -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 "

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] mac80211: Initialize vif pointer
  2008-01-13 13:02 [PATCH] mac80211: Initialize vif pointer Ivo van Doorn
@ 2008-01-13 13:07 ` Johannes Berg
  2008-01-13 13:13   ` Ivo van Doorn
  2008-01-13 13:16 ` [PATCH v2] " Ivo van Doorn
  1 sibling, 1 reply; 4+ messages in thread
From: Johannes Berg @ 2008-01-13 13:07 UTC (permalink / raw)
  To: Ivo van Doorn; +Cc: John W. Linville, linux-wireless

[-- Attachment #1: Type: text/plain, Size: 1263 bytes --]


On Sun, 2008-01-13 at 14:02 +0100, Ivo van Doorn wrote:
> 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

Acked-by: Johannes Berg <johannes@sipsolutions.net>


> Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>


> ---
> 
> diff --git a/net/mac80211/ieee80211_sta.c b/net/mac80211/ieee80211_sta.c
> index 4f5d5c6..8a35fed 100644
> --- a/net/mac80211/ieee80211_sta.c
> +++ b/net/mac80211/ieee80211_sta.c
> @@ -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 majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] mac80211: Initialize vif pointer
  2008-01-13 13:07 ` Johannes Berg
@ 2008-01-13 13:13   ` Ivo van Doorn
  0 siblings, 0 replies; 4+ messages in thread
From: Ivo van Doorn @ 2008-01-13 13:13 UTC (permalink / raw)
  To: Johannes Berg; +Cc: John W. Linville, linux-wireless

On Sunday 13 January 2008, Johannes Berg wrote:
> 
> On Sun, 2008-01-13 at 14:02 +0100, Ivo van Doorn wrote:
> > 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. :)

> Acked-by: Johannes Berg <johannes@sipsolutions.net>
> 
> 
> > Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
> 
> 
> > ---
> > 
> > diff --git a/net/mac80211/ieee80211_sta.c b/net/mac80211/ieee80211_sta.c
> > index 4f5d5c6..8a35fed 100644
> > --- a/net/mac80211/ieee80211_sta.c
> > +++ b/net/mac80211/ieee80211_sta.c
> > @@ -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 majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> > 
> 



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v2] mac80211: Initialize vif pointer
  2008-01-13 13:02 [PATCH] mac80211: Initialize vif pointer Ivo van Doorn
  2008-01-13 13:07 ` Johannes Berg
@ 2008-01-13 13:16 ` Ivo van Doorn
  1 sibling, 0 replies; 4+ messages in thread
From: Ivo van Doorn @ 2008-01-13 13:16 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless, rt2400-devel

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>

---
diff --git a/net/mac80211/ieee80211_sta.c b/net/mac80211/ieee80211_sta.c
index 4f5d5c6..13046fb 100644
--- a/net/mac80211/ieee80211_sta.c
+++ b/net/mac80211/ieee80211_sta.c
@@ -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)) ?
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 382f24b..545ac30 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -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)) ?



^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-01-13 13:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-13 13:02 [PATCH] mac80211: Initialize vif pointer Ivo van Doorn
2008-01-13 13:07 ` Johannes Berg
2008-01-13 13:13   ` Ivo van Doorn
2008-01-13 13:16 ` [PATCH v2] " Ivo van Doorn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).