2008-09-12 20:44:09

by Abhijeet Kolekar

[permalink] [raw]
Subject: [PATCH V2] mac80211 : Fix mode change hard_start_xmit function

When monitor mode is changed to BSS or IBSS, data trasnfer can not happen
because proper transmit function is not assigend for BSS ,IBSS mode.
This patch fixes this problem by assigning the ieee80211_subif_start_xmit
to device's hard_start_xmit function.

Signed-off-by: Abhijeet Kolekar <[email protected]>
Acked-by : Zhu Yi <[email protected]>
---
net/mac80211/iface.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index 672cec6..e8c1f1e 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -91,6 +91,7 @@ static void ieee80211_setup_sdata(struct ieee80211_sub_if_data *sdata,

/* and set some type-dependent values */
sdata->vif.type = type;
+ sdata->dev->hard_start_xmit = ieee80211_subif_start_xmit;

/* only monitor differs */
sdata->dev->type = ARPHRD_ETHER;
--
1.5.4.3



2008-09-12 20:46:30

by Johannes Berg

[permalink] [raw]
Subject: Re: [PATCH V2] mac80211 : Fix mode change hard_start_xmit function

On Fri, 2008-09-12 at 13:44 -0700, Abhijeet Kolekar wrote:
> When monitor mode is changed to BSS or IBSS, data trasnfer can not happen
> because proper transmit function is not assigend for BSS ,IBSS mode.
> This patch fixes this problem by assigning the ieee80211_subif_start_xmit
> to device's hard_start_xmit function.

> /* and set some type-dependent values */
> sdata->vif.type = type;
> + sdata->dev->hard_start_xmit = ieee80211_subif_start_xmit;
>
> /* only monitor differs */
> sdata->dev->type = ARPHRD_ETHER;

I'd have prefered if you'd put it along with "only monitor mode differs"
but heh :)

Acked-by: Johannes Berg <[email protected]>

johannes


Attachments:
signature.asc (836.00 B)
This is a digitally signed message part