aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless/wl12xx
AgeCommit message (Collapse)Author
2009-07-10mac80211: push rx status into skb->cbJohannes Berg
Within mac80211, we often need to copy the rx status into skb->cb. This is wasteful, as drivers could be building it in there to start with. This patch changes the API so that drivers are expected to pass the RX status in skb->cb, now accessible as IEEE80211_SKB_RXCB(skb). It also updates all drivers to pass the rx status in there, but only by making them memcpy() it into place before the call to the receive function (ieee80211_rx(_irqsafe)). Each driver can now be optimised on its own schedule. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-07-10wl1251: change psm enabled/disabled info to debugLuciano Coelho
With shorter CAM timeouts, the logs get flooded with "psm enabled" and "psm disabled traces. This patch changes it from wl1251_info to wl1251_debug, so they are only shown if DEBUF_PSM is enabled. Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com> Reviewed-by: Janne Ylalehto <janne.ylalehto@nokia.com> Signed-off-by: Kalle Valo <kalle.valo@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-07-10wl1251: fix a checkpatch warningKalle Valo
drivers/net/wireless/wl12xx/wl1251_main.c:158: WARNING: braces {} are not necessary for single statement blocks Signed-off-by: Kalle Valo <kalle.valo@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-07-10wl1251: use wl1251 prefix everywhereKalle Valo
Last we can change all code prefixes from wl12xx/WL12XX to wl1251/WL1251. Signed-off-by: Kalle Valo <kalle.valo@nokia.com> Reviewed-by: Vidhya Govindan <vidhya.govindan@nokia.com> Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-07-10wl12xx: remove unused wl12xx_hw_init_mem_config()Kalle Valo
The function declaration is a leftover from some earlier, already removed, code. Signed-off-by: Kalle Valo <kalle.valo@nokia.com> Reviewed-by: Vidhya Govindan <vidhya.govindan@nokia.com> Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-07-10wl1251: rename wl12xx.h to wl1251.hKalle Valo
wl12xx.h is now only used by 1251 code, so we can rename it. Signed-off-by: Kalle Valo <kalle.valo@nokia.com> Reviewed-by: Vidhya Govindan <vidhya.govindan@nokia.com> Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-07-10wl1251: add wl1251 prefix to all 1251 filesKalle Valo
Now that all 1271 files are split, we can add wl1251_ prefix to the files. Signed-off-by: Kalle Valo <kalle.valo@nokia.com> Reviewed-by: Vidhya Govindan <vidhya.govindan@nokia.com> Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-07-10wl1251: remove wl1271_setup()Kalle Valo
We don't want to have any 1271 code in wl1251. Signed-off-by: Kalle Valo <kalle.valo@nokia.com> Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com> Reviewed-by: Vidhya Govindan <vidhya.govindan@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-07-10wl12xx: rename driver to wl1251Kalle Valo
Rename driver to wl1251.ko in preparation for wl1271 driver. Signed-off-by: Kalle Valo <kalle.valo@nokia.com> Reviewed-by: Vidhya Govindan <vidhya.govindan@nokia.com> Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-07-10wl12xx: rename wl1251.c wl1251_ops.cKalle Valo
In preparation to split wl12xx to wl1251 and wl1271. Signed-off-by: Kalle Valo <kalle.valo@nokia.com> Reviewed-by: Vidhya Govindan <vidhya.govindan@nokia.com> Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-07-10wl12xx: Use chipset specific join commandsJuuso Oikarinen
Add implementation to use chipset specific join commands. Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com> Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com> Signed-off-by: Kalle Valo <kalle.valo@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-07-10wl12xx: Assign value to rx msdu lifetime variableVidhya Govindan
The patch "wl12xx: cmd and acx interface rework" failed to assign MSDU lifetime value in wl12xx_acx_rx_msdu_life_time() and breaks the functionality. This patch fixes the regression by assigning the correct value. Signed-off-by: Vidhya Govindan <vidhya.govindan@nokia.com> Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com> Signed-off-by: Kalle Valo <kalle.valo@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-07-10wl12xx: enable ELP modeKalle Valo
ELP mode is working now, let's enable it so that the firmware can sleep and reduce power consumption. Signed-off-by: Kalle Valo <kalle.valo@nokia.com> Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com> Reviewed-by: Vidhya Govindan <vidhya.govindan@nokia.com> Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-07-10wl12xx: check if elp wakeup failedKalle Valo
Check the return call from wl12xx_ps_elp_wakeup() and bail out if it fails. This shouldn't happen, but if does there's a fundamental low level issue. Signed-off-by: Kalle Valo <kalle.valo@nokia.com> Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com> Reviewed-by: Vidhya Govindan <vidhya.govindan@nokia.com> Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-07-10wl12xx: optimise elp wakeup and sleep callsKalle Valo
The wakeup call was done too deep in code path, it's better to wakeup chip from higher levels. This will also reduce wakeup calls significantly. Signed-off-by: Kalle Valo <kalle.valo@nokia.com> Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com> Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-07-10wl12xx: protect wl12xx_op_set_rts_threshold()Kalle Valo
The function doesn't lock the mutex before sending the acx. Signed-off-by: Kalle Valo <kalle.valo@nokia.com> Reviewed-by: Vidhya Govindan <vidhya.govindan@nokia.com> Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-07-10wl12xx: Fix CMD_TEST regression via netlink.Ari Kauppi
CMD_TEST via netlink API has been broken since e29c3f59cfbc38c3b481a2694b08962da19c4664: cmd and acx interface rework. The user of the interface sends the request in a buffer without the wl12xx_command header but expects the response to have the wl12xx_command header (with id and status). This patch reverts the e29c3f5 commit for cmd.c:wl12xx_cmd_test and implements the needed wrapper functionality in netlink.c. Now the API of wl12xx_cmd_test and rest of wl12xx_cmd_* commands in cmd.c are similar. Signed-off-by: Ari Kauppi <Ext-Ari.Kauppi@nokia.com> Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com> Signed-off-by: Kalle Valo <kalle.valo@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-07-10wl12xx: Fix incorrect warning message.Ari Kauppi
A warning message in wl12xx_acx_event_mbox_mask has a copy/paste error. Fix it to print the correct acx command. Signed-off-by: Ari Kauppi <Ext-Ari.Kauppi@nokia.com> Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com> Signed-off-by: Kalle Valo <kalle.valo@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-07-10wl12xx: Add support for block reading from a fixed register addressJuuso Oikarinen
Add support for block reading (multiple bytes) from a fixed chipset register address. This is required for the wl1271 TX data path. Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com> Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com> Signed-off-by: Kalle Valo <kalle.valo@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-07-10wl12xx: Moved wl1251 TX path implementation into chip specific filesJuuso Oikarinen
Moved wl1251 TX path implementation into chip specific files to enable parallel implementation for the wl1271 TX path. Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com> Signed-off-by: Kalle Valo <kalle.valo@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-07-10wl12xx: pass the wake up condition when configuring the wake up eventLuciano Coelho
Changed the function wl12xx_acx_wake_up_conditions() so that it receives an argument with the actual wake up condition, instead of having WAKE_UP_EVENT_DTIM_BITMAP hardcoded. This is needed because we have to use different conditions in 1271. Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com> Signed-off-by: Kalle Valo <kalle.valo@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-07-10wl12xx: add support for fixed address in wl12xx_spi_readLuciano Coelho
In the wl1271 implementation, we need to read memory from the register partition using fixed addresses. This change adds the possibility to request fixed address when calling wl12xx_spi_read() or wl12xx_spi_reg_read(). Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com> Signed-off-by: Kalle Valo <kalle.valo@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-07-10wl12xx: add support for new WL1271 chip revisionLuciano Coelho
This patch adds the code that recognizes the new WL1271 chip revision (PG 2.0). Full support for this chip is not yet implemented and support for WL1271 PG 1.0 is not guaranteed anymore. Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com> Signed-off-by: Kalle Valo <kalle.valo@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-07-10wl12xx: moved firmware version reading routine to chip-specific functionsLuciano Coelho
With WL1271, the firmware version can only be read right after booting the chip. To keep WL1251 aligned with this procedure, the code that reads the firmware version initially has been moved to a common place where it can be read from both chipsets. Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com> Signed-off-by: Kalle Valo <kalle.valo@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-07-10wl12xx: add wl12xx_spi_reg_read() and wl12xx_spi_reg_write() functionsLuciano Coelho
In some cases we need to read more than 32 bits from the register area. These functions were added to support that, like the existing wl12xx_spi_mem_read() and wl12xx_spi_mem_write() already do for large blocks in the memory area. Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com> Signed-off-by: Kalle Valo <kalle.valo@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-07-10wl12xx: removed chipset interrupt source configuration from fw wakeupJuuso Oikarinen
The chipset source interrupt source configuration during fw wakeup was blocking interrupts on the wl1271. The configuration is effectively unused here as it is used to trigger an interrupt for the chipset wake-up event, which is not handled, or waited for, in the fw wakeup anyway on either wl1251 or wl1271. Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com> Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com> Signed-off-by: Kalle Valo <kalle.valo@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-07-10wl12xx: fix rx descriptor useKalle Valo
Rx descriptor was incorrectly allocated from stack, use struct wl12xx instead. Needed for DMA transfers. Signed-off-by: Kalle Valo <kalle.valo@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-07-10wl12xx: use wl12xx_mem_read32() to read the rx counterKalle Valo
As a side effect the transfer is now DMA safe. Signed-off-by: Kalle Valo <kalle.valo@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-07-10wl12xx: allocate buffer the spi busy word from struct wl12xxKalle Valo
Needed for DMA transfers. Signed-off-by: Kalle Valo <kalle.valo@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-07-10wl12xx: allocate buffer spi read/write command buffer kzalloc()Kalle Valo
Needed for DMA safe transfers. Signed-off-by: Kalle Valo <kalle.valo@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-07-10wl12xx: reserve buffer for partition command in struct wl12xxKalle Valo
This is now DMA safe. Signed-off-by: Kalle Valo <kalle.valo@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-07-10wl12xx: fix error handling in wl12xx_probe()Kalle Valo
Resources were not freed properly in some cases. Signed-off-by: Kalle Valo <kalle.valo@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-07-10wl12xx: reserver buffer for read32()/write32() in struct wl12xxKalle Valo
The buffer is needed for DMA safe transfers. Signed-off-by: Kalle Valo <kalle.valo@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-07-10wl12xx: cmd and acx interface reworkKalle Valo
Rework cmd and acx interfaces, it was just too confusing earlier. Now all commands need to contain all the needed headers, either just cmd headers or both cmd and acx headers. This accomplish to remove the extra copy done for each command. The interfaces are now properly documented as well. Also try to make all commands safe for DMA transfers. I might have missed some, but most of them should be fixed now. And this is not all! As a free bonus you will also get some cosmetic cleanups and code reorganisation. Order today! Signed-off-by: Kalle Valo <kalle.valo@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-05-11wireless: WL12XX should depend on GENERIC_HARDIRQSGeert Uytterhoeven
m68k allmodconfig: | drivers/net/wireless/wl12xx/main.c: In function 'wl12xx_probe': | drivers/net/wireless/wl12xx/main.c:1273: error: implicit declaration of function 'set_irq_type' | make[1]: *** [drivers/net/wireless/wl12xx/main.o] Error 1 Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Kalle Valo <kalle.valo@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-05-06wl12xx: correct printk format warningsBob Copeland
Fixes warnings: drivers/net/wireless/wl12xx/main.c:87: warning: int format, different type arg (arg 2) drivers/net/wireless/wl12xx/main.c: In function `wl12xx_fetch_nvs': drivers/net/wireless/wl12xx/main.c:125: warning: int format, different type arg (arg 2) drivers/net/wireless/wl12xx/wl1251.c: In function 'wl1251_upload_firmware': drivers/net/wireless/wl12xx/wl1251.c:94: warning: int format, different type arg (arg 2) drivers/net/wireless/wl12xx/wl1251.c:141: warning: int format, different type arg (arg 2) Signed-off-by: Bob Copeland <me@bobcopeland.com> Acked-by: Kalle Valo <kalle.valo@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-05-06wl12xx: add driverKalle Valo
wl12xx is a driver for TI wl1251 802.11 chipset designed for embedded devices, supporting both SDIO and SPI busses. Currently the driver supports only SPI. Adding support 1253 (the 5 GHz version) should be relatively easy. More information here: http://focus.ti.com/general/docs/wtbu/wtbuproductcontent.tsp?contentId=4711&navigationId=12494&templateId=6123 (Collapsed original sequence of pre-merge patches into single commit for initial merge. -- JWL) Signed-off-by: Kalle Valo <kalle.valo@nokia.com> Signed-off-by: Bob Copeland <me@bobcopeland.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>