summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ti/wl18xx
AgeCommit message (Collapse)Author
2012-07-10wlcore: determine AP extra rates correctlyArik Nemtsov
Don't use the ht_mode module parameter for determining AP supported rates. We can rely on channel type, since HT40 won't be enabled if our HT cap doesn't support it. Enable MIMO only if there enough antennas, and rely on per-peer rate limitation to prevent IOPs. Signed-off-by: Arik Nemtsov <arik@wizery.com>
2012-07-10wl12xx/wl18xx: use a dynamic PS timeout of 1.5secArik Nemtsov
It seems some parties have bad user experience when smaller values are used. This should have little implications for power consumption, since traffic is bursty in nature. Signed-off-by: Arik Nemtsov <arik@wizery.com>
2012-07-10wlcore/wl12xx/wl18xx: check min FW versionArik Nemtsov
Refuse to boot if the FW version is too old. The minimum version is set per chip, with the option of setting it per PG in the future. When boot fails because of an old FW, display a helpful message. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-07-10wlcore: enable sched scan while connectedVictor Goldenshtein
New wl12xx firmware supports scheduled scans also while connected. Stop blocking sched scan requests when connected and add a quirk to block in hardware that don't support it (currently wl18xx doesn't). This requires FW version 6/7.3.10.2.112 for single-role and 6/7.5.6.0.25 for multi-role. Signed-off-by: Victor Goldenshtein <victorg@ti.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-26wl18xx: deprecate PG1 supportLuciano Coelho
The new PG2 version of the chip has a few differences in terms of FW API if compared to PG1. PG1 is just a sample that shouldn't be used in real life, so to avoid having to handle both separately, mark the PG1 version as deprecated and bail out during probe. Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-22wlcore: Force checking of io functions' return valuesIdo Yariv
All io functions' return values should be propagated and handled. Add a __must_check annotation to verify that the return values are checked and to avoid future mistakes. Signed-off-by: Ido Yariv <ido@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-22wlcore: Propagate errors from wl1271_raw_write32Ido Yariv
Propagate errors from wl1271_raw_write32 and request for recovery when appropriate. Also rename prefixes of wlcore functions which their prototypes had to be changed. Signed-off-by: Ido Yariv <ido@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-22wlcore: Propagate errors from wl1271_raw_read32Ido Yariv
Propagate errors from wl1271_raw_read32. Since the read functions had no way of returning errors in-band, change their prototypes. Also rename prefixes of wlcore functions which their prototypes had to be changed. Signed-off-by: Ido Yariv <ido@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-22wlcore: Propagate errors from wl1271_writeIdo Yariv
Propagate errors from wl1271_write and request for recovery when appropriate. Also rename prefixes of wlcore functions which their prototypes had to be changed. Signed-off-by: Ido Yariv <ido@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-21wl18xx: use %zu for size_t arguments in printk callsLuciano Coelho
After 934b9d1e (wl18xx: avoid some -Wformat warnings) there was still a warning with (at least) ARM gcc version 4.4.1: drivers/net/wireless/ti/wl18xx/main.c: In function 'wl18xx_conf_init': drivers/net/wireless/ti/wl18xx/main.c:1026: warning: format '%ld' expects type 'long int', but argument 2 has type 'unsigned int' Fix this by using %zu for the both formats, since the fw->size and the macro (derived from sizeof()) are size_t. Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-21wl18xx: split siso40 HT cap between 2Ghz and 5GhzArik Nemtsov
Remove the cap IEEE80211_HT_CAP_DSSSCCK40 from the 5Ghz variant of the siso40 HT capabilities. It is meaningless in 5Ghz. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-21wl18xx: sane defaults for HT capabilitiesArik Nemtsov
Introduce a default set of HT capabilities that are set according to the number of antennas on the board. Move the HT setting code down to allow the number of antennas to be set (and optionally overridden) before it. Remove the "mimo" HT option, since the default mode now enables MIMO is possible. Use this opportunity to add a helper function for setting HT capabilities and reduce the volume of the code a bit. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-21wl18xx: explicitly remove the 5Ghz MIMO HT capArik Nemtsov
The 18xx chip does not support MIMO in 5Ghz. Use the siso20 HT cap as fallback in 5Ghz when "mimo" is requested. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-21wl18xx: set Tx align quirk for PG2Arik Nemtsov
Before patch b5d6d9b (wlcore/wl12xx/wl18xx: don't use TX align quirk for wl127x), this was automatically set for all platforms. As this should now be set explicitly, set it for PG2 as well. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-21wl18xx: increase Rx descriptors for PG2Arik Nemtsov
New PG2 firmwares have additional Rx descriptors. Add a module parameter to manually set the number of Rx descriptors for older versions (PG1). We cannot discriminate based on chip-id, since this value must be set on probe. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-21wlcore: allow setting sleep_auth before interface initArik Nemtsov
Hold a value for sta_sleep_auth that is amenable to change by debugfs. When detecting a legal value in this variable on interface init, use it as an override value for sleep_auth. This makes debugging more intuitive using the debugfs value. Increment the conf version since we added an element to the conf structure. Note: An AP going up will always set sleep_auth to PSM_CAM. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-08wl18xx: clean up phy module parametersArik Nemtsov
Give all wl18xx phy module paramters -1 as a default value, indicating the paramter was not set. Add previous default values to the default 18xx priv conf structure. Remove the board_type field from wl18xx priv. The field with the same name inside the phy conf is good enough for our purposes. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-08wl18xx: align wl18xx_conf_phy with FW variant and remove itArik Nemtsov
wl18xx_conf_phy represents part of the FW native wl18xx_mac_and_phy_params structure. Remove it and replace the phy part of the wl18xx conf with the FW bound structure. This allows us to set/override all members. Increment the wlconf version to ensure compatibility with the new structure Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-08wl18xx: update fw statisticsIdo Reis
Aligned to the struct in FW 8.2.0.0.91 and updated the debugfs entries accordingly. Signed-off-by: Ido Reis <idor@ti.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-08wl18xx: allow FW-log by default for PG2.0Arik Nemtsov
This is supported by new FW versions (.88+). Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-08wl18xx: read configuration structure from a binary fileLuciano Coelho
Instead of using the hardcoded configuration structure, try to read it from a "firmware" file called wl18xx-conf.bin. If the file doesn't exist, fall back to the hardcoded version. If the file exists but is illegal, bail out. Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-08wlcore/wl18xx: export conf struct in a debugfs fileLuciano Coelho
Add conf file header structure, magic and version values and export the entire conf struct in debugfs. Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-08wlcore/wl18xx: the conf structs must be packed so they can be exportedLuciano Coelho
Since we are now going to export the conf structure and read it from a file, it should be packed to avoid surprises with padding bytes. Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-08wlcore/wl18xx/wl12xx: use u8 instead of bool for host_fast_wakeup_supportLuciano Coelho
The conf structure is going to be exported to a file, so we should use only well defined types. bool is not well defined and may vary from platform to platform, so change the host_fast_wakeup_support type to u8 instead. Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-08wl18xx: add support to clear FW statisticsLuciano Coelho
This patch calls ACX_CLEAR_STATISTICS to clear the firmware statistics. The trigger is a new debugfs file called clear_fw_statistics in the fw_stats directory. Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-07wl18xx: pad only last frame in aggregration buffer for PG2Ido Reis
In PG2 only the last frame in the aggregate buffer should be aligned to the sdio block size. This frame's header msb should be set to 0, while in all the previous frames in the aggregation buffer, this bit should be set to 1. [Add a HW op for setting the frame ctrl bit only for 18xx. Other minor cleanups - Arik] [Make the pre_pkt_send operation optional -- Luca] Signed-off-by: Ido Reis <idor@ti.com> Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-07wl18xx: PG2.0 HW Watch dog interrupt supportIdo Reis
In PG2, the HW watchdog interrupt occupies bit0 of the event vector, and the SW watchdog is relocated to bit9. We perform the relocation globally, as there's only one watchdog bit on previous platforms (bit0). [Only mask in the new bit9 for platforms supporting it. This avoids spurious events on other platforms - Arik] Signed-off-by: Orit Brayer <orit@ti.com> Signed-off-by: Ido Reis <idor@ti.com> Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-07wl18xx: FW/PHY arguments added for PG2Ido Reis
PG2 requires 4 new parameters that to be passed to the PHY. Use the actual PHY initialization struct size for the mem size of the PHY_INIT section, to account for additions in params. [Make sure PG1 still gets the original struct - Arik] Signed-off-by: Ido Reis <idor@ti.com> Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-07wl18xx: support PG2 version of the chipIdo Reis
PG2 has a unique chip id. It supports similar HW quirks. Signed-off-by: Ido Reis <idor@ti.com> Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-07wl18xx: fix PHY_INIT addresses mem sizeIdo Reis
was hardcoded 252, now uses the parameters struct size. Signed-off-by: Ido Reis <idor@ti.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-06wl12xx/wl18xx: add erp protection IE to the beacon filterEliad Peller
We have to reconfigure the fw when erp protection should be enabled/disabled. Pass beacons containing changes in the ERP protection IE, so we could analyze them. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-06wlcore/wl12xx/wl18xx: implement op_set_key per HW archArik Nemtsov
The 12xx set_key just calls the common wlcore_set_key function, in order to program the keys into the FW. The 18xx variant changes the spare block count when a GEM or TKIP key is set. Also modify the get_spare_blocks HW op for 18xx to return the correct numbers of spare blocks, according to what is currently set in FW. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-06wlcore/wl12xx/wl18xx: handle spare blocks spacial cases per archArik Nemtsov
Add a HW op for getting spare blocks. 12xx cards require 2 spare blocks for GEM encrypted SKBs, regardless of VIFs or keys programmed into the FW. 18xx cards require 2 spare blocks when there are any connected TKIP or GEM VIFs. For now always return 2 spare blocks, as this works with all networks. The special case TKIP/GEM functionality is added at a later patch. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-06wlcore/wl12xx/wl18xx: introduce quirk to remove TKIP header spaceArik Nemtsov
18xx chips do not require extra space in the TKIP header. Introduce a new HW quirk to allow us to make this feature arch-specific. 12xx chip will now have this quirk. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-05wl18xx: fix fm_coex parameters configurationVictor Goldenshtein
Wrong fm_coex parameters were set during wl18xx init phase, fix it. Signed-off-by: Ziv Riesel <zivriesel@ti.com> Signed-off-by: Victor Goldenshtein <victorg@ti.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-05wlcore: set wl->ht_cap per-bandEliad Peller
Save the ht_cap IE per-band, so we can configure different params to BG and A bands (we currently don't support MIMO on A band) [Small fix for rx_highest - Arik] Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-05wl18xx: add dependency on mac80211Arik Nemtsov
Add a dependency on mac80211 in Kconfig, and also replace some spaces with tabs. Reported-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-05wlcore: modify bss loss parametersIgal Chernobelsky
Modify default parameters to reduce firmware BSS lose probability in congested environment. [Applied to 18xx configuration as well - Arik] Signed-off-by: Igal Chernobelsky <igalc@ti.com> Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-05wlcore: fix dynamic_ps_timeout time regressionArik Nemtsov
In patch d7b63b9fc7ee73e75a4c7fdb899 we have raised the dynamic PS timeout to 200ms to improve user experience. Re-apply the change, since it was reverted in the wlcore split. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-05wlcore: fix sparse warnings related to static functionsArik Nemtsov
The "static" modifier was mistakenly forgotten for some functions. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-05wlcore/wl12xx/wl18xx: don't use TX align quirk for wl127xLuciano Coelho
Commit 4afc37 (wlcore: reorder identify_chip and get_hw_info) broke support for wl127x chips. When we moved the identify_chip operation to an earlier stage (ie. to the probe function), we broke wl127x support because during HW init we would set the WLCORE_QUIRK_TX_BLOCKSIZE_ALIGN. To avoid this, set this quirk in the identify_chip operations and only force it to be unset if the bus module doesn't support it. We were doing the opposite and setting the flag if the bus module supports it. Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-05wl18xx: change default tcp_checksum to falseAssaf Azulay
as tcp check sum is going to be removed from firmware, and as there is a problem with getting dns in security when checksum is enabled, it was decided to disable it by default. for none security modes it can be enabled by module paramenter. Signed-off-by: Assaf Azulay <assaf@ti.com> Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-05wl18xx: use new fw stats structuresLuciano Coelho
Some of the structures were updated, other structures had a few missing values and a few new ones were added. Change the driver structs accordingly. Signed-off-by: Luciano Coelho <coelho@ti.com> Signed-off-by: Arik Nemtsov <arik@wizery.com>
2012-06-05wl18xx: increase tx_ba_win_size to 64Luciano Coelho
Now the firmware can support TX block ack sessions with 64 frames. Signed-off-by: Luciano Coelho <coelho@ti.com> Signed-off-by: Arik Nemtsov <arik@wizery.com>
2012-06-05wlcore/wl12xx/wl18xx: move lower driver debugfs to a subdirLuciano Coelho
Instead of adding more files from the lower drivers into the same directory in debugfs as wlcore, we now add a subdirectory for the lower driver. This makes things a bit easier, because we can quickly see where the debugfs entry is implemented and what is specific to the lower driver. Signed-off-by: Luciano Coelho <coelho@ti.com> Signed-off-by: Arik Nemtsov <arik@wizery.com>
2012-06-05wl18xx: export pwr_limit_reference_11_abg value as a module parameterLuciano Coelho
Yet another temporary module parameter requested by the firmware team. This will be replaced by the conf binary. Signed-off-by: Luciano Coelho <coelho@ti.com> Signed-off-by: Arik Nemtsov <arik@wizery.com>
2012-06-05wl18xx: export low/high band component values as module paramsLuciano Coelho
We use hardcoded values for the different board types. In some cases we may need to override the defaults, so export the values as module params. If not defined, the defaults for the specified board type will be used. Signed-off-by: Luciano Coelho <coelho@ti.com> Signed-off-by: Arik Nemtsov <arik@wizery.com>
2012-06-05wl18xx: add power limit reference value to mac_and_phy settingsLuciano Coelho
With more recent PHY firmware versions (>8.1.0.0.116), we need to use the correct value for the pwr_limit_reference_11_abg parameter when setting the mac_and_phy options. For now we use a hardcoded 0xc8 as the value. This will be moved to the configuration binary when it gets implemented. Signed-off-by: Luciano Coelho <coelho@ti.com> Signed-off-by: Arik Nemtsov <arik@wizery.com>
2012-06-05wl18xx: add module parameter to force SISO 20MHzLuciano Coelho
In some cases it may be useful to force narrow-band SISO channels. Add a new value to the ht_mode module parameter to force the device to operate in SISO 20MHz. Signed-off-by: Luciano Coelho <coelho@ti.com> Signed-off-by: Arik Nemtsov <arik@wizery.com>
2012-06-05wl18xx: don't use MIMO when ht_mode is set to wideLuciano Coelho
If the wl18xx module is loaded with ht_mode=wide (the default), we shouldn't use MIMO rates when the channel type is not HT40. Fix this by checking the ht_mode before deciding which rates to used. Additionally, set the ht_mode parameter explicitly to "wide" as the default. Signed-off-by: Luciano Coelho <coelho@ti.com> Signed-off-by: Arik Nemtsov <arik@wizery.com>