Skip to contentSkip to conversation

wl1251: maemo fixes

PATCH In review Grazvydas Ignotas 2 participants 7 messages Jun 16, 2012 – Jul 5, 2012 TI wilink wireless drivers

lore
Share & tools
lore
#0 lore raw

cover wl1251: maemo fixes

Here are a few old wl1251 patches found in maemo repositories that haven't ever reached mainline. I did not keep 'From:' and s-o-b as the patches are rebased and slightly modified, also most emails are probably dead due to Nokia's reorganization, so original authors are just listed in commit messages.

Grazvydas Ignotas (3):
wl1251: remove unused filter_work
wl1251: fix filtering support
wl1251: send filters to firmware as they are set

 drivers/net/wireless/ti/wl1251/cmd.c    |    9 ----
 drivers/net/wireless/ti/wl1251/main.c   |   67 +++++++++++++------------------
 drivers/net/wireless/ti/wl1251/wl1251.h |    1 -
 3 files changed, 28 insertions(+), 49 deletions(-)
#1 lore raw

PATCH 1/3 wl1251: fix TSF calculation

Cast MSB part of current TSF to u64 to prevent loss of most significant bits. MSB should also be shifted by 32.

Patch based on old maemo patch by:
Yuri Kululin <[email protected]>
Yuri Ershov <[email protected]>

---
 drivers/net/wireless/ti/wl1251/acx.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/wireless/ti/wl1251/acx.c +1 -1
index ad87a1a..db6430c 100644
@@ -869,7 +869,7 @@ int wl1251_acx_tsf_info(struct wl1251 *wl, u64 *mactime)
 	}
 
 	*mactime = tsf_info->current_tsf_lsb |
-		(tsf_info->current_tsf_msb << 31);
+		((u64)tsf_info->current_tsf_msb << 32);
 
 out:
 	kfree(tsf_info);
Signature · 1 line
1.7.0.4
#2 lore raw

Re: [PATCH 1/3] wl1251: fix TSF calculation

Hello all,

Regarding the TSF, is there a way to read from an outside program the TSF to help stations or programs have a "synchronization" low level reference time?

Any ideas would be appreciated!
Thank you!
Guido

Quoted 25 lines · Grazvydas Ignotas

Cast MSB part of current TSF to u64 to prevent loss of most significant bits. MSB should also be shifted by 32.

Patch based on old maemo patch by:
Yuri Kululin <[email protected]>
Yuri Ershov <[email protected]>

---
 drivers/net/wireless/ti/wl1251/acx.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/wireless/ti/wl1251/acx.c +1 -1
index ad87a1a..db6430c 100644
@@ -869,7 +869,7 @@ int wl1251_acx_tsf_info(struct wl1251 *wl, u64 *mactime)
 	}
 
 	*mactime = tsf_info->current_tsf_lsb |
-		(tsf_info->current_tsf_msb << 31);
+		((u64)tsf_info->current_tsf_msb << 32);
 
 out:
 	kfree(tsf_info);
#3 lore raw

PATCH 2/3 wl1251: always report beacon loss to the stack

In reply to Grazvydas Ignotas

Always report beacon loss to the stack, not only when in powersave state. This is because there's possibility that the driver disables PSM before it handles old BSS_LOSE_EVENT, so beacon loss has to be reported.

Patch based on old maemo patch by:
Janne Ylalehto <[email protected]>
Juuso Oikarinen <[email protected]>
Luciano Coelho <[email protected]>
Yuri Ershov <[email protected]>

---
 drivers/net/wireless/ti/wl1251/event.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
drivers/net/wireless/ti/wl1251/event.c +1 -2
index 9f15cca..5ec50a4 100644
@@ -76,8 +76,7 @@ static int wl1251_event_process(struct wl1251 *wl, struct event_mailbox *mbox)
 		}
 	}
 
-	if (vector & SYNCHRONIZATION_TIMEOUT_EVENT_ID &&
-	    wl->station_mode != STATION_ACTIVE_MODE) {
+	if (vector & SYNCHRONIZATION_TIMEOUT_EVENT_ID) {
 		wl1251_debug(DEBUG_EVENT, "SYNCHRONIZATION_TIMEOUT_EVENT");
 
 		/* indicate to the stack, that beacons have been lost */
Signature · 1 line
1.7.0.4
#4 lore raw

PATCH 3/3 wl1251: Fix memory leaks in SPI initialization

In reply to Grazvydas Ignotas

This patch fixes two memory leaks in the SPI initialization code.

Patch based on old maemo patch by:
Yuri Ershov <[email protected]>

---
 drivers/net/wireless/ti/wl1251/spi.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
drivers/net/wireless/ti/wl1251/spi.c +4 -0
index 87f6305..567660c 100644
@@ -73,6 +73,8 @@ static void wl1251_spi_reset(struct wl1251 *wl)
 	spi_sync(wl_to_spi(wl), &m);
 
 	wl1251_dump(DEBUG_SPI, "spi reset -> ", cmd, WSPI_INIT_CMD_LEN);
+
+	kfree(cmd);
 }
 
 static void wl1251_spi_wake(struct wl1251 *wl)
@@ -127,6 +129,8 @@ static void wl1251_spi_wake(struct wl1251 *wl)
 	spi_sync(wl_to_spi(wl), &m);
 
 	wl1251_dump(DEBUG_SPI, "spi init -> ", cmd, WSPI_INIT_CMD_LEN);
+
+	kfree(cmd);
 }
 
 static void wl1251_spi_reset_wake(struct wl1251 *wl)
Signature · 1 line
1.7.0.4
#5 lore raw
In reply to Grazvydas Ignotas
Quoted 5 lines · Grazvydas Ignotas

Here are a few old wl1251 patches found in maemo repositories that haven't ever reached mainline. I did not keep 'From:' and s-o-b as the patches are rebased and slightly modified, also most emails are probably dead due to Nokia's reorganization, so original authors are just listed in commit messages.

Anything wrong with these? There was a comment on 0001, but that was a question unrelated to the patch itself.

Quoted 5 lines

Grazvydas Ignotas (3):
wl1251: remove unused filter_work
wl1251: fix filtering support
wl1251: send filters to firmware as they are set

I've just noticed this shortlog is wrong, but patches themselves that were sent to the list are correct, do I need to resend? Here is the right shortlog:

Grazvydas Ignotas (3):
wl1251: fix TSF calculation
wl1251: always report beacon loss to the stack
wl1251: Fix memory leaks in SPI initialization

 drivers/net/wireless/ti/wl1251/acx.c   |    2 +-
 drivers/net/wireless/ti/wl1251/event.c |    3 +--
 drivers/net/wireless/ti/wl1251/spi.c   |    4 ++++
 3 files changed, 6 insertions(+), 3 deletions(-)
#6 lore raw
Quoted 9 lines · Grazvydas Ignotas
Quoted 5 lines · Grazvydas Ignotas

Here are a few old wl1251 patches found in maemo repositories that haven't ever reached mainline. I did not keep 'From:' and s-o-b as the patches are rebased and slightly modified, also most emails are probably dead due to Nokia's reorganization, so original authors are just listed in commit messages.

Anything wrong with these? There was a comment on 0001, but that was a question unrelated to the patch itself.

Whoops, just noticed they went into -rc, I was expecting them in wireless-next :)
Sorry for the noise.

Signature · 1 line
Gražvydas