pandora-wifi.git
13 years agowl1251: prevent scan when connected Release-2010-05/1
Grazvydas Ignotas [Fri, 19 Mar 2010 21:00:02 +0000 (23:00 +0200)]
wl1251: prevent scan when connected

14 years agocompat: fix uevent_suppress on 2.6.29 or older kernels
Grazvydas Ignotas [Thu, 22 Apr 2010 13:39:34 +0000 (16:39 +0300)]
compat: fix uevent_suppress on 2.6.29 or older kernels

Missing uevent_suppress is causing two uevents instead of one, which is
confusing udev and sometimes causing firmware load to fail due to race
condition, so let's add it.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
14 years agowl1251: add reset handling
Grazvydas Ignotas [Tue, 20 Apr 2010 13:04:04 +0000 (16:04 +0300)]
wl1251: add reset handling

14 years agowl1251: use sdio_readb_ext for ELP to work
Grazvydas Ignotas [Mon, 19 Apr 2010 19:30:05 +0000 (22:30 +0300)]
wl1251: use sdio_readb_ext for ELP to work

14 years agowl1251: add support for dedicated IRQ line
Grazvydas Ignotas [Fri, 16 Apr 2010 10:22:12 +0000 (13:22 +0300)]
wl1251: add support for dedicated IRQ line

wl1251 has WLAN_IRQ pin for generating interrupts to host processor,
which is mandatory in SPI mode and optional in SDIO mode (which can
use SDIO interrupts instead). However TI recommends using deditated
IRQ line for SDIO too.

Add support for using dedicated interrupt line with SDIO, but also leave
ability to switch to SDIO interrupts in case it's needed.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Reviewed-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1251: register platform_device to pass board data
Grazvydas Ignotas [Thu, 15 Apr 2010 15:23:23 +0000 (18:23 +0300)]
wl1251: register platform_device to pass board data

wl1251 is embedded chip that can be connected using SDIO bus, and is not
an actual SDIO card. For this reason there is a need to pass some board
specific data, like 'EEPROM is attached' flag or power control callback.

However currently there is no way to pass this data through SDIO subsystem,
so this patch registers dummy platform_device to allow that, until we
have a better solution to this.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Acked-by: Kalle Valo <kvalo@adurom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1251: read default MAC address from EEPROM when available
Grazvydas Ignotas [Wed, 14 Apr 2010 10:05:48 +0000 (13:05 +0300)]
wl1251: read default MAC address from EEPROM when available

Some wl1251 hardware configurations (like in WG7210 module) have
EEPROM attached where NVS data is kept, which includes MAC address.

In such configurations, let's read default MAC address from EEPROM,
instead of using random one.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Acked-by: Kalle Valo <kvalo@adurom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1251: don't require NVS data when EEPROM is used
Grazvydas Ignotas [Mon, 12 Apr 2010 22:21:40 +0000 (01:21 +0300)]
wl1251: don't require NVS data when EEPROM is used

If EEPROM is used, NVS data is now loaded but ignored.
Stop loading it to avoid need of dummy NVS file for modules with EEPROM.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Acked-by: Kalle Valo <kvalo@adurom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1251: use DRIVER_NAME macro in wl1251_spi_driver
Kalle Valo [Fri, 2 Apr 2010 12:31:46 +0000 (15:31 +0300)]
wl1251: use DRIVER_NAME macro in wl1251_spi_driver

Better use the macro for consistency, the content is the same anyway.

Signed-off-by: Kalle Valo <kvalo@adurom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1251: fix potential crash
Grazvydas Ignotas [Thu, 11 Mar 2010 15:45:26 +0000 (17:45 +0200)]
wl1251: fix potential crash

In case debugfs does not init for some reason (or is disabled
on older kernels) driver does not allocate stats.fw_stats
structure, but tries to clear it later and trips on a NULL
pointer:

Unable to handle kernel NULL pointer dereference at virtual address
00000000
PC is at __memzero+0x24/0x80
Backtrace:
[<bf0ddb88>] (wl1251_debugfs_reset+0x0/0x30 [wl1251])
[<bf0d6a2c>] (wl1251_op_stop+0x0/0x12c [wl1251])
[<bf0bc228>] (ieee80211_stop_device+0x0/0x74 [mac80211])
[<bf0b0d10>] (ieee80211_stop+0x0/0x4ac [mac80211])
[<c02deeac>] (dev_close+0x0/0xb4)
[<c02deac0>] (dev_change_flags+0x0/0x184)
[<c031f478>] (devinet_ioctl+0x0/0x704)
[<c0320720>] (inet_ioctl+0x0/0x100)

Add a NULL pointer check to fix this.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Acked-by: Kalle Valo <kalle.valo@iki.fi>
Cc: stable@kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1251: reduce eeprom read wait time
Grazvydas Ignotas [Thu, 11 Mar 2010 15:45:07 +0000 (17:45 +0200)]
wl1251: reduce eeprom read wait time

4sec wait is way too pessimistic, TI driver uses 40ms here,
and testing shows that is ebough, so let's also use that.
While at it, add useful sounding comment from the TI driver.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Acked-by: Kalle Valo <kalle.valo@iki.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1251: fix ELP_CTRL register accesses when using SDIO
Grazvydas Ignotas [Thu, 11 Mar 2010 15:44:57 +0000 (17:44 +0200)]
wl1251: fix ELP_CTRL register accesses when using SDIO

For some unknown reason ELP_CTRL can't be accesed using
sdio_memcpy_* functions (any attemts to do so result in timeouts):

 wl1251: ERROR sdio write failed (-110)
 wl1251: ERROR sdio read failed (-110)
 wl1251: WARNING WLAN not ready

To fix this, add special IO functions for ELP_CTRL access that are
using sdio_readb/sdio_writeb. Similar handling is done in TI
reference driver from Android code drop.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Cc: Bob Copeland <me@bobcopeland.com>
Acked-by: Kalle Valo <kalle.valo@iki.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1251: make local symbols static
Grazvydas Ignotas [Fri, 12 Mar 2010 10:28:41 +0000 (12:28 +0200)]
wl1251: make local symbols static

Make local functions and data static, also constify
some structures. While at it, clean up unneeded includes.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Cc: Bob Copeland <me@bobcopeland.com>
Acked-by: Kalle Valo <kalle.valo@iki.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agocompat-wireless-2010-03-10
Grazvydas Ignotas [Mon, 19 Apr 2010 16:08:33 +0000 (19:08 +0300)]
compat-wireless-2010-03-10