summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2012-02-15wl12xx: add TX_HW_ATTR_HOST_ENCRYPT flagEliad Peller
In WEP shared authentication, we encrypt the auth frame in the host, and we want the fw to pass it as-is. Use the TX_HW_ATTR_HOST_ENCRYPT flag in order to indicate it to the fw. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-02-15wl12xx: Set IEEE80211_TX_RC_SHORT_GI if short GI was used onPontus Fuchs
New FW reports usage of short GI as a rate class index. Check for this rate and set the IEEE80211_TX_RC_SHORT_GI if used. Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com> Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-02-15wl12xx: Set IEEE80211_TX_RC_MCS on MCS rates on TX complete.Pontus Fuchs
IEEE80211_TX_RC_MCS was not set correctly leading to incorrect link speed calculation. Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com> Signed-off-by: Ido Reis <idor@ti.com> Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-02-15wl12xx: change WLVIF_FLAG_PSM name and remove WLVIF_FLAG_PSM_REQUESTEDEyal Shapira
WLVIF_FLAG_PSM turned to WLVIF_FLAG_IN_AUTO_PS which marks that this vif is in AUTO PS. WLVIF_FLAG_PSM_REQUESTED is not required as mac80211 calls op_config with CONF_PS after association. wl12xx_config_vif() handling of CONF_PS was simplified and cleaned up. Signed-off-by: Eyal Shapira <eyal@wizery.com> Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-02-15wl12xx: enable/disable BET with AUTO_PS/ACTIVEEyal Shapira
While the FW with dynamic PS controls BET when going to PSM and back internally within the FW, there's still a need to enable it from the driver at least once (so enable on every entry to AUTO_PS) and disable it once we explicitly go back to STATION_ACTIVE_MODE. BET isn't relevant for 5GHz Signed-off-by: Eyal Shapira <eyal@wizery.com> Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-02-15wl12xx: remove 2 unused parameters in wl1271_ps_set_mode()Eyal Shapira
cleanup 2 unused parameters of wl1271_ps_set_mode Signed-off-by: Eyal Shapira <eyal@wizery.com> Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-02-15wl12xx: add dynamic_ps_timeout debugfs fileEyal Shapira
Enable read/write of dynamic_ps_timeout which controls the timeout of the dynamic PS implemented in the FW. dynamic_ps_timeout is the timeout (in msec) until going back to PS when there's no Rx/Tx Signed-off-by: Eyal Shapira <eyal@wizery.com> Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-02-15wl12xx: add support for HW dynamic PSEyal Shapira
FW now supports dynamic PS so we don't need to use mac80211 support. FW will go to PSM after a specified timeout with no Rx/Tx traffic. - Changed FW API to include new PS mode (AUTO_MODE) and including timeout parameter - The default PS mode would be dynamic PS - Default timeout is 100ms (same as it used to be in mac80211) - Avoid using mac80211 APIs to disable/enable dynamic PS as we're not using mac80211 PS control anymore. - COEX is handled by the FW while in dynamic PS so removed handling of SOFT_GEMINI Signed-off-by: Eyal Shapira <eyal@wizery.com> Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-02-15wl12xx: remove PS management codeEyal Shapira
Removal of PS management code from the driver as PS is handled by the FW (dynamic PS) Signed-off-by: Eyal Shapira <eyal@wizery.com> Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-02-15wl12xx: fw api change - update cmd/acx/event enumsEliad Peller
Update enums/structs to the new fw api. Signed-off-by: Eyal Shapira <eyal@wizery.com> Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-02-15wl12xx: fw api change - add role_id to tsf_infoEliad Peller
The ACX_TSF_INFO command now takes role_id as param. change the struct accordingly, and pass the wlvif to the wl1271_acx_tsf_info() function. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-02-15wl12xx: use dev_role_id for scansEliad Peller
Use device role for scans when the sta is not associated. sched_scan is used only when the sta is not associated, and thus should use the dev role (instead of sta role). Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-02-15wl12xx: fw api change - add role_id to set_templateEliad Peller
The set_template commands now takes the role_id as parameter. Usually, we'll use the vif's main role_id. However, sometimes we'll want to use wlvif->dev_role_id instead of wlvif->role_id, so pass the wanted role_id as param. Update WL127X_FW_NAME/WL128X_FW_NAME. (This commit starts a series of fw update patches, and changes the start() callback to return an error in order to prevent the use of the driver during the transition. This change will be reverted in the last patch of series) Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-02-15wl12xx: don't release/claim sdio on suspend/resumeEliad Peller
Since we reverted to claiming the host only when needed, we no longer need to release/claim the host on suspend/resume. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-02-15Revert "wl12xx: Change claiming of the SDIO bus"Eliad Peller
This reverts commit 393fb560d328cc06e6a5c7b7473901ad724f82e7. Commit b6ad726 ("mmc: core: Prevent too long response times for suspend") fails the suspend if the mmc host can't be claimed before suspend. As the host is claimed by us as long as the chip is powered on, suspend will always fail. Revert to claiming the sdio bus only when needed. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-02-15wl12xx: remove wl1271_tx_update_filtersEliad Peller
wl1271_tx_update_filters() is used as some workaround to open filters while roaming on the same channel. However, it doesn't handle roaming to a different channel, and it might also sleep in the tx path, which is a bug. With the new auth/assoc redesign, roaming is much simpler, and this function is not needed anymore. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-02-15wl12xx: check bss_conf->assoc on CHANGED_BSSIDEliad Peller
with the new auth/assoc redesign, we get CHANGED_BSSID indication before CHANGED_ASSOC indication, while our CHANGED_BSSID handling block assumes we are already associated. Fix it by checking we are either in ibss mode, or already associated. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-02-15wl12xx: fix typo in fwlog module param descriptionLuciano Coelho
Fix a copy and paste bug in the MODULE_PARAM_DESC for fwlog. Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-02-15wl12xx: remove unnecessary shadow declarationLuciano Coelho
The vif variable was being declared inside one of the internal blocks of wl1271_event_process. This is not necessary, since this variable is already declared in the function context. Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-02-15wl12xx: add testmode operation to read the BD_ADDR from Fuse ROMLuciano Coelho
Add a testmode command to retrieve the BD_ADDR that is stored in the Fuse ROM in newer PGs. In old PGs this operation is not supported. The caller can then derive the MAC addresses from it. Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-02-15wl12xx: use two MAC addresses based on the NVS or from fuse ROMLuciano Coelho
Add support for two MAC addresses. If the NVS has a valid MAC address, that takes precedence and we use two sequential address starting from the one specified. If the NVS doesn't contain a valid MAC address (ie. if it is set to 00:00:00:00:00:00), we check if the HW PG version in use has the BD_ADDR written in the fuse ROM. If it does, we read it and derive the two subsequent addresses for WLAN. During production, 3 addresses are reserved per device. The first for Bluetooth (burnt in the fuse ROM) and the following two for WLAN. This patch has some code by Igal and Arik (squashed from internal patches). Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Igal Chernobelsky <igalc@ti.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-02-15wl12xx: read chip ID and HW PG version during probeLuciano Coelho
In order to read the MAC addresses from the fuse ROM, we need to know the chip ID and the HW PG version. We need to know the MAC address during probe, because that's when we register our HW with mac80211. To prepare for that, this patch reads the chip ID and HW PG version during probe instead of doing it at boot time. We power the chip on briefly in order to do that. Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-02-15wl12xx: move partition table definition to io.cLuciano Coelho
Up till now we only needed to access the partition table in boot.c. But to add support for reading the MAC address from the FUSE in testmode, we will have to change the partition in testmode.c. Thus, we move the partition table to io.c and export it via io.h. It makes more sense to have it in the io part anyway. Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-02-15wl12xx: cancel delayed elp work and clear flags when stopping PLTLuciano Coelho
In some cases a race condition can happen if we don't cancel any pending ELP work before stopping PLT. With this commit we cancel ELP work and clear the wl->flags bitmask. Also clean up the wl elements after powering off. Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-02-15wl12xx: Fix potential interrupt stormIdo Yariv
The interrupt threaded handler exits immediately if the driver's state is WL1271_STATE_OFF. As a result, the interrupt status is not read. If the interrupt is level triggered, it will be fired again. Fix this by disabling interrupts before setting the state to OFF. Signed-off-by: Ido Yariv <ido@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-02-15wl12xx: Power off after flushing workIdo Yariv
When stopping plt, the chip is powered off before all current work items are flushed and interrupts are disabled. This might introduce a race in which the driver tries to communicate with a powered off chip. Fix this by powering off the device only after interrupts are disabled and all work items are flushed. Signed-off-by: Ido Yariv <ido@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-02-15wl12xx: Acquire lock before stopping pltIdo Yariv
__wl1271_plt_stop is called from both wl1271_plt_stop and wl1271_unregister_hw. While wl1271_plt_stop acquires a mutex, wl1271_unregister_hw does not. Fix this by calling wl1271_plt_stop instead of __wl1271_plt_stop from wl1271_unregister_hw. Signed-off-by: Ido Yariv <ido@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-02-15wl12xx: Make sure HW is available in sched scan opsPontus Fuchs
The sched_scan_(stop|start) ops fails to check for WL1271_STATE_OFF. This can lead to a race where the driver tries to access the HW while it's off. Fix this by checking for WL1271_STATE_OFF before accessing the HW. Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-02-15wl12xx: enable sparse endianess check by defaultLuciano Coelho
Following the good example of the Intel (and more recently Atheros) drivers, enable endianess check by default when running sparse. Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-02-15wl1251: enable sparse endianess check by defaultLuciano Coelho
Following the good example of the Intel (and more recently Atheros) drivers, enable endianess check by default when running sparse. Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-02-15wl1251: convert 32-bit values to le32 before writing to the chipLuciano Coelho
The 32-bit values were not converted before writing them to the chip. Change the wl1251_read32() and wl1251_write32() so that they always read and write le32 values and convert to and from the CPU endianess. Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-02-15wl1251: fix sparse warningLuciano Coelho
The wl1251 driver was generating the following warning: drivers/net/wireless/wl1251/boot.c:467:21: warning: incorrect type in assignment (different base types) drivers/net/wireless/wl1251/boot.c:467:21: expected unsigned int [unsigned] [assigned] [usertype] val drivers/net/wireless/wl1251/boot.c:467:21: got restricted __le32 [usertype] <noident> Fix this by removing one cpu_to_le32() call in the wrong place. Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-02-09rtlwifi: Modify rtl_pci_init to return 0 on successJohn W. Linville
Fixes problem where caller would think routine succeeded when it failed leading to divide by zero panic. (This also reverts an earlier attempt, commit 42bc0c97 "rtlwifi: Return correct failure code on error". -- JWL) Signed-off-by: Simon Graham <simon.graham@virtualcomputer.com> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-08rtlwifi: Return correct failure code on errorSimon Graham
Callers of rtl_pci_init expect zero to be returned on error. Returning the error code leads to, amongst other things, divide by zero panics attempting to use the ring size that is set to zero. Signed-off-by: Simon Graham <simon.graham@virtualcomputer.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-08rtlwifi: Handle previous allocation failures when freeing device memorySimon Graham
Handle previous allocation failures when freeing device memory Signed-off-by: Simon Graham <simon.graham@virtualcomputer.com> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Stable <stable@vger.kernel.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-08rt2x00: Correctly set txmixer_gain in RT3572 channel switching.Gertjan van Wingerde
Align with the v2.5.0.0 Ralink RT3572 driver. Save the EEPROM txmixer_gain values inside the rt2800 driver data structure and use it throughout the code. Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com> Acked-by: Stanislaw Gruszka <sgruszka@redhat.com> Acked-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-08rt2x00: Fix RT3572 channel switch RFCSR 7 programming.Gertjan van Wingerde
Align with the v2.5.0.0 Ralink RT3572 driver. Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com> Acked-by: Stanislaw Gruszka <sgruszka@redhat.com> Acked-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-08rt2x00: Align RT3572 channel switch RFCSR 1 programming with Ralink driver.Gertjan van Wingerde
Align with the v2.5.0.0 Ralink RT3572 driver. Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com> Acked-by: Stanislaw Gruszka <sgruszka@redhat.com> Acked-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-08rt2x00: Fix RFCSR 12 & 13 programming on RT3572 channel switching.Gertjan van Wingerde
Align with v2.5.0.0 Ralink RT3572 driver for 2.4GHz band channel switch. Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com> Acked-by: Stanislaw Gruszka <sgruszka@redhat.com> Acked-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-08rt2x00: Use saved BBP 25 and 26 values when configuring channel on RT3572.Gertjan van Wingerde
This brings the rt2800 channel switching code for RT3572 closer to the v2.5.0.0 Ralink RT3572 driver. Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com> Acked-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-08rt2x00: Update comment on freq_offset field in struct rt2x00_dev.Gertjan van Wingerde
The comment states that the field is only used for rt61pci and rt73usb. However, it is now used by rt2800pci and rt2800usb as well, so the comment is not correct anymore. Update the comment to not state any low-level drivers anymore. Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com> Acked-by: Stanislaw Gruszka <sgruszka@redhat.com> Acked-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-08rt2x00: Use struct rt2x00_dev driver data in rt2800{pci,usb}.Gertjan van Wingerde
Start using the struct rt2x00_dev driver data in rt2800 for the calibration data. Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com> Acked-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-08rt2x00: Introduce concept of driver data in struct rt2x00_dev.Gertjan van Wingerde
We are getting more and more fields in struct rt2x00_dev that are specific to one or two of the low-level drivers. Instead of putting these fields inside the main structure and thus clobbering all low-level drivers with these fields, introduce the concept of driver data inside struct rt2x00_dev, whose size is indicated by the low-level driver and which can be populated by the low-level driver. Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com> Acked-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06iwlegacy: remove set_hw_params callbackStanislaw Gruszka
We do not need that callback, settings parameters can be done locally. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06iwlegacy: remove struct il_tx_infoStanislaw Gruszka
It's just wrapper to sk_buff pointers ... Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06iwlegacy: merge il_base_params into il_cfgStanislaw Gruszka
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06iwlegacy: move ops out of configStanislaw Gruszka
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06iwlegacy: get rid of ctx structureStanislaw Gruszka
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06iwlegacy: remove il_setup_interface()Stanislaw Gruszka
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06iwlegacy: get rid of ctx->is_activeStanislaw Gruszka
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>