diff mbox

[konusllaptop,1/1] Fix WPA with VLAN on AP side with ps client

Message ID 1360683806-15238-2-git-send-email-michael-dev@fami-braun.de (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

michael-dev Feb. 12, 2013, 3:43 p.m. UTC
When sending a broadcast while at least on of the connected stations is
sleeping, it gets queued and send after a DTIM beacon is sent.
If the packet was to be sent on a vlan interface, the vif used for dequeing
from the per-bss queue does not hold the per-vlan sdata. The correct sdata is
required to use the correct per-vlan broadcast/multicast key.

This patch fixes this by restoring the per-vlan sdata using the skb->dev entry.
---
 net/mac80211/tx.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Johannes Berg Feb. 12, 2013, 3:55 p.m. UTC | #1
On Tue, 2013-02-12 at 16:43 +0100, Michael Braun wrote:
> When sending a broadcast while at least on of the connected stations is
> sleeping, it gets queued and send after a DTIM beacon is sent.
> If the packet was to be sent on a vlan interface, the vif used for dequeing
> from the per-bss queue does not hold the per-vlan sdata. The correct sdata is
> required to use the correct per-vlan broadcast/multicast key.
> 
> This patch fixes this by restoring the per-vlan sdata using the skb->dev entry.
> ---
>  net/mac80211/tx.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
> index 2ef0e19..93681f5 100644
> --- a/net/mac80211/tx.c
> +++ b/net/mac80211/tx.c
> @@ -2770,7 +2770,8 @@ ieee80211_get_buffered_bc(struct ieee80211_hw *hw,
>  				cpu_to_le16(IEEE80211_FCTL_MOREDATA);
>  		}
>  
> -		if (!ieee80211_tx_prepare(sdata, &tx, skb))
> +		struct ieee80211_sub_if_data *frame_sdata = IEEE80211_DEV_TO_SUB_IF(skb->dev);
> +		if (!ieee80211_tx_prepare(frame_sdata, &tx, skb))

Please make your code warning-free and adhere to CodingStyle.

johannes

--
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
Johannes Berg Feb. 12, 2013, 3:59 p.m. UTC | #2
On Tue, 2013-02-12 at 16:55 +0100, Johannes Berg wrote:
> On Tue, 2013-02-12 at 16:43 +0100, Michael Braun wrote:
> > When sending a broadcast while at least on of the connected stations is
> > sleeping, it gets queued and send after a DTIM beacon is sent.
> > If the packet was to be sent on a vlan interface, the vif used for dequeing
> > from the per-bss queue does not hold the per-vlan sdata. The correct sdata is
> > required to use the correct per-vlan broadcast/multicast key.
> > 
> > This patch fixes this by restoring the per-vlan sdata using the skb->dev entry.
> > ---
> >  net/mac80211/tx.c |    3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> > 
> > diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
> > index 2ef0e19..93681f5 100644
> > --- a/net/mac80211/tx.c
> > +++ b/net/mac80211/tx.c
> > @@ -2770,7 +2770,8 @@ ieee80211_get_buffered_bc(struct ieee80211_hw *hw,
> >  				cpu_to_le16(IEEE80211_FCTL_MOREDATA);
> >  		}
> >  
> > -		if (!ieee80211_tx_prepare(sdata, &tx, skb))
> > +		struct ieee80211_sub_if_data *frame_sdata = IEEE80211_DEV_TO_SUB_IF(skb->dev);
> > +		if (!ieee80211_tx_prepare(frame_sdata, &tx, skb))
> 
> Please make your code warning-free and adhere to CodingStyle.

Also please provide a proper patch subject (i.e. "mac80211: fix ...")

johannes

--
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
diff mbox

Patch

diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 2ef0e19..93681f5 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -2770,7 +2770,8 @@  ieee80211_get_buffered_bc(struct ieee80211_hw *hw,
 				cpu_to_le16(IEEE80211_FCTL_MOREDATA);
 		}
 
-		if (!ieee80211_tx_prepare(sdata, &tx, skb))
+		struct ieee80211_sub_if_data *frame_sdata = IEEE80211_DEV_TO_SUB_IF(skb->dev);
+		if (!ieee80211_tx_prepare(frame_sdata, &tx, skb))
 			break;
 		dev_kfree_skb_any(skb);
 	}