2011-02-27 20:54:16

by Javier Martinez Canillas

[permalink] [raw]
Subject: [PATCH 1/2] staging: brcm80211: Add buf_size parameter to ampdu_action handler function

struct ieee80211_ops.ampdu_action function pointer definition now includes a
u8 buf_size parameter.

Update wl_ops_ampdu_action handler function according to this new signature.

Signed-off-by: Javier Martinez Canillas <[email protected]>
---
drivers/staging/brcm80211/brcmsmac/wl_mac80211.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/brcm80211/brcmsmac/wl_mac80211.c b/drivers/staging/brcm80211/brcmsmac/wl_mac80211.c
index 7645c6c..345243b 100644
--- a/drivers/staging/brcm80211/brcmsmac/wl_mac80211.c
+++ b/drivers/staging/brcm80211/brcmsmac/wl_mac80211.c
@@ -142,7 +142,8 @@ static int wl_ops_sta_remove(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
static int wl_ops_ampdu_action(struct ieee80211_hw *hw,
struct ieee80211_vif *vif,
enum ieee80211_ampdu_mlme_action action,
- struct ieee80211_sta *sta, u16 tid, u16 *ssn);
+ struct ieee80211_sta *sta, u16 tid, u16 *ssn,
+ u8 buf_size);
static void wl_ops_rfkill_poll(struct ieee80211_hw *hw);

static int wl_ops_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
@@ -609,7 +610,8 @@ static int
wl_ops_ampdu_action(struct ieee80211_hw *hw,
struct ieee80211_vif *vif,
enum ieee80211_ampdu_mlme_action action,
- struct ieee80211_sta *sta, u16 tid, u16 *ssn)
+ struct ieee80211_sta *sta, u16 tid, u16 *ssn,
+ u8 buf_size)
{
#if defined(BCMDBG)
struct scb *scb = (struct scb *)sta->drv_priv;
--
1.7.2.3



2011-02-27 20:54:19

by Javier Martinez Canillas

[permalink] [raw]
Subject: [PATCH 2/2] staging: brcm80211: Remove unused variables and code clean up

tsf_l and tsf_h variables where used in a code segment that is never compiled
so the variables remains unused.

Remove those variables and the code never compiled as well.

Signed-off-by: Javier Martinez Canillas <[email protected]>
---
drivers/staging/brcm80211/brcmsmac/wlc_mac80211.c | 9 ---------
1 files changed, 0 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/brcm80211/brcmsmac/wlc_mac80211.c b/drivers/staging/brcm80211/brcmsmac/wlc_mac80211.c
index 464e421..69717ae 100644
--- a/drivers/staging/brcm80211/brcmsmac/wlc_mac80211.c
+++ b/drivers/staging/brcm80211/brcmsmac/wlc_mac80211.c
@@ -6875,21 +6875,12 @@ static void
prep_mac80211_status(struct wlc_info *wlc, d11rxhdr_t *rxh, struct sk_buff *p,
struct ieee80211_rx_status *rx_status)
{
- u32 tsf_l, tsf_h;
wlc_d11rxhdr_t *wlc_rxh = (wlc_d11rxhdr_t *) rxh;
int preamble;
int channel;
ratespec_t rspec;
unsigned char *plcp;

-#if 0
- /* Clearly, this is bogus -- reading the TSF now is wrong */
- wlc_read_tsf(wlc, &tsf_l, &tsf_h); /* mactime */
- rx_status->mactime = tsf_h;
- rx_status->mactime <<= 32;
- rx_status->mactime |= tsf_l;
- rx_status->flag |= RX_FLAG_MACTIME_MPDU; /* clearly wrong */
-#endif

channel = WLC_CHAN_CHANNEL(rxh->RxChan);

--
1.7.2.3


2011-02-28 09:50:39

by Roland Vossen

[permalink] [raw]
Subject: Re: [PATCH 1/2] staging: brcm80211: Add buf_size parameter to ampdu_action handler function

Hi Javier,

this change looks good to me.

Thanks, Roland.

On 02/27/2011 09:54 PM, Javier Martinez Canillas wrote:
> struct ieee80211_ops.ampdu_action function pointer definition now includes a
> u8 buf_size parameter.
>
> Update wl_ops_ampdu_action handler function according to this new signature.
>
> Signed-off-by: Javier Martinez Canillas<[email protected]>
> ---
> drivers/staging/brcm80211/brcmsmac/wl_mac80211.c | 6 ++++--
> 1 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/brcm80211/brcmsmac/wl_mac80211.c b/drivers/staging/brcm80211/brcmsmac/wl_mac80211.c
> index 7645c6c..345243b 100644
> --- a/drivers/staging/brcm80211/brcmsmac/wl_mac80211.c
> +++ b/drivers/staging/brcm80211/brcmsmac/wl_mac80211.c
> @@ -142,7 +142,8 @@ static int wl_ops_sta_remove(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
> static int wl_ops_ampdu_action(struct ieee80211_hw *hw,
> struct ieee80211_vif *vif,
> enum ieee80211_ampdu_mlme_action action,
> - struct ieee80211_sta *sta, u16 tid, u16 *ssn);
> + struct ieee80211_sta *sta, u16 tid, u16 *ssn,
> + u8 buf_size);
> static void wl_ops_rfkill_poll(struct ieee80211_hw *hw);
>
> static int wl_ops_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
> @@ -609,7 +610,8 @@ static int
> wl_ops_ampdu_action(struct ieee80211_hw *hw,
> struct ieee80211_vif *vif,
> enum ieee80211_ampdu_mlme_action action,
> - struct ieee80211_sta *sta, u16 tid, u16 *ssn)
> + struct ieee80211_sta *sta, u16 tid, u16 *ssn,
> + u8 buf_size)
> {
> #if defined(BCMDBG)
> struct scb *scb = (struct scb *)sta->drv_priv;



2011-03-03 15:38:13

by Arend van Spriel

[permalink] [raw]
Subject: Re: [PATCH 1/2] staging: brcm80211: Add buf_size parameter to ampdu_action handler function

On Thu, 03 Mar 2011 12:50:26 +0100, Javier Martinez Canillas
<[email protected]> wrote:

> Hi Arend,
>
> I tried to compile the driver in today linux-next (which already has
> the patch applied) and doesn't gives any warning.
>
> Please tell me if you still are having issues with it.
>
No issues. Your patch also landed in staging-next (I think) but
net/mac80211.h in staging-next still differs from linux-next so the
warning I mentioned will probably disappear soon.
>
> Thanks a lot.
>

Gr. AvS
--
"The most merciful thing in the world, I think, is the inability of the
human
mind to correlate all its contents." - "The Call of Cthulhu"


2011-03-01 16:03:57

by Dan Carpenter

[permalink] [raw]
Subject: Re: [PATCH 2/2] staging: brcm80211: Remove unused variables and code clean up

On Tue, Mar 01, 2011 at 04:37:55PM +0100, Javier Martinez Canillas wrote:
> >> ---
> >> ?drivers/staging/brcm80211/brcmsmac/wlc_mac80211.c | ? ?9 ---------
> >
> > This doesn't apply anymore, care to redo it and resend?
> >
> > thanks,
>
> Sure Greg but I tried with today linux-next and the patch applies
> cleanly. Maybe the problem are some patches that you have but haven't
> reached linux-next yet.
>
> Do you want me to wait a few days to redo and resend it or am I doing
> something wrong?

Actually Arend has a different patch for this, that I guess fixes the
#if 0 code instead of removing it. Probably that's prefered. I've
asked him to submit it.

regards,
dan carpenter

2011-03-01 05:46:49

by Greg KH

[permalink] [raw]
Subject: Re: [PATCH 2/2] staging: brcm80211: Remove unused variables and code clean up

On Sun, Feb 27, 2011 at 09:54:15PM +0100, Javier Martinez Canillas wrote:
> tsf_l and tsf_h variables where used in a code segment that is never compiled
> so the variables remains unused.
>
> Remove those variables and the code never compiled as well.
>
> Signed-off-by: Javier Martinez Canillas <[email protected]>
> ---
> drivers/staging/brcm80211/brcmsmac/wlc_mac80211.c | 9 ---------

This doesn't apply anymore, care to redo it and resend?

thanks,

greg k-h

2011-03-01 15:48:23

by Greg KH

[permalink] [raw]
Subject: Re: [PATCH 2/2] staging: brcm80211: Remove unused variables and code clean up

On Tue, Mar 01, 2011 at 04:37:55PM +0100, Javier Martinez Canillas wrote:
> >> ---
> >> ?drivers/staging/brcm80211/brcmsmac/wlc_mac80211.c | ? ?9 ---------
> >
> > This doesn't apply anymore, care to redo it and resend?
> >
> > thanks,
>
> Sure Greg but I tried with today linux-next and the patch applies
> cleanly. Maybe the problem are some patches that you have but haven't
> reached linux-next yet.
>
> Do you want me to wait a few days to redo and resend it or am I doing
> something wrong?

I applied all of these patches while on a very long plane flight, and
didn't get them to git.kernel.org until after the linux-next pulls
happened for todays linux-next.

So try it tomorrow, all of the changes should be there then and you
should be able to regenerate it then.

If not, please let me know.

Or, you can always work off of the staging-next branch of the
staging-2.6 tree in my git tree if you don't want to use linux-next,
it's your choice.

thanks,

greg k-h

2011-03-02 19:24:09

by Arend van Spriel

[permalink] [raw]
Subject: Re: [PATCH 1/2] staging: brcm80211: Add buf_size parameter to ampdu_action handler function

On Sun, 27 Feb 2011 21:54:14 +0100, Javier Martinez Canillas
<[email protected]> wrote:

Hi Javier,

> struct ieee80211_ops.ampdu_action function pointer definition now
> includes a
> u8 buf_size parameter.
>
> Update wl_ops_ampdu_action handler function according to this new
> signature.
>
This currently gives a warning on staging-next branch:

drivers/staging/brcm80211/brcmsmac/wl_mac80211.c:699: warning:
initialization from incompatible pointer type

>
> Signed-off-by: Javier Martinez Canillas <[email protected]>

Probably you have used a newer net/mac80211.h as reference which has not
yet landed on the staging-next branch.

Gr. AvS
--
"The most merciful thing in the world, I think, is the inability of the
human
mind to correlate all its contents." - "The Call of Cthulhu"


2011-03-03 11:50:42

by Javier Martinez Canillas

[permalink] [raw]
Subject: Re: [PATCH 1/2] staging: brcm80211: Add buf_size parameter to ampdu_action handler function

>>
> This currently gives a warning on staging-next branch:
>
> drivers/staging/brcm80211/brcmsmac/wl_mac80211.c:699: warning:
> initialization from incompatible pointer type
>
>
> Probably you have used a newer net/mac80211.h as reference which has not yet
> landed on the staging-next branch.
>
> Gr. AvS
> --

Hi Arend,

I tried to compile the driver in today linux-next (which already has
the patch applied) and doesn't gives any warning.

Please tell me if you still are having issues with it.

Thanks a lot.

--
-----------------------------------------
Javier Martínez Canillas
(+34) 682 39 81 69
PhD Student in High Performance Computing
Computer Architecture and Operating System Department (CAOS)
Universitat Autònoma de Barcelona
Barcelona, Spain

2011-03-03 11:30:31

by Javier Martinez Canillas

[permalink] [raw]
Subject: Re: [PATCH 2/2] staging: brcm80211: Remove unused variables and code clean up

>>
>> Do you want me to wait a few days to redo and resend it or am I doing
>> something wrong?
>
> Actually Arend has a different patch for this, that I guess fixes the
> #if 0 code instead of removing it.  Probably that's prefered.  I've
> asked him to submit it.
>
> regards,
> dan carpenter
>

Yes, fixing the #ifdef 0 instead of just removing it is far a better solution.

Thanks

--
-----------------------------------------
Javier Martínez Canillas
(+34) 682 39 81 69
PhD Student in High Performance Computing
Computer Architecture and Operating System Department (CAOS)
Universitat Autònoma de Barcelona
Barcelona, Spain

2011-03-01 15:38:11

by Javier Martinez Canillas

[permalink] [raw]
Subject: Re: [PATCH 2/2] staging: brcm80211: Remove unused variables and code clean up

>> ---
>>  drivers/staging/brcm80211/brcmsmac/wlc_mac80211.c |    9 ---------
>
> This doesn't apply anymore, care to redo it and resend?
>
> thanks,

Sure Greg but I tried with today linux-next and the patch applies
cleanly. Maybe the problem are some patches that you have but haven't
reached linux-next yet.

Do you want me to wait a few days to redo and resend it or am I doing
something wrong?

Thanks

--
-----------------------------------------
Javier Martínez Canillas
(+34) 682 39 81 69
PhD Student in High Performance Computing
Computer Architecture and Operating System Department (CAOS)
Universitat Autònoma de Barcelona
Barcelona, Spain