Skip to contentSkip to conversation

staging: brcm80211: Add buf_size parameter to ampdu_action handler function

PATCH In review Javier Martinez Canillas 5 participants 11 messages Feb 27, 2011 – Mar 3, 2011 Staging

lore
Share & tools
lore
#0 lore raw

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.

---
 drivers/staging/brcm80211/brcmsmac/wl_mac80211.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
drivers/staging/brcm80211/brcmsmac/wl_mac80211.c +4 -2
index 7645c6c..345243b 100644
@@ -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;
Signature · 1 line
1.7.2.3
#1 lore raw

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.

---
 drivers/staging/brcm80211/brcmsmac/wlc_mac80211.c |    9 ---------
 1 files changed, 0 insertions(+), 9 deletions(-)
drivers/staging/brcm80211/brcmsmac/wlc_mac80211.c +0 -9
index 464e421..69717ae 100644
@@ -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);
 
Signature · 1 line
1.7.2.3
#2 lore raw

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

Quoted 8 lines · Javier Martinez Canillas

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.

---
 drivers/staging/brcm80211/brcmsmac/wlc_mac80211.c |    9 ---------

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

thanks,

greg k-h

#3 lore raw

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

Quoted 6 lines
Quoted 2 lines

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

Signature · 7 lines
-----------------------------------------
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
#4 lore raw

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

Quoted 5 lines · Javier Martinez Canillas
Quoted 5 lines
Quoted 2 lines

---
 drivers/staging/brcm80211/brcmsmac/wlc_mac80211.c |    9 ---------

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

Quoted 8 lines
Quoted 1 line

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

#5 lore raw

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

In reply to Javier Martinez Canillas
Quoted 5 lines · Javier Martinez Canillas
Quoted 5 lines
Quoted 2 lines

---
 drivers/staging/brcm80211/brcmsmac/wlc_mac80211.c |    9 ---------

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

Quoted 8 lines
Quoted 1 line

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

#6 lore raw

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

Quoted 11 lines
Quoted 3 lines

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

Signature · 7 lines
-----------------------------------------
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
#7 lore raw
In reply to Javier Martinez Canillas

Hi Javier,

this change looks good to me.

Thanks, Roland.

Quoted 34 lines · Javier Martinez Canillas

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.

---
  drivers/staging/brcm80211/brcmsmac/wl_mac80211.c |    6 ++++--
  1 files changed, 4 insertions(+), 2 deletions(-)
drivers/staging/brcm80211/brcmsmac/wl_mac80211.c +4 -2
index 7645c6c..345243b 100644
@@ -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;
#8 lore raw
In reply to Javier Martinez Canillas

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

Hi Javier,

Quoted 5 lines

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

Quoted 2 lines

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

Gr. AvS

Signature · 2 lines
"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"
#9 lore raw
Quoted 7 lines
Quoted 1 line

This currently gives a warning on staging-next branch:

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

Quoted 5 lines

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.

Signature · 7 lines
-----------------------------------------
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
#10 lore raw
Quoted 7 lines · Javier Martinez Canillas

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.

Quoted 3 lines

Thanks a lot.

Gr. AvS

Signature · 2 lines
"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"