Re: [PATCH] net: mac80211: tx.c: be sure of 'sdata->vif.type' must be NL80211_IFTYPE_AP when be in NL80211_IFTYPE_AP case

2013-12-04 Thread Chen Gang
On 12/04/2013 04:49 PM, Johannes Berg wrote: > On Wed, 2013-12-04 at 16:41 +0800, Chen Gang wrote: > >> According to our original discussion, it seems we agree that I am not >> the suitable member to finish it, so I suggest you or another members to >> try. > > There's nothing to finish here.

Re: [PATCH] net: mac80211: tx.c: be sure of 'sdata->vif.type' must be NL80211_IFTYPE_AP when be in NL80211_IFTYPE_AP case

2013-12-04 Thread Johannes Berg
On Wed, 2013-12-04 at 16:41 +0800, Chen Gang wrote: > According to our original discussion, it seems we agree that I am not > the suitable member to finish it, so I suggest you or another members to > try. There's nothing to finish here. The code is fine. The compiler is wrong, but we haven't

Re: [PATCH] net: mac80211: tx.c: be sure of 'sdata->vif.type' must be NL80211_IFTYPE_AP when be in NL80211_IFTYPE_AP case

2013-12-04 Thread Chen Gang
On 12/04/2013 04:04 PM, Johannes Berg wrote: > On Wed, 2013-12-04 at 10:12 +0800, Chen Gang wrote: > >> It is really not urgent, and for keeping quality, it is necessary to >> spend suitable time resource (e.g 1 hour or more) to make, review and >> test this kind of patch carefully by oneself.

Re: [PATCH] net: mac80211: tx.c: be sure of 'sdata->vif.type' must be NL80211_IFTYPE_AP when be in NL80211_IFTYPE_AP case

2013-12-04 Thread Johannes Berg
On Wed, 2013-12-04 at 10:12 +0800, Chen Gang wrote: > It is really not urgent, and for keeping quality, it is necessary to > spend suitable time resource (e.g 1 hour or more) to make, review and > test this kind of patch carefully by oneself. > > So could you please help improve it when you

Re: [PATCH] net: mac80211: tx.c: be sure of 'sdata-vif.type' must be NL80211_IFTYPE_AP when be in NL80211_IFTYPE_AP case

2013-12-04 Thread Johannes Berg
On Wed, 2013-12-04 at 10:12 +0800, Chen Gang wrote: It is really not urgent, and for keeping quality, it is necessary to spend suitable time resource (e.g 1 hour or more) to make, review and test this kind of patch carefully by oneself. So could you please help improve it when you have

Re: [PATCH] net: mac80211: tx.c: be sure of 'sdata-vif.type' must be NL80211_IFTYPE_AP when be in NL80211_IFTYPE_AP case

2013-12-04 Thread Chen Gang
On 12/04/2013 04:04 PM, Johannes Berg wrote: On Wed, 2013-12-04 at 10:12 +0800, Chen Gang wrote: It is really not urgent, and for keeping quality, it is necessary to spend suitable time resource (e.g 1 hour or more) to make, review and test this kind of patch carefully by oneself. So

Re: [PATCH] net: mac80211: tx.c: be sure of 'sdata-vif.type' must be NL80211_IFTYPE_AP when be in NL80211_IFTYPE_AP case

2013-12-04 Thread Johannes Berg
On Wed, 2013-12-04 at 16:41 +0800, Chen Gang wrote: According to our original discussion, it seems we agree that I am not the suitable member to finish it, so I suggest you or another members to try. There's nothing to finish here. The code is fine. The compiler is wrong, but we haven't found

Re: [PATCH] net: mac80211: tx.c: be sure of 'sdata-vif.type' must be NL80211_IFTYPE_AP when be in NL80211_IFTYPE_AP case

2013-12-04 Thread Chen Gang
On 12/04/2013 04:49 PM, Johannes Berg wrote: On Wed, 2013-12-04 at 16:41 +0800, Chen Gang wrote: According to our original discussion, it seems we agree that I am not the suitable member to finish it, so I suggest you or another members to try. There's nothing to finish here. The code is

Re: [PATCH] net: mac80211: tx.c: be sure of 'sdata->vif.type' must be NL80211_IFTYPE_AP when be in NL80211_IFTYPE_AP case

2013-12-03 Thread Chen Gang
On 12/02/2013 10:48 PM, Johannes Berg wrote: > On Sun, 2013-12-01 at 14:38 -0800, Joe Perches wrote: >> On Sun, 2013-12-01 at 10:35 +0100, Johannes Berg wrote: >>> Good try, but no, now ap_sdata isn't even assigned. :) >> >> Right. Oh well. There's no improving this without >> significant

Re: [PATCH] net: mac80211: tx.c: be sure of 'sdata-vif.type' must be NL80211_IFTYPE_AP when be in NL80211_IFTYPE_AP case

2013-12-03 Thread Chen Gang
On 12/02/2013 10:48 PM, Johannes Berg wrote: On Sun, 2013-12-01 at 14:38 -0800, Joe Perches wrote: On Sun, 2013-12-01 at 10:35 +0100, Johannes Berg wrote: Good try, but no, now ap_sdata isn't even assigned. :) Right. Oh well. There's no improving this without significant rewrite. Even

Re: [PATCH] net: mac80211: tx.c: be sure of 'sdata->vif.type' must be NL80211_IFTYPE_AP when be in NL80211_IFTYPE_AP case

2013-12-02 Thread Johannes Berg
On Sun, 2013-12-01 at 14:38 -0800, Joe Perches wrote: > On Sun, 2013-12-01 at 10:35 +0100, Johannes Berg wrote: > > Good try, but no, now ap_sdata isn't even assigned. :) > > Right. Oh well. There's no improving this without > significant rewrite. Even then, there may not be much > overall

Re: [PATCH] net: mac80211: tx.c: be sure of 'sdata-vif.type' must be NL80211_IFTYPE_AP when be in NL80211_IFTYPE_AP case

2013-12-02 Thread Johannes Berg
On Sun, 2013-12-01 at 14:38 -0800, Joe Perches wrote: On Sun, 2013-12-01 at 10:35 +0100, Johannes Berg wrote: Good try, but no, now ap_sdata isn't even assigned. :) Right. Oh well. There's no improving this without significant rewrite. Even then, there may not be much overall

Re: [PATCH] net: mac80211: tx.c: be sure of 'sdata->vif.type' must be NL80211_IFTYPE_AP when be in NL80211_IFTYPE_AP case

2013-12-01 Thread Chen Gang
On 12/02/2013 06:38 AM, Joe Perches wrote: > On Sun, 2013-12-01 at 10:35 +0100, Johannes Berg wrote: >> Good try, but no, now ap_sdata isn't even assigned. :) > > Right. Oh well. There's no improving this without > significant rewrite. Even then, there may not be much > overall improvement. >

Re: [PATCH] net: mac80211: tx.c: be sure of 'sdata->vif.type' must be NL80211_IFTYPE_AP when be in NL80211_IFTYPE_AP case

2013-12-01 Thread Joe Perches
On Sun, 2013-12-01 at 10:35 +0100, Johannes Berg wrote: > Good try, but no, now ap_sdata isn't even assigned. :) Right. Oh well. There's no improving this without significant rewrite. Even then, there may not be much overall improvement. btw: Chen, I think fall-throughs are fine as long as

Re: [PATCH] net: mac80211: tx.c: be sure of 'sdata->vif.type' must be NL80211_IFTYPE_AP when be in NL80211_IFTYPE_AP case

2013-12-01 Thread Chen Gang
On 12/01/2013 05:37 PM, Johannes Berg wrote: > On Sun, 2013-12-01 at 07:48 +0800, Chen Gang wrote: > >> If ieee80211_subif_start_xmit() is not performance sensitive (I guess >> so), we can use some short static functions instead of some code blocks >> within ieee80211_subif_start_xmit(). >> >> -

Re: [PATCH] net: mac80211: tx.c: be sure of 'sdata->vif.type' must be NL80211_IFTYPE_AP when be in NL80211_IFTYPE_AP case

2013-12-01 Thread Johannes Berg
On Sun, 2013-12-01 at 07:48 +0800, Chen Gang wrote: > If ieee80211_subif_start_xmit() is not performance sensitive (I guess > so), we can use some short static functions instead of some code blocks > within ieee80211_subif_start_xmit(). > > - ieee80211_subif_start_xmit() is a long function

Re: [PATCH] net: mac80211: tx.c: be sure of 'sdata->vif.type' must be NL80211_IFTYPE_AP when be in NL80211_IFTYPE_AP case

2013-12-01 Thread Johannes Berg
On Sat, 2013-11-30 at 12:39 -0800, Joe Perches wrote: > +++ b/net/mac80211/tx.c > @@ -1777,18 +1777,16 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff > *skb, > } > ap_sdata = container_of(sdata->bss, struct > ieee80211_sub_if_data, >

Re: [PATCH] net: mac80211: tx.c: be sure of 'sdata-vif.type' must be NL80211_IFTYPE_AP when be in NL80211_IFTYPE_AP case

2013-12-01 Thread Johannes Berg
On Sat, 2013-11-30 at 12:39 -0800, Joe Perches wrote: +++ b/net/mac80211/tx.c @@ -1777,18 +1777,16 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb, } ap_sdata = container_of(sdata-bss, struct ieee80211_sub_if_data,

Re: [PATCH] net: mac80211: tx.c: be sure of 'sdata-vif.type' must be NL80211_IFTYPE_AP when be in NL80211_IFTYPE_AP case

2013-12-01 Thread Johannes Berg
On Sun, 2013-12-01 at 07:48 +0800, Chen Gang wrote: If ieee80211_subif_start_xmit() is not performance sensitive (I guess so), we can use some short static functions instead of some code blocks within ieee80211_subif_start_xmit(). - ieee80211_subif_start_xmit() is a long function (600+

Re: [PATCH] net: mac80211: tx.c: be sure of 'sdata-vif.type' must be NL80211_IFTYPE_AP when be in NL80211_IFTYPE_AP case

2013-12-01 Thread Chen Gang
On 12/01/2013 05:37 PM, Johannes Berg wrote: On Sun, 2013-12-01 at 07:48 +0800, Chen Gang wrote: If ieee80211_subif_start_xmit() is not performance sensitive (I guess so), we can use some short static functions instead of some code blocks within ieee80211_subif_start_xmit(). -

Re: [PATCH] net: mac80211: tx.c: be sure of 'sdata-vif.type' must be NL80211_IFTYPE_AP when be in NL80211_IFTYPE_AP case

2013-12-01 Thread Joe Perches
On Sun, 2013-12-01 at 10:35 +0100, Johannes Berg wrote: Good try, but no, now ap_sdata isn't even assigned. :) Right. Oh well. There's no improving this without significant rewrite. Even then, there may not be much overall improvement. btw: Chen, I think fall-throughs are fine as long as

Re: [PATCH] net: mac80211: tx.c: be sure of 'sdata-vif.type' must be NL80211_IFTYPE_AP when be in NL80211_IFTYPE_AP case

2013-12-01 Thread Chen Gang
On 12/02/2013 06:38 AM, Joe Perches wrote: On Sun, 2013-12-01 at 10:35 +0100, Johannes Berg wrote: Good try, but no, now ap_sdata isn't even assigned. :) Right. Oh well. There's no improving this without significant rewrite. Even then, there may not be much overall improvement. btw:

Re: [PATCH] net: mac80211: tx.c: be sure of 'sdata->vif.type' must be NL80211_IFTYPE_AP when be in NL80211_IFTYPE_AP case

2013-11-30 Thread Chen Gang
On 12/01/2013 07:48 AM, Chen Gang wrote: > On 12/01/2013 04:39 AM, Joe Perches wrote: >> On Sat, 2013-11-30 at 21:08 +0100, Johannes Berg wrote: >>> On Sat, 2013-11-30 at 22:02 +0800, Chen Gang wrote: - fall-through is obvious (although I did not notice it, originally). - Check

Re: [PATCH] net: mac80211: tx.c: be sure of 'sdata->vif.type' must be NL80211_IFTYPE_AP when be in NL80211_IFTYPE_AP case

2013-11-30 Thread Chen Gang
On 12/01/2013 04:39 AM, Joe Perches wrote: > On Sat, 2013-11-30 at 21:08 +0100, Johannes Berg wrote: >> On Sat, 2013-11-30 at 22:02 +0800, Chen Gang wrote: >>> - fall-through is obvious (although I did not notice it, originally). >>> >>> - Check 'A' again just near by "case A" seems a little

Re: [PATCH] net: mac80211: tx.c: be sure of 'sdata->vif.type' must be NL80211_IFTYPE_AP when be in NL80211_IFTYPE_AP case

2013-11-30 Thread Joe Perches
On Sat, 2013-11-30 at 21:08 +0100, Johannes Berg wrote: > On Sat, 2013-11-30 at 22:02 +0800, Chen Gang wrote: > > > >>> case NL80211_IFTYPE_AP: > > >>> - if (sdata->vif.type == NL80211_IFTYPE_AP) > > >>> - chanctx_conf = > > >>>

Re: [PATCH] net: mac80211: tx.c: be sure of 'sdata->vif.type' must be NL80211_IFTYPE_AP when be in NL80211_IFTYPE_AP case

2013-11-30 Thread Johannes Berg
On Sat, 2013-11-30 at 22:02 +0800, Chen Gang wrote: > >>> case NL80211_IFTYPE_AP: > >>> - if (sdata->vif.type == NL80211_IFTYPE_AP) > >>> - chanctx_conf = rcu_dereference(sdata->vif.chanctx_conf); > >>> + chanctx_conf = rcu_dereference(sdata->vif.chanctx_conf); >

Re: [PATCH] net: mac80211: tx.c: be sure of 'sdata->vif.type' must be NL80211_IFTYPE_AP when be in NL80211_IFTYPE_AP case

2013-11-30 Thread Chen Gang
On 11/30/2013 09:50 PM, Chen Gang wrote: > On 11/30/2013 08:53 PM, Johannes Berg wrote: >> On Sat, 2013-11-30 at 19:59 +0800, Chen Gang wrote: >>> On 11/29/2013 11:38 PM, Johannes Berg wrote: > +++ b/net/mac80211/tx.c > @@ -1814,8 +1814,9 @@ netdev_tx_t

Re: [PATCH] net: mac80211: tx.c: be sure of 'sdata->vif.type' must be NL80211_IFTYPE_AP when be in NL80211_IFTYPE_AP case

2013-11-30 Thread Chen Gang
On 11/30/2013 08:53 PM, Johannes Berg wrote: > On Sat, 2013-11-30 at 19:59 +0800, Chen Gang wrote: >> On 11/29/2013 11:38 PM, Johannes Berg wrote: >>> +++ b/net/mac80211/tx.c @@ -1814,8 +1814,9 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb,

Re: [PATCH] net: mac80211: tx.c: be sure of 'sdata->vif.type' must be NL80211_IFTYPE_AP when be in NL80211_IFTYPE_AP case

2013-11-30 Thread Johannes Berg
On Sat, 2013-11-30 at 19:59 +0800, Chen Gang wrote: > On 11/29/2013 11:38 PM, Johannes Berg wrote: > > > >> +++ b/net/mac80211/tx.c > >> @@ -1814,8 +1814,9 @@ netdev_tx_t ieee80211_subif_start_xmit(struct > >> sk_buff *skb, > >>break; > >>/* fall through */ > >>

Re: [PATCH] net: mac80211: tx.c: be sure of 'sdata->vif.type' must be NL80211_IFTYPE_AP when be in NL80211_IFTYPE_AP case

2013-11-30 Thread Chen Gang
On 11/29/2013 11:38 PM, Johannes Berg wrote: > >> +++ b/net/mac80211/tx.c >> @@ -1814,8 +1814,9 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff >> *skb, >> break; >> /* fall through */ >> case NL80211_IFTYPE_AP: >> -if (sdata->vif.type

Re: [PATCH] net: mac80211: tx.c: be sure of 'sdata-vif.type' must be NL80211_IFTYPE_AP when be in NL80211_IFTYPE_AP case

2013-11-30 Thread Chen Gang
On 11/29/2013 11:38 PM, Johannes Berg wrote: +++ b/net/mac80211/tx.c @@ -1814,8 +1814,9 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb, break; /* fall through */ case NL80211_IFTYPE_AP: -if (sdata-vif.type ==

Re: [PATCH] net: mac80211: tx.c: be sure of 'sdata-vif.type' must be NL80211_IFTYPE_AP when be in NL80211_IFTYPE_AP case

2013-11-30 Thread Johannes Berg
On Sat, 2013-11-30 at 19:59 +0800, Chen Gang wrote: On 11/29/2013 11:38 PM, Johannes Berg wrote: +++ b/net/mac80211/tx.c @@ -1814,8 +1814,9 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb, break; /* fall through */ case

Re: [PATCH] net: mac80211: tx.c: be sure of 'sdata-vif.type' must be NL80211_IFTYPE_AP when be in NL80211_IFTYPE_AP case

2013-11-30 Thread Chen Gang
On 11/30/2013 08:53 PM, Johannes Berg wrote: On Sat, 2013-11-30 at 19:59 +0800, Chen Gang wrote: On 11/29/2013 11:38 PM, Johannes Berg wrote: +++ b/net/mac80211/tx.c @@ -1814,8 +1814,9 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb, break; /*

Re: [PATCH] net: mac80211: tx.c: be sure of 'sdata-vif.type' must be NL80211_IFTYPE_AP when be in NL80211_IFTYPE_AP case

2013-11-30 Thread Chen Gang
On 11/30/2013 09:50 PM, Chen Gang wrote: On 11/30/2013 08:53 PM, Johannes Berg wrote: On Sat, 2013-11-30 at 19:59 +0800, Chen Gang wrote: On 11/29/2013 11:38 PM, Johannes Berg wrote: +++ b/net/mac80211/tx.c @@ -1814,8 +1814,9 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb,

Re: [PATCH] net: mac80211: tx.c: be sure of 'sdata-vif.type' must be NL80211_IFTYPE_AP when be in NL80211_IFTYPE_AP case

2013-11-30 Thread Johannes Berg
On Sat, 2013-11-30 at 22:02 +0800, Chen Gang wrote: case NL80211_IFTYPE_AP: - if (sdata-vif.type == NL80211_IFTYPE_AP) - chanctx_conf = rcu_dereference(sdata-vif.chanctx_conf); + chanctx_conf = rcu_dereference(sdata-vif.chanctx_conf); if

Re: [PATCH] net: mac80211: tx.c: be sure of 'sdata-vif.type' must be NL80211_IFTYPE_AP when be in NL80211_IFTYPE_AP case

2013-11-30 Thread Joe Perches
On Sat, 2013-11-30 at 21:08 +0100, Johannes Berg wrote: On Sat, 2013-11-30 at 22:02 +0800, Chen Gang wrote: case NL80211_IFTYPE_AP: - if (sdata-vif.type == NL80211_IFTYPE_AP) - chanctx_conf = rcu_dereference(sdata-vif.chanctx_conf); +

Re: [PATCH] net: mac80211: tx.c: be sure of 'sdata-vif.type' must be NL80211_IFTYPE_AP when be in NL80211_IFTYPE_AP case

2013-11-30 Thread Chen Gang
On 12/01/2013 04:39 AM, Joe Perches wrote: On Sat, 2013-11-30 at 21:08 +0100, Johannes Berg wrote: On Sat, 2013-11-30 at 22:02 +0800, Chen Gang wrote: - fall-through is obvious (although I did not notice it, originally). - Check 'A' again just near by case A seems a little strange. -

Re: [PATCH] net: mac80211: tx.c: be sure of 'sdata-vif.type' must be NL80211_IFTYPE_AP when be in NL80211_IFTYPE_AP case

2013-11-30 Thread Chen Gang
On 12/01/2013 07:48 AM, Chen Gang wrote: On 12/01/2013 04:39 AM, Joe Perches wrote: On Sat, 2013-11-30 at 21:08 +0100, Johannes Berg wrote: On Sat, 2013-11-30 at 22:02 +0800, Chen Gang wrote: - fall-through is obvious (although I did not notice it, originally). - Check 'A' again just near

Re: [PATCH] net: mac80211: tx.c: be sure of 'sdata->vif.type' must be NL80211_IFTYPE_AP when be in NL80211_IFTYPE_AP case

2013-11-29 Thread Johannes Berg
> +++ b/net/mac80211/tx.c > @@ -1814,8 +1814,9 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff > *skb, > break; > /* fall through */ > case NL80211_IFTYPE_AP: > - if (sdata->vif.type == NL80211_IFTYPE_AP) > -

Re: [PATCH] net: mac80211: tx.c: be sure of 'sdata-vif.type' must be NL80211_IFTYPE_AP when be in NL80211_IFTYPE_AP case

2013-11-29 Thread Johannes Berg
+++ b/net/mac80211/tx.c @@ -1814,8 +1814,9 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb, break; /* fall through */ case NL80211_IFTYPE_AP: - if (sdata-vif.type == NL80211_IFTYPE_AP) - chanctx_conf

[PATCH] net: mac80211: tx.c: be sure of 'sdata->vif.type' must be NL80211_IFTYPE_AP when be in NL80211_IFTYPE_AP case

2013-11-26 Thread Chen Gang
In next-20131122 tree, if "sdata->vif.type != NL80211_IFTYPE_AP", 'chanctx_conf' will be not initialized, so need check it. Related warning (with allmodconfig under hexagon): CC [M] net/mac80211/tx.o net/mac80211/tx.c: In function 'ieee80211_subif_start_xmit': net/mac80211/tx.c:1827:27:

[PATCH] net: mac80211: tx.c: be sure of 'sdata-vif.type' must be NL80211_IFTYPE_AP when be in NL80211_IFTYPE_AP case

2013-11-26 Thread Chen Gang
In next-20131122 tree, if sdata-vif.type != NL80211_IFTYPE_AP, 'chanctx_conf' will be not initialized, so need check it. Related warning (with allmodconfig under hexagon): CC [M] net/mac80211/tx.o net/mac80211/tx.c: In function 'ieee80211_subif_start_xmit': net/mac80211/tx.c:1827:27: