summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ti
Commit message (Collapse)AuthorAgeFilesLines
* mac80211: clarify interface iteration and make it configurableJohannes Berg2012-11-091-1/+1
| | | | | | | | | | | | | | | | During hardware restart, all interfaces are iterated even though they haven't been re-added to the driver, document this behaviour. The same also happens during resume, which is even more confusing since all of the interfaces were previously removed from the driver. Make this optional so drivers relying on the current behaviour can still use it, but to let drivers that don't want this behaviour disable it. Also convert all API users, keeping the old semantics except in hwsim, where the new normal ones are desired. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* wlcore: protect wlcore_op_set_key with mutexEliad Peller2012-09-272-33/+43
| | | | | | | | | | | | | | | | | | | | | | | wlcore_op_set_key() calls wl18xx_set_key(), which in turn executes some of his function calls without acquiring wl->mutex and making sure the fw is awake. Adding mutex_lock()/ps_elp_wakeup() calls is not enough, as wl18xx_set_key() calls wl1271_tx_flush() which can't be called while the mutex is taken. Add the required calls to wlcore_op_set_key, but limit the queues_stop and flushing to the only encryption types in which a spare block might be needed (GEM and TKIP). [Arik - move state != ON check] Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <luca@coelho.fi>
* wlcore: decrease elp timeoutEliad Peller2012-09-271-6/+2
| | | | | | | | | | | | | | | | | | The current elp timeout (the same as the dynamic ps timeout - 1500ms) is too high. Usually, wl1271_ps_elp_sleep() get called right after tx/rx, which is fine, but some command might get sent even when there is no traffic (e.g. ht changes triggered by beacon frames), and leaving the device awake for 1500ms in this case is redundant. Use a timeout of 30ms. The fw won't enter elp anyway before the dynamic-ps timeout was expired as well (and it entered ps successfully). Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <luca@coelho.fi>
* wlcore: Load the NVS file asynchronouslyIdo Yariv2012-09-272-38/+53
| | | | | | | | | | | | The NVS file is loaded by the device's probe callback with the help of request_firmware(). Since request_firmware() relies on udevd, the modules cannot be loaded before hotplug events are handled. Fix this by loading the NVS file asynchronously and continue initialization only after the firmware request is over. Signed-off-by: Ido Yariv <ido@wizery.com> Signed-off-by: Luciano Coelho <luca@coelho.fi>
* wlcore: Refactor probeIdo Yariv2012-09-274-48/+83
| | | | | | | | | Move most of the device-specific probe functionality into setup(), a new op. By doing this, wlcore_probe will be the first to request a firmware from userspace, making it easier to load the NVS file asynchronously. Signed-off-by: Ido Yariv <ido@wizery.com> Signed-off-by: Luciano Coelho <luca@coelho.fi>
* wlcore: Allow memory access when the FW crashesIdo Yariv2012-09-271-8/+12
| | | | | | | | | | | | | When the no_recovery flag is used, the recovery work will not restart the FW and the state will not be set to 'on'. To enable post-mortem analysis, allow memory access in the 'restarting' state. Also, since the FW might not be operational, don't fail the read/write operations if elp_wakeup fails. Reported-by: Arkady Miasnikov <a-miasnikov@ti.com> Signed-off-by: Ido Yariv <ido@wizery.com> Signed-off-by: Luciano Coelho <luca@coelho.fi>
* wlcore: use dynamic keep-alive template idsEliad Peller2012-09-276-23/+33
| | | | | | | | | | | | | | | | | | Currently, all the (station) roles use the same keep-alive template id (0). However, the klv template ids shouldn't be shared by different roles. Implement a simple klv_templates bitmap, and let each role allocate its own klv template id on role initialization. [Arik - remove invalidation of KLV template when getting into "idle". This is already handled in unjoin] Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <luca@coelho.fi>
* wlcore: invalidate keep-alive template on disconnectionEliad Peller2012-09-271-0/+5
| | | | | | | | | | | | | | | | | | | Previously, invalidation of the keep-alive template was done when going idle. However, while removing the idle-handling we didn't move the keep-alive template invalidation to another place. This finally resulted in fw error when trying to use the keep-alive template by another role. (Note that we still have an error here - each role should have its unique keep-alive template id, while currently they all use CMD_TEMPL_KLV_IDX_NULL_DATA (0). This only works now because we don't support concurrent connected stations yet) Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <luca@coelho.fi>
* wl18xx: default to siso40 in 2.4ghz with a single antennaArik Nemtsov2012-09-271-2/+2
| | | | | | | | The driver used siso20 in this case for legacy reasons. Reported-by: Ido Reis <idor@ti.com> Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <luca@coelho.fi>
* wlcore: Fix unbalanced interrupts enablementIdo Yariv2012-09-272-1/+15
| | | | | | | | | | The interrupt line is enabled by wl12xx_enable_interrupts and wl18xx_enable_interrupts, but it will not be disabled in all failure paths. Fix this. Signed-off-by: Ido Yariv <ido@wizery.com> Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <luca@coelho.fi>
* wlcore: Don't recover during bootIdo Yariv2012-09-271-1/+2
| | | | | | | | | | | | | | While recursive recovery is avoided during shutdown, a new recovery may be queued when the FW boots. The recovery work will then try to stop an already stopped hardware, which will most likely result in a kernel panic. Fix this by verifying that wl->state is on before queueing a new recovery. Signed-off-by: Ido Yariv <ido@wizery.com> Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <luca@coelho.fi>
* wlcore/wl18xx: add phy_fw_version_str to debugfs driver_stateYair Shapira2012-09-273-0/+8
| | | | | | | | add phy_fw_version_str to debugfs driver_state file. information is taken during boot and stored in wl->chip.phy_fw_ver_str. Signed-off-by: Yair Shapira <yair.shapira@ti.com> Signed-off-by: Luciano Coelho <luca@coelho.fi>
* wlcore: spi: use private max-buf-size limitArik Nemtsov2012-09-272-4/+8
| | | | | | | | | | Limit SPI transmissions to the wl12xx max buffer size, as only 12xx was tested with SPI. This allows us to remove the global aggregation buffer constant. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <luca@coelho.fi>
* wl18xx: number_of_assembled_ant5 indicates if A band is enabledYair Shapira2012-09-271-5/+2
| | | | | | | | | | | | | | | | | | Use number_of_assembled_ant5 phy param to indicate if A band is enabled: if number_of_assembled_ant5 != 0 then it is enabled otherwise it is disabled. This aligns with phy implementation that uses this param both to indicate if band is active and the number of antennas. This parameter replaces enable_11a module param that was removed. User-Space applications can use wlconf and/or INI files to disable A band using this parameter. Signed-off-by: Yair Shapira <yair.shapira@ti.com> Signed-off-by: Igal Chernobelsky <igalc@ti.com> Signed-off-by: Luciano Coelho <luca@coelho.fi>
* wlcore: allow up to 3 running STA interfaces in combinationsArik Nemtsov2012-09-271-2/+2
| | | | | | | | This allows us to have a p2p-management interface (in STA mode), as we as a group dedicated interface. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <luca@coelho.fi>
* wlcore: lazy-enable device rolesEliad Peller2012-09-272-20/+15
| | | | | | | | | | Enable device roles just before starting it. This way, a single device role should be enough for all vifs, as we can't use concurrent device roles (which require ROC) anyway. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <luca@coelho.fi>
* wlcore: always use wlvif->role_id for scansEliad Peller2012-09-271-11/+7
| | | | | | | | | enabled (but not-started) sta role should be good enough for scanning (both normal and scheduled), so use it instead of the device_role. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <luca@coelho.fi>
* wlcore: make debug prints work without dynamic debugArik Nemtsov2012-09-271-3/+13
| | | | | | | | | | Make debug prints operational when dynamic debug is not defined. This allows better debugging in production environments. Change the driver prefix to "wlcore" while were at it. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <luca@coelho.fi>
* wlcore/wl18xx/wl12xx: allow up to 3 mac addressesArik Nemtsov2012-09-276-9/+38
| | | | | | | | | Allow 3 native mac addresses on 18xx. On 12xx allow 2 native mac addresses and set the LAA bit to create a third mac address. This enabled operation with a separate group interface. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <luca@coelho.fi>
* wlcore: resume() only if sta is associatedEliad Peller2012-09-271-0/+3
| | | | | | | | | | | | | | mac80211's resume() callback might get called even if the sta is not associated (but only up). The resume sequence in this case results in configuring the wake-up conditions of a non-started role, which causes fw assertion. Fix it by bailing out if the STA is not connected (like we do on suspend()). Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <luca@coelho.fi>
* wlcore: configure wowlan regardless of wakeup conditionsEyal Shapira2012-09-271-13/+13
| | | | | | | | | | | wowlan filters should be configured in any case in suspend/resume. This shouldn't be dependent on whether wakeup conditions are the same for suspend and resume states. Only the FW command to reconfigure wakeup conditions should be avoided in such a case. Reported-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Eyal Shapira <eyal@wizery.com> Signed-off-by: Luciano Coelho <luca@coelho.fi>
* wlcore/wl18xx/wl12xx: aggregation buffer size setIgal Chernobelsky2012-09-278-9/+14
| | | | | | | | | | | | Aggregation buffer size is set separately per 18xx/12xx chip family. For 18xx aggragation buffer is set to 13 pages to utilize all the available tx/rx descriptors for aggregation. [Arik - remove redundant parts from the patch] Signed-off-by: Igal Chernobelsky <igalc@ti.com> Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <luca@coelho.fi>
* wl18xx/wl12xx: defines for Tx/Rx descriptors numIgal Chernobelsky2012-09-274-4/+10
| | | | | | | Use defines for number of Tx/Rx descriptors. Signed-off-by: Igal Chernobelsky <igalc@ti.com> Signed-off-by: Luciano Coelho <luca@coelho.fi>
* wlcore: tx_flush - optimize flow and force Tx during the flushArik Nemtsov2012-09-271-8/+18
| | | | | | | | | | | | | | | Force Tx during the flush if there are packets pending in the driver. This actually solves a bug where we would get called from the mac80211 wq context, which would prevent tx_work from getting queued, even when the mutex is unlocked. Don't stop the queues needlessly if there's nothing to flush. Use a larger delay when sleeping to give the driver a chance to flush and avoid cpu busy looping. Re-arrange the loop so the last iteration is not wasted. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <luca@coelho.fi>
* wlcore: make Tx flush timings more verboseArik Nemtsov2012-09-271-4/+9
| | | | | | | | Print how much time a flush took. This will help debug the time it takes to switch between channels. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <luca@coelho.fi>
* wlcore: allow only the lowest OFDM rate for p2p setup framesArik Nemtsov2012-09-271-2/+1
| | | | | | | | | | | The IEEE80211_TX_CTL_NO_CCK_RATE flag is only set for mgmt packets transmitted during p2p connection setup. Make sure to use the lowest OFDM rate guarantee the peer always hears us. Change the p2p rate policy to contain only the 6mpbs rate to acheive this effect. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <luca@coelho.fi>
* wlcore: AP mode - send non-data packets with basic ratesArik Nemtsov2012-09-271-2/+6
| | | | | | | | | | This solves interoperability issues with peer that don't seem to "hear" management packets transmitted in higher rates. Based on a previous patch by Igal Chernobelsky. Cc: Igal Chernobelsky <igalc@ti.com> Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <luca@coelho.fi>
* wlcore: cancel recovery_work on stop() instead of remove_interface()Eliad Peller2012-09-271-4/+2
| | | | | | | | | recovery_work should be cancelled when stopping the device, not when removing an interface (this is probably a leftover from the single-role days) Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <luca@coelho.fi>
* wl18xx: increase rx_ba_win_size to 32Ido Reis2012-09-271-1/+1
| | | | | | | The new FWs support a bigger BA window. Signed-off-by: Ido Reis <idor@ti.com> Signed-off-by: Luciano Coelho <luca@coelho.fi>
* wlcore: Prevent interaction with HW after recovery is queuedIdo Yariv2012-09-2711-55/+61
| | | | | | | | | | | | | When a function requests to recover, it would normally abort and will not send any additional commands to the HW. However, other threads may not be aware of the failure and could try to communicate with the HW after a recovery was queued, but before the recovery work began. Fix this by introducing an intermediate state which is set when recovery is queued, and modify all state checks accordingly. Signed-off-by: Ido Yariv <ido@wizery.com> Signed-off-by: Luciano Coelho <luca@coelho.fi>
* wlcore: consider single fw caseEliad Peller2012-09-271-1/+5
| | | | | | | | | | | | | | When a single fw is being used for both single-role and multi-role cases (e.g. 18xx), wl->mr_fw_name is NULL, which results in NULL dereference while trying to load the multi-role fw. In this case, always use the single-role fw, and avoid redundant fw switch by checking for this case in wl12xx_need_fw_change() as well. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <luca@coelho.fi>
* wl18xx: update default phy configuration for pg2Ido Reis2012-09-271-14/+3
| | | | | | | | | | default switch configuration set to pg2 chips (rdl 1/2/3/4). removed hacks for specific board types. pg1.x boards are now supported only using module params or specific conf files. Signed-off-by: Ido Reis <idor@ti.com> Signed-off-by: Luciano Coelho <luca@coelho.fi>
* wl12xx: remove duplicated include from main.cWei Yongjun2012-09-271-1/+0
| | | | | | | Remove duplicated include. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Luciano Coelho <luca@coelho.fi>
* wlcore: Declare MODULE_FIRMWARE usageTim Gardner2012-09-271-0/+1
| | | | | | | | | | | | | Declare any firmware that might be used by this driver. If all drivers declare their firmware usage, then a sufficiently complete list of firmware files can then be used to pare down the external linux-firmware package to just the files in actual use. Cc: Luciano Coelho <coelho@ti.com> Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Tim Gardner <tim.gardner@canonical.com> Signed-off-by: Luciano Coelho <luca@coelho.fi>
* wl12xx: use module_platform_driverLuciano Coelho2012-09-271-11/+1
| | | | | | | | | Use a module_platform_driver declaration instead of replicating the init and exit functions in the driver. Based on the patch for wl18xx by Devendra Naga. Signed-off-by: Luciano Coelho <luca@coelho.fi>
* wl18xx: use module_platform_driverDevendra Naga2012-09-271-12/+1
| | | | | | | | | the driver's init and exit routines can be implemented with the module_platform_driver, as the init and exit code is same as that of the module_platform_driver Signed-off-by: Devendra Naga <devendra.aaru@gmail.com> Signed-off-by: Luciano Coelho <luca@coelho.fi>
* wl18xx: remove duplicated include from main.cWei Yongjun2012-09-071-1/+0
| | | | | | | | | From: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Remove duplicated include. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: move TX station pointer and restructure TXThomas Huehn2012-07-312-3/+7
| | | | | | | | | | | | | | Remove the control.sta pointer from ieee80211_tx_info to free up sufficient space in the TX skb control buffer for the upcoming Transmit Power Control (TPC). Instead, the pointer is now on the stack in a new control struct that is passed as a function parameter to the drivers' tx method. Signed-off-by: Thomas Huehn <thomas@net.t-labs.tu-berlin.de> Signed-off-by: Alina Friedrichsen <x-alina@gmx.net> Signed-off-by: Felix Fietkau <nbd@openwrt.org> [reworded commit message] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* wlcore: op_tx: pass sta explicitly when inferring frame hlidArik Nemtsov2012-07-313-13/+8
| | | | | | | | avoid using the skb CB for getting the appropriate sta. Signed-off-by: Arik Nemtsov <arik@wizery.com> Acked-by: Luciano Coelho <coelho@ti.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* wlcore: don't get the hlid from a queued skbArik Nemtsov2012-07-311-20/+26
| | | | | | | | | | | | There was a bug hiding here since the hlid was sometimes inferred from the sta, which might be invalid at this point. Instead, propagate the hlid from the skb-queue where we got the skb in the first place. Signed-off-by: Arik Nemtsov <arik@wizery.com> Acked-by: Luciano Coelho <coelho@ti.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* Merge branch 'master' of ↵John W. Linville2012-07-2012-74/+290
|\ | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem
| * wlcore: increase command completion timeoutLuciano Coelho2012-07-181-1/+1
| | | | | | | | | | | | | | | | In some rare cases, the CMD_ROC completion may take over 1 second. The timeout had earlier been increased to 1000ms (from 750ms), but it is still not enoug. Increase it to 1500ms. Signed-off-by: Luciano Coelho <coelho@ti.com>
| * wlcore: wait for command completion event when sending CMD_ROLE_STOPLuciano Coelho2012-07-181-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We need to wait for the command completion event when we send the CMD_ROLE_STOP event otherwise we may try to send CMD_ROLE_START too soon and get out-of-sync with the firmware. In some cases, the firmware may not send the event, so we wait for the event or for the timeout, whichever comes first. This patch is based on an earlier version by Eliad. Cc: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| * wl18xx: enable MIMO rates when connected as a MIMO STAArik Nemtsov2012-07-181-4/+12
| | | | | | | | | | | | | | | | Use this opportunity to consolidate the check for MIMO support into a separate function. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| * wlcore: make usage of nla_put clearerYair Shapira2012-07-181-21/+18
| | | | | | | | | | | | | | | | | | | | | | | | handle errors of nla_put() inside the if(nla_put...) {} This makes the code simpler and clearer because: we take advantage from the fact that we have only one nla_put in our routines (so no real need for goto label). this avoids ugly goto forward followed by goto backward. Signed-off-by: Yair Shapira <yair.shapira@ti.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| * wlcore/wl12xx: calibrator fem detect implementationYair Shapira2012-07-184-5/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | this completes the calibrator based fem detect logic in driver: driver starts (by calibrator) in plt_mode PLT_FEM_DETECT wlcore inits and starts plt on wl12xx wl12xx fetches fem number from firmware and stores it in wl->fem_manuf wl12xx immediatly returns (doesn't start radio, etc...) wlcore returns the fem_manuf to calibrator using WL1271_TM_ATTR_DATA plt_mode is stopped Signed-off-by: Yair Shapira <yair.shapira@ti.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| * wl18xx: disable calibrator based fem detectYair Shapira2012-07-181-0/+6
| | | | | | | | | | | | | | | | bip calibration is not required in wl18xx. Therefore we disable also auto fem (using calibrator fem detect) mode. Signed-off-by: Yair Shapira <yair.shapira@ti.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| * wlcore: add plt_mode including new PLT_FEM_DETECTYair Shapira2012-07-184-7/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | add wl->plt_mode that is used to indicate different plt working modes: this will be used to implement calibrator side auto fem detection where driver asks firmware to detect the wlan fem radio type and returns it to calibrator. this is not implemented yet and plt_modes: PLT_ON and PLT_FEM_DETECT currently behave the same. Signed-off-by: Yair Shapira <yair.shapira@ti.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| * wlcore: use basic rates for non-data packetsEliad Peller2012-07-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After the latest mac80211 changes, the sta has the ap's sta pointer even before association. This cause the auth and assoc frames to be sent with the standard ap's rates, rather than the basic rates. Change the tx rate policy logic to use the regular ap rates only for data packets (so control and mgmt packets will be sent with basic rates) Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| * wlcore: don't issue SLEEP_AUTH command during recoveryArik Nemtsov2012-07-181-1/+9
| | | | | | | | | | | | | | | | | | During interface removal, don't adjust sleep_auth if we are during recovery. Since the FW is potentially dead we shouldn't talk to it. Reported-by: Yossi Wortzel <yossiw@ti.com> Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
OpenPOWER on IntegriCloud