summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ti
AgeCommit message (Collapse)Author
2012-06-05wl18xx: implement hw op for getting rx packet data lengthArik Nemtsov
Implement the 18xx-specific way for getting the length of a Rx packet. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-05wl18xx: implement hw op for getting rx buffer data alignmentArik Nemtsov
Implement the HW op for getting alignment state in wl18xx. The FW aligns the Rx Ethernet payload data. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-05wl18xx: set Rx block-size alignment quirkArik Nemtsov
The 18xx FW sends Rx blocks with aligned length. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-05wl18xx: add fw_status private dataArik Nemtsov
The wl18xx chip passes extra information in the firmware status to the driver. Add a private data section to handle that. Signed-off-by: Luciano Coelho <coelho@ti.com> Signed-off-by: Arik Nemtsov <arik@wizery.com>
2012-06-05wl18xx: define HW-rate translation elements/tablesArik Nemtsov
Define HW-rate conversion tables for the 18xx chip. Initialize the appropriate wlcore elements with these tables and values to allow conversion of HW-rates. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-05wl18xx: implement hw op for setting frame length in tx_hw_descArik Nemtsov
Set the frame length during Tx in a way compatible with the 18xx FW. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-05wl18xx: implement hw op for setting blocks in hw_tx_descArik Nemtsov
Add the 18xx variant to the HW Tx descriptor union and set the 18xx specific values during Tx. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-05wl18xx: implement hw op for calculating hw block count per packetArik Nemtsov
Implement the calc_tx_blocks op for the 18xx family. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-05wl18xx: set normal/GEM Tx spare block countsArik Nemtsov
Initialize the Tx spare block counts for all operating modes in the 18xx card. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-05wl18xx: set the number of Tx descriptorsArik Nemtsov
Initialize the number of Tx-descriptors for the 18xx family. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-05wl18xx: create per-chip-family private storageArik Nemtsov
Make use of the wlcore provided private storage in the 18xx low-level driver. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-05wl18xx: add trigger command and ack event operationsLuciano Coelho
Add the operations that allow wlcore to trigger commands to the firmware and acknowledge when an event has been fully received. Allocate a private buffer to hold the maximum sized cmd. Send the entire length of the buffer each time a command is sent to signal EOT. Remove the previous EOT mechanism. Signed-off-by: Luciano Coelho <coelho@ti.com> Signed-off-by: Arik Nemtsov <arik@wizery.com>
2012-06-05wl18xx: add some boot operations and hw-specific configurationsLuciano Coelho
Implement the boot operation. Add a wl18xx-specific configuration structure (namely to configure the mac and phy parameters). The default hw configuration matches the DVP board. Signed-off-by: Luciano Coelho <coelho@ti.com> Signed-off-by: Arik Nemtsov <arik@wizery.com>
2012-06-05wl18xx: add identify chip operationLuciano Coelho
Add identify_chip operation to detect the chip ID for wl185x and set the correct firmware name. Signed-off-by: Luciano Coelho <coelho@ti.com> Signed-off-by: Arik Nemtsov <arik@wizery.com>
2012-06-05wl18xx: add register tableLuciano Coelho
Add the register table with the appropriate values for wl18xx. Signed-off-by: Luciano Coelho <coelho@ti.com> Signed-off-by: Arik Nemtsov <arik@wizery.com>
2012-06-05wl18xx: add partition tableLuciano Coelho
Define and add the partition table in the wlcore struct. Signed-off-by: Luciano Coelho <coelho@ti.com> Signed-off-by: Arik Nemtsov <arik@wizery.com>
2012-06-05wl18xx: add empty operations structLuciano Coelho
We don't have any chip-specific operations yet, but now wlcore has defined an operations structure and requires the pointer to be set. Signed-off-by: Luciano Coelho <coelho@ti.com> Signed-off-by: Arik Nemtsov <arik@wizery.com>
2012-06-05wlcore_sdio/wl18xx: use SDIO revision number to identify wl18xx chipsLuciano Coelho
At least in PG1, the wl18xx chips use the same SDIO vendor/device ID, so it's not possible to figure out which driver is to be used. As a workaround, we can check the SDIO revision number, because wl18xx uses 3.00 and wl12xx does not. Signed-off-by: Luciano Coelho <coelho@ti.com> Signed-off-by: Arik Nemtsov <arik@wizery.com>
2012-06-05wl18xx: add new moduleLuciano Coelho
Add the wl18xx module and the probe functions. Use wlcore for the main parts (not functional at this point due to differences in the wl18xx initialization). Signed-off-by: Luciano Coelho <coelho@ti.com> Signed-off-by: Arik Nemtsov <arik@wizery.com>
2012-05-29wlcore: fix undefined symbols when CONFIG_PM is not definedEyal Shapira
commit c21eebb50379a96e1335e933583dcd5b455c6b64 "wl12xx: add RX filters ACX commands" breaks the build when CONFIG_PM isn't defined: ERROR: "wl1271_rx_filter_get_fields_size" [drivers/net/wireless/ti/wlcore/wlcore.ko] undefined! ERROR: "wl1271_rx_filter_flatten_fields" [drivers/net/wireless/ti/wlcore/wlcore.ko] undefined! code in drivers/net/wireless/ti/wlcore/acx.c is using these functions unconditionally while they are #ifdefed CONFIG_PM. Fix it by ifdefing all relevant RX filters code with CONFIG_PM. Reported-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Eyal Shapira <eyal@wizery.com> Acked-by: Luciano Coelho <coelho@ti.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-25wl1251: fix oops on early interruptGrazvydas Ignotas
This driver disables interrupt just after requesting it and enables it later, after interface is up. However currently there is a time window between request_irq() and disable_irq() where if interrupt arrives, the driver oopses because it's not yet ready to process it. This can be reproduced by inserting the module, associating and removing the module multiple times. Eliminate this race by setting IRQF_NOAUTOEN flag before request_irq(). Cc: stable@vger.kernel.org # v2.6.37+ Signed-off-by: Grazvydas Ignotas <notasas@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-16wlcore: fix some sparse warnings due to missing static declarationLuciano Coelho
There were three sparse warnings in main.c due to missing static declaration: CHECK drivers/net/wireless/ti/wlcore/main.c drivers/net/wireless/ti/wlcore/main.c:1265:5: warning: symbol 'wl1271_validate_wowlan_pattern' was not declared. Should it be static? drivers/net/wireless/ti/wlcore/main.c:1408:5: warning: symbol 'wl1271_convert_wowlan_pattern_to_rx_filter' was not declared. Should it be static? drivers/net/wireless/ti/wlcore/main.c:4823:6: warning: symbol 'wl1271_connection_loss_work' was not declared. Should it be static? Fix these by adding the static declaration to those functions. Signed-off-by: Luciano Coelho <coelho@ti.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-16wlcore: fix pointer print out in wl1271_acx_set_rx_filter()Luciano Coelho
The debug print in wl1271_acx_set_rx_filter() was causing the following warning: CC drivers/net/wireless/ti/wlcore/acx.o drivers/net/wireless/ti/wlcore/acx.c: In function ‘wl1271_acx_set_rx_filter’: drivers/net/wireless/ti/wlcore/acx.c:1759:2: warning: cast from pointer to integer of different size Instead of casting the pointer to an integer, use %p to print it our instead. Reported-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: Luciano Coelho <coelho@ti.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-15wlcore/wl12xx: implement better beacon loss handlingBartosz.Markowski@tieto.com
Make use of REGAINED_BSS_EVENT and instead of reporting connection loss immediately on each BEACON_LOSE event, try if not regained in reasonable period of time. Signed-off-by: bartosz.markowski <bartosz.markowski@tieto.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-05-15wlcore: fix size of two memset's in wl1271_cmd_build_arp_rsp()Jesper Juhl
We currently do this: int wl1271_cmd_build_arp_rsp(struct wl1271 *wl, struct wl12xx_vif *wlvif) ... struct wl12xx_arp_rsp_template *tmpl; struct ieee80211_hdr_3addr *hdr; ... tmpl = (struct wl12xx_arp_rsp_template *)skb_put(skb, sizeof(*tmpl)); memset(tmpl, 0, sizeof(tmpl)); ... hdr = (struct ieee80211_hdr_3addr *)skb_push(skb, sizeof(*hdr)); memset(hdr, 0, sizeof(hdr)); ... I believe we want to set the entire structures to 0 with those memset() calls, not just zero the initial part of them (size of the pointer bytes). Signed-off-by: Jesper Juhl <jj@chaosbits.net> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-05-15wireless: TI wlxxx depends on MAC80211Randy Dunlap
wl12xx build fails with many undefined symbol errors when MAC80211 and CFG80211 are not enabled, so make WLCORE and WL12XX depend on MAC80211 (which already depends on CFG80211). Here are a few of the many build errors: drivers/built-in.o: In function `wl1271_register_hw': main.c:(.text+0x4197cd): undefined reference to `ieee80211_register_hw' drivers/built-in.o: In function `wl1271_rx_streaming_timer': main.c:(.text+0x419818): undefined reference to `ieee80211_queue_work' drivers/built-in.o: In function `wl1271_flush_deferred_work': main.c:(.text+0x419910): undefined reference to `ieee80211_rx' main.c:(.text+0x419938): undefined reference to `ieee80211_tx_status' drivers/built-in.o: In function `wl12xx_op_channel_switch': main.c:(.text+0x419afc): undefined reference to `ieee80211_chswitch_done' drivers/built-in.o: In function `wl1271_ssid_set': drivers/built-in.o: In function `wl1271_event_process': event.c:(.text+0x41fec4): undefined reference to `ieee80211_sched_scan_stopped' event.c:(.text+0x41ff88): undefined reference to `ieee80211_cqm_rssi_notify' event.c:(.text+0x42000d): undefined reference to `ieee80211_stop_rx_ba_session' event.c:(.text+0x420048): undefined reference to `ieee80211_stop_rx_ba_session' event.c:(.text+0x4200b8): undefined reference to `ieee80211_chswitch_done' event.c:(.text+0x4201ae): undefined reference to `ieee80211_find_sta' event.c:(.text+0x4201ba): undefined reference to `ieee80211_report_low_ack' event.c:(.text+0x42021b): undefined reference to `ieee80211_connection_loss' drivers/built-in.o: In function `wl1271_tx_complete_packet': tx.c:(.text+0x4206a6): undefined reference to `ieee80211_get_hdrlen_from_skb' drivers/built-in.o: In function `wl1271_tx_fill_hdr': tx.c:(.text+0x4208ca): undefined reference to `ieee80211_hdrlen' drivers/built-in.o: In function `wl1271_handle_tx_low_watermark': (.text+0x420e25): undefined reference to `ieee80211_wake_queue' drivers/built-in.o: In function `wl12xx_rearm_rx_streaming': (.text+0x420ed9): undefined reference to `ieee80211_queue_work' drivers/built-in.o: In function `wl1271_tx_work_locked': (.text+0x421008): undefined reference to `ieee80211_free_txskb' drivers/built-in.o: In function `wl1271_rx_status.clone.2': rx.c:(.text+0x421593): undefined reference to `ieee80211_channel_to_frequency' drivers/built-in.o: In function `wl1271_ps_filter_frames': ps.c:(.text+0x421a41): undefined reference to `ieee80211_tx_status' Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Cc: Luciano Coelho <coelho@ti.com> Cc: linux-wireless@vger.kernel.org Cc: "John W. Linville" <linville@tuxdriver.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-05-15wlcore: fixup an allocationDan Carpenter
GFP_DMA isn't supposed to be used by itself. This allocation is allowed to sleep so it should be ORing it with GFP_KERNEL. Also we should check for allocations errors. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-05-15wlcore: release lock on error in wl1271_op_suspend()Dan Carpenter
We should release this lock before returning. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-05-15wl12xx: support wowlan wakeup patternsEyal Shapira
Use FW RX data filters to support cfg80211 wowlan wakeup patterns. This enables to wake up the host from suspend following detection of certain configurable patterns within an incoming packet. Up to 5 patterns are supported. Once the host is resumed any configured RX data filter is cleared. A single pattern can match several bytes sequences with different offsets within a packet. Signed-off-by: Eyal Shapira <eyal@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-05-15wlcore: add RX filters driver state mgmt functionsEyal Shapira
More prep work to support wowlan wakeup patterns. Added some wrappers that also keep the current filters state updated in the driver. Signed-off-by: Eyal Shapira <eyal@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-05-15wl12xx: add RX filters ACX commandsEyal Shapira
More prep work for wowlan patterns. Added ACXs to set global RX filter behavior and enable or disable a specific filter. Signed-off-by: Eyal Shapira <eyal@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-05-15wlcore: add RX filters util functionsEyal Shapira
This is prep work for the support of wowlan patterns using the FW data rx filters mechanism. Added an rx filter struct and some util functions required to manipulate it. Signed-off-by: Eyal Shapira <eyal@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-05-15wlcore: use GFP_KERNEL together with GFP_DMALuciano Coelho
GFP_DMA should not be used by itself, it still needs GFP_KERNEL or such. Fix two occurrences of allocations with GFP_DMA only. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-05-08Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller
Conflicts: drivers/net/ethernet/intel/e1000e/param.c drivers/net/wireless/iwlwifi/iwl-agn-rx.c drivers/net/wireless/iwlwifi/iwl-trans-pcie-rx.c drivers/net/wireless/iwlwifi/iwl-trans.h Resolved the iwlwifi conflict with mainline using 3-way diff posted by John Linville and Stephen Rothwell. In 'net' we added a bug fix to make iwlwifi report a more accurate skb->truesize but this conflicted with RX path changes that happened meanwhile in net-next. In e1000e a conflict arose in the validation code for settings of adapter->itr. 'net-next' had more sophisticated logic so that logic was used. Signed-off-by: David S. Miller <davem@davemloft.net>
2012-04-18Merge branch 'master' of ↵John W. Linville
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem Conflicts: drivers/net/wireless/iwlwifi/iwl-testmode.c include/net/nfc/nfc.h net/nfc/netlink.c net/wireless/nl80211.c
2012-04-13Merge branch 'for-linville' of ↵John W. Linville
git://git.kernel.org/pub/scm/linux/kernel/git/luca/wl12xx
2012-04-12Merge branch 'wl12xx-next' into for-linvilleLuciano Coelho
2012-04-12wlcore/wl12xx: adapt FW status for multiple familiesArik Nemtsov
Add room for a private data struct at the end of the common FW status. Add a convenience "counters" struct inside the FW status. The wl12xx family does not currently use the FW status private data. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-04-12wlcore: add module param to prevent HW recoveryArik Nemtsov
Allow preventing HW recovery from a module param. The driver/FW will remain stuck, to allow easier FW debugging. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-04-12wlcore/wl12xx: move identify firmware function to a lower driver opLuciano Coelho
Different chip families have different firmware versions, so we need to identify the firmware to enable quirks, reject the used version etc. in the lower drivers. This commit turns the fw_ver_quirks function into an identify_fw operation. Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-04-12wlcore: set max_rx_agg_subframes in mac80211 according to HT confArik Nemtsov
The max Rx aggregation subframes configured to FW must be the same number given to the upper layers (mac80211). Derive both from the same value, given in the conf struct. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-04-12wlcore/wl12xx: set HT capabilities per chip-familyArik Nemtsov
Set HT capabilities in the low-level HW driver. These are then used by wlcore when registering with mac80211. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-04-12wlcore/wl12xx: add hw op to get rate-mask for AP-link in STA modeArik Nemtsov
In some chip-families, there are operating modes where we must mask-out certain Tx rates, and/or tweak the rate-mask with special HW-specific bits. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-04-12wlcore/wl12xx: use a single memory config and reset if using wl127xLuciano Coelho
Instead of having two memory configuration sets, one for wl127x and one for wl128x, we can use only one which should be correctly set by the lower driver. The wl12xx driver now uses the wl128x memory config by default but changes it when if it identifies the wl127x chips. Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-04-12wlcore/wl12xx: move extended radio configuration parameters to wl12xxLuciano Coelho
The extended radio configuration parameters are only used by the wl127x chipsets, which are handled by the wl12xx driver. Move the rf configuration settings from wlcore to wl12xx. Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-04-12wlcore/wl12xx: move runtime configuration struct to the lower driverLuciano Coelho
The configuration parameters vary with different chip families. Some of the parameters used only by some chip families, others should have different value depending on the family. Thus move the configuration values from wlcore to wl12xx. Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-04-12wlcore/wl12xx: expand functionality of cmd_trigger HW opArik Nemtsov
Change the cmd_trigger op to include the write of the command buffer. Also, instead of letting the lower driver access the cmd_box_addr element directly, we now pass the address in the trigger_cmd operation, so it doesn't have to be exported. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-04-12wlcore/wl12xx: add hw op for vif initArik Nemtsov
Add an op for family-specific vif initialization. Currently unused, but will be needed when wl18xx support is implemented. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-04-12wlcore/wl12xx: add hw_init operationLuciano Coelho
Move all the wl12xx-specific hw initialization procedures into a new hw_init op. Move some commands and ACX functions to wl12xx. Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-04-12wlcore/wl12xx: turn no-Tx-align quirk into Tx-alignArik Nemtsov
Inverting the quirk flag to indicate Tx-alignment. This aligns it with the similar Rx-side quirk. The call to wl1271_set_block_size() decides whether SDIO block size alignment can be used or not. In case we're using SPI, we can't use the block size alignment, so the function returns false. So we set the quirk when wl1271_set_block_size() returns true and let the wl12xx lower driver unset the bit for wl127x (since it doesn't support this quirk). Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>