All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] wl12xx: correct fw_status structure for 8 sta support in AP-mode
@ 2011-09-22  6:52 Arik Nemtsov
  2011-09-22  6:52 ` [PATCH 2/2] wl12xx: report the stop_ba event to all STAs " Arik Nemtsov
  2011-09-23 11:58 ` [PATCH 1/2] wl12xx: correct fw_status structure for 8 sta support " Luciano Coelho
  0 siblings, 2 replies; 3+ messages in thread
From: Arik Nemtsov @ 2011-09-22  6:52 UTC (permalink / raw)
  To: linux-wireless; +Cc: Luciano Coelho, Arik Nemtsov

Fix an erroneous labeling of array boundaries in the fw_status structure.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
---
 drivers/net/wireless/wl12xx/main.c   |    2 ++
 drivers/net/wireless/wl12xx/wl12xx.h |    4 ++--
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c
index 680f558..8768b77 100644
--- a/drivers/net/wireless/wl12xx/main.c
+++ b/drivers/net/wireless/wl12xx/main.c
@@ -4585,6 +4585,8 @@ struct ieee80211_hw *wl1271_alloc_hw(void)
 	int i, j, ret;
 	unsigned int order;
 
+	BUILD_BUG_ON(AP_MAX_LINKS > WL12XX_MAX_LINKS);
+
 	hw = ieee80211_alloc_hw(sizeof(*wl), &wl1271_ops);
 	if (!hw) {
 		wl1271_error("could not alloc ieee80211_hw");
diff --git a/drivers/net/wireless/wl12xx/wl12xx.h b/drivers/net/wireless/wl12xx/wl12xx.h
index 3ceb20c..1b45e87 100644
--- a/drivers/net/wireless/wl12xx/wl12xx.h
+++ b/drivers/net/wireless/wl12xx/wl12xx.h
@@ -138,7 +138,7 @@ extern u32 wl12xx_debug_level;
 #define WL1271_DEFAULT_DTIM_PERIOD 1
 
 #define WL12XX_MAX_ROLES           4
-#define WL12XX_MAX_LINKS           8
+#define WL12XX_MAX_LINKS           12
 #define WL12XX_INVALID_ROLE_ID     0xff
 #define WL12XX_INVALID_LINK_ID     0xff
 
@@ -279,7 +279,7 @@ struct wl12xx_fw_status {
 
 	/* Cumulative counter of released Voice memory blocks */
 	u8 tx_voice_released_blks;
-	u8 padding_1[7];
+	u8 padding_1[3];
 	__le32 log_start_addr;
 } __packed;
 
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] wl12xx: report the stop_ba event to all STAs in AP-mode
  2011-09-22  6:52 [PATCH 1/2] wl12xx: correct fw_status structure for 8 sta support in AP-mode Arik Nemtsov
@ 2011-09-22  6:52 ` Arik Nemtsov
  2011-09-23 11:58 ` [PATCH 1/2] wl12xx: correct fw_status structure for 8 sta support " Luciano Coelho
  1 sibling, 0 replies; 3+ messages in thread
From: Arik Nemtsov @ 2011-09-22  6:52 UTC (permalink / raw)
  To: linux-wireless; +Cc: Luciano Coelho, Arik Nemtsov

Use the AP_MAX_LINKS as the upper boundary for traversing the links array,
thereby guaranteeing BA sessions with all connected STAs are stopped when
the stop_ba event is received.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
---
 drivers/net/wireless/wl12xx/event.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/wl12xx/event.c b/drivers/net/wireless/wl12xx/event.c
index c73fe4c..e66db69 100644
--- a/drivers/net/wireless/wl12xx/event.c
+++ b/drivers/net/wireless/wl12xx/event.c
@@ -181,7 +181,7 @@ static void wl1271_stop_ba_event(struct wl1271 *wl)
 	} else {
 		int i;
 		struct wl1271_link *lnk;
-		for (i = WL1271_AP_STA_HLID_START; i < WL12XX_MAX_LINKS; i++) {
+		for (i = WL1271_AP_STA_HLID_START; i < AP_MAX_LINKS; i++) {
 			lnk = &wl->links[i];
 			if (!wl1271_is_active_sta(wl, i) || !lnk->ba_bitmap)
 				continue;
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/2] wl12xx: correct fw_status structure for 8 sta support in AP-mode
  2011-09-22  6:52 [PATCH 1/2] wl12xx: correct fw_status structure for 8 sta support in AP-mode Arik Nemtsov
  2011-09-22  6:52 ` [PATCH 2/2] wl12xx: report the stop_ba event to all STAs " Arik Nemtsov
@ 2011-09-23 11:58 ` Luciano Coelho
  1 sibling, 0 replies; 3+ messages in thread
From: Luciano Coelho @ 2011-09-23 11:58 UTC (permalink / raw)
  To: Arik Nemtsov; +Cc: linux-wireless

On Thu, 2011-09-22 at 09:52 +0300, Arik Nemtsov wrote: 
> Fix an erroneous labeling of array boundaries in the fw_status structure.
> 
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> Signed-off-by: Arik Nemtsov <arik@wizery.com>
> ---

Applied both.  Thanks, Arik!

-- 
Cheers,
Luca.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-09-23 11:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-22  6:52 [PATCH 1/2] wl12xx: correct fw_status structure for 8 sta support in AP-mode Arik Nemtsov
2011-09-22  6:52 ` [PATCH 2/2] wl12xx: report the stop_ba event to all STAs " Arik Nemtsov
2011-09-23 11:58 ` [PATCH 1/2] wl12xx: correct fw_status structure for 8 sta support " Luciano Coelho

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.