summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ti
AgeCommit message (Collapse)Author
2013-02-15Merge branch 'for-john' of ↵John W. Linville
git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
2013-02-15mac80211: stop toggling IEEE80211_HT_CAP_SUP_WIDTH_20_40Johannes Berg
For VHT, many more bandwidth changes are possible. As a first step, stop toggling the IEEE80211_HT_CAP_SUP_WIDTH_20_40 flag in the HT capabilities and instead introduce a bandwidth field indicating the currently usable bandwidth to transmit to the station. Of course, make all drivers use it. To achieve this, make ieee80211_ht_cap_ie_to_sta_ht_cap() get the station as an argument, rather than the new capabilities, so it can set up the new bandwidth field. If the station is a VHT station and VHT bandwidth is in use, also set the bandwidth accordingly. Doing this allows us to get rid of the supports_40mhz flag as the HT capabilities now reflect the true capability instead of the current setting. While at it, also fix ieee80211_ht_cap_ie_to_sta_ht_cap() to not ignore HT cap overrides when MCS TX isn't supported (not that it really happens...) Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-02-12Merge branch 'for-john' of ↵John W. Linville
git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
2013-02-11wlcore: remove newly introduced alloc/OOM messagesLuciano Coelho
In commit 0d2e7a5c (wireless: Remove unnecessary alloc/OOM messages, alloc cleanups) OOM messages after alloc were removed from the wlcore modules. Commit afb43e6d (wlcore: remove if_ops from platform_data) reintroduced a couple of those. This patch removes them. Signed-off-by: Luciano Coelho <coelho@ti.com> Reviewed-by: Felipe Balbi <balbi@ti.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-02-11mac80211: remove IEEE80211_HW_SCAN_WHILE_IDLEJohannes Berg
There are only a few drivers that use HW scan, and all of those don't need a non-idle transition before starting the scan -- some don't even care about idle at all. Remove the flag and code associated with it. The only driver that really actually needed this is wl1251 and it can just do it itself in the hw_scan callback -- implement that. Acked-by: Luciano Coelho <coelho@ti.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-02-08wlcore: fix wrong remote rates when starting STA roleLuciano Coelho
In wl18xx, we use a new ACX command in order to set the remote supported rates, once we know it (ie. after association). The wl12xx firmware doesn't support changing the rates after the STA is started, so we need to use all supported rates. Commit 530abe19 (wlcore: add ACX_PEER_CAP command) broke that by using wlvif->rate_set when starting the STA role. Signed-off-by: Luciano Coelho <coelho@ti.com>
2013-02-08wl18xx: add new phy configuration parameters for telec supportVictor Goldenshtein
Add back-off settings to the wl18xx_mac_and_phy_params. We had an empty space where the new parameters are added, so this change doesn't affect backwards-compatibility with older firmwares. Update WL18XX_CONF_VERSION accordingly. Signed-off-by: Victor Goldenshtein <victorg@ti.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2013-02-08wlcore: don't hide real error code when booting failsLuciano Coelho
There's no need to hide the actual error that was reported when booting fails. For instance, on I/O error, we were returing -EINVALID, which doesn't make sense at all. Signed-off-by: Luciano Coelho <coelho@ti.com>
2013-02-08wlcore: move wl12xx_platform_data up and make it truly optionalLuciano Coelho
The platform data is used not only by wlcore-based drivers, but also by wl1251. Move it up in the directory hierarchy to reflect this. Additionally, make it truly optional. At the moment, disabling platform data while wl1251_sdio or wlcore_sdio are enabled doesn't work, but it will be necessary when device tree support is implemented. Signed-off-by: Luciano Coelho <coelho@ti.com> Reviewed-by: Felipe Balbi <balbi@ti.com>
2013-02-08wlcore: use PLATFORM_DEVID_AUTO for plat dev creation to avoid conflictsLuciano Coelho
The platform devices can be created by both wlcore_sdio and wlcore_spi. Theoretically, if both are connected to the same board, there will be a conflict. Reported-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2013-02-08wlcore: use wl12xx_platform_data pointer from wlcore_pdev_dataLuciano Coelho
Just a small cleanup to use the pointer provided by wlcore_pdev_data instead of using a separate pointer then copying. Reviewed-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2013-02-08wlcore: remove if_ops from platform_dataLuciano Coelho
We can't pass pointers from the platform data to the modules, because with DT it cannot be done. Those pointers are not set by the board files anyway. It's the bus modules that set them, so they can be safely removed from the platform data without changing any board files. Create a new structure that the bus modules pass to wlcore. This structure contains the if_ops pointers and a pointer to the actual platform data. Signed-off-by: Luciano Coelho <coelho@ti.com> Reviewed-by: Felipe Balbi <balbi@ti.com>
2013-02-08wlcore: remove unused set_power methodLuciano Coelho
There is no platform-specific set_power method anymore. Power setting is done in the bus modules (wlcore_sdio and wlcore_spi). Signed-off-by: Luciano Coelho <coelho@ti.com> Reviewed-by: Felipe Balbi <balbi@ti.com>
2013-02-08wlcore: use single-role version when verifying the PLT firmwareLuciano Coelho
The PLT firmware used by wl12xx for calibration always has the same version number as the single-role firmware. Currntly the driver rejects the PLT firmware since anything that is not single-role uses the multi-role version. Fix this by using the single-role version for everything except multi-role. Signed-off-by: Luciano Coelho <coelho@ti.com>
2013-01-30Merge branch 'for-john' of ↵John W. Linville
git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
2013-01-29Merge branch 'for-linville' of ↵John W. Linville
git://git.kernel.org/pub/scm/linux/kernel/git/luca/wl12xx Conflicts: drivers/net/wireless/ti/wlcore/main.c
2013-01-18mac80211: remove ARP filter enable/disable logicJohannes Berg
Depending on the driver, having ARP filtering for some addresses may be possible. Remove the logic that tracks whether ARP filter is enabled or not and give the driver the total number of addresses instead of the length of the list so it can make its own decision. Reviewed-by: Luciano Coelho <coelho@ti.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-01-18Merge branch 'wl12xx-next' into for-linvilleLuciano Coelho
Conflicts: drivers/net/wireless/ti/wl12xx/main.c drivers/net/wireless/ti/wlcore/wlcore.h
2013-01-14wireless: make the reg_notifier() voidLuis R. Rodriguez
The reg_notifier()'s return value need not be checked as it is only supposed to do post regulatory work and that should never fail. Any behaviour to regulatory that needs to be considered before cfg80211 does work to a driver should be specified by using the already existing flags, the reg_notifier() just does post processing should it find it needs to. Also make lbs_reg_notifier static. Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com> [move lbs_reg_notifier to not break compile] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-01-03mac80211: split TX aggregation stop actionJohannes Berg
When TX aggregation is stopped, there are a few different cases: - connection with the peer was dropped - session stop was requested locally - session stop was requested by the peer - connection was dropped while a session is stopping The behaviour in these cases should be different, if the connection is dropped then the driver should drop all frames, otherwise the frames may continue to be transmitted, aggregated in the case of a locally requested session stop or unaggregated in the case of the peer requesting session stop. Split these different cases so that the driver can act accordingly; however, treat local and remote stop the same way and ask the driver to not send frames as aggregated packets any more. In the case of connection drop, the stop callback the driver is otherwise supposed to call is no longer required. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-12-11wlcore: Always pass DMA-able buffers to mmc functionsIdo Yariv
Some of the mmc drivers initiate DMA transfers with buffers passed from higher layers. This means that the driver shouldn't ever pass non DMA-able buffers, such as ones that are unaligned, allocated on the stack or static. Fix a couple of calls to the mmc layer in which buffers which weren't necessarily DMA-able were passed. [Use sizeof(*wl->buffer_32) instead of sizeof(u32) -- Luca] Signed-off-by: Ido Yariv <ido@wizery.com> Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-12-11wl18xx: count HW block spare based correctly on keysArik Nemtsov
We have no idea how many VIFs there are requiring a special spare, we know just about the number of keys set. Rename the counter appropriately and toggle it whenever a special key is added/removed. Previously this was only changed once, since it was toggled whenever the actual spare was changed. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-12-11wlcore: support scan reports during periodic scanEyal Shapira
FW API changed and now PERIODIC_SCAN_REPORT_EVENT is sent in case results were found at the end of each sched scan cycle. Previous FW was missing that and broke sched scan. This API change is available from 18xx FW 8.5.0.0.27 [Arik - move changes to 18xx specific files, align FW structures to latest for scan command] Signed-off-by: Eyal Shapira <eyal@wizery.com> Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-12-11wl18xx: support MIMO only if HT mode is not forced to SISOArik Nemtsov
Don't use MIMO rates when HT mode is forced to SISO, even if we have multiple antennas. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-12-11wlcore: consolidate Rx BA bitmap management to links structArik Nemtsov
Remove the STA specific ba_rx_bitmap field and use the common links structure. This simplifies code setting/checking the BA bitmap. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-12-11wlcore: don't take mutex before stopping queuesArik Nemtsov
Protect all functions touching queue_stop_reasons by spin-lock, since they are accessed by op_tx. Now there's no need to take the mutex before caling wlcore_queue_xxx functions. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-12-11wlcore: use separate HW queue for each AC in each vifArik Nemtsov
Start using the new hw_queue mechanism in mac80211 and give each AC in each vif its own hw_queue number. This allows us to stop an AC in a vif independently from other vifs. Change the Tx watermark handling functions to count packets per AC in vif. From now on fast links should not be able to hurt the throughput of slow links on the same AC but on different vifs. Change internal queue mgmt functions to operate per vif, to support the new Tx watermark granularity. Make the global versions of the queue stop/start functions to use the global mac80211 API for queue mgmt. This helps in situations where the driver currently doesn't know all the vifs that reside in mac80211. Recovery is a good example for such a case. [Moved hw_base_queue addition into the wlcore_tx_get_mac80211_queue() function; changed WARN_ONs to WARN_ON_ONCEs; simplified for loops; fixed new checkpatch warnings. -- Luca] Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-12-11wlcore: use link count for single-STA-PSM optimizationArik Nemtsov
Only allow a PSM STA to congest FW memory when it is the single active link. Being a single STA doesn't imply a single link - there might be other links on other roles. [Changed WARN_ON to WARN_ON_ONCE -- Luca] Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-12-11wl18xx: limit Tx for the AP single-STA-in-PSM caseArik Nemtsov
Treat a single connected STA in PSM as a slow link and regulate Tx speed according to slow link priority/stop thresholds. This allows us to avoid flooding the FW, while delivering decent throughput to a peer in forced-PSM. [Small simplification of the if statements -- Luca] Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-12-11wlcore/wl18xx: change priority calculations for linksArik Nemtsov
Update the 18xx FW status private part to include Tx related link priorities. Introduce new HW ops to determine link priority per chip family. For 18xx the changes are: - Suspended links are at most low priority and Tx for them is stopped beyond the suspend threshold. - Active links now get their thresholds directly from FW - There's a new "stop" threshold for active links, at which point a link stops receiving new packets. Update the min 18xx FW version required to make sure suspended links bitmap is advertised by the FW. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-12-11wl18xx: fix a bug in wl->num_rx_desc initializationYair Shapira
wl->num_rx_desc was mistakenly initialized with WL18XX_NUM_TX_DESCRIPTORS but it should use WL18XX_NUM_RX_DESCRIPTORS instead. This bug was passed unnoticed because currently both RX and TX descriptors are initialized to the same value (32). Signed-off-by: Yair Shapira <yair.shapira@ti.com> Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-12-11wlcore: set 5Ghz probe-req template for DFS channelsArik Nemtsov
Even passive scans on DFS channels require us to send probe requests, so configure the probe-req in this case. Also use this opportunity to prevent the code from crashing in case no SSIDs are sent from above. This will likely happen in the DFS case introduced. Even a passive scan might need the probe request configured because of DFS channels. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-12-11wlcore: improve handling for Rx errorsArik Nemtsov
Treat Rx error code as a bitmask. This allows sending MIC failures when other error bit are on. Align Rx descriptor status mask to the FW definition. Ease debugging in case FW reports failure to decrypt on packets. Discard corrupted packets early in Rx path to avoid reporting other abnormalities with corrupted packets that also have other failure bytes on. Namely - we don't want to get a MIC failure on a corrupted packet. This is mandated by the WiFi specification - see section 11.4.2.4.1 in 802.11-2012. Signed-off-by: Eyal Shapira <eyal@wizery.com> Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-12-11wlcore: increase scan dwell times if no activityEyal Shapira
There's a limit on scan dwell times of max 30ms in order to avoid degrading voip traffic which could be going on while scanning. However these dwell times increase the chance of missing out on nearby APs leading to partial scan results. Allow configuration of longer dwell times in case there no active interface (i.e. no STA associated or AP up). [Arik - count started vifs using an in-driver function] [Fixed some new checkpatch warnings regarding comments in the networking subsystem. -- Luca] Signed-off-by: Eyal Shapira <eyal@wizery.com> Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-12-11wlcore: remove support for injected TxArik Nemtsov
Require each incoming packet to have a valid vif. The injected Tx code path was buggy (and unused), so disallow it altogether. Cleanup a few places and add a warning so we can better discover anomalies (corrupted skbs?) masquerading as injected Tx. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-12-11wlcore: add ACX_PEER_CAP commandEliad Peller
ACX_PEER_CAP command is just ACX_PEER_HT_CAP, but allows configuring the peer's support rates as well. this is needed because we start the station role when the remote rates are not known yet. the two commands should be unified in future fw versions, but for now add a new set_peer_cap per-hw op, that will use ACX_PEER_CAP for 18xx, and ACX_PEER_HT_CAP for 12xx. 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-12-06wlcore/wl18xx/wl12xx: remove __dev* attributesBill Pemberton
CONFIG_HOTPLUG is going away as an option. As result the __dev* markings will be going away. Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst, and __devexit. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Luciano Coelho <coelho@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-12-05wl18xx: set last Tx rate from FW statusArik Nemtsov
Obtain the last Tx rate from the FW status and translate it to the mac80211 rate+flag format before sending it up via the Tx status. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-12-05wlcore: improved Tx scheduling algorithmArik Nemtsov
Prioritize EDCA by choosing the AC before anything else. Use the fast/slow link bitmap in FW to improve the scheduling algorithm for the multi-link scenario. Set packet thresholds to determine if a given link is high or low priority according to its speed. A slow link will be given high priority if the amount of packets queued for it in the FW is lower than the slow-threshold. Similarly, a fast link will be given high priority if the number of its packets queued in FW is smaller than the high-threshold. The improved algorithm: 1. Choose optimal AC according to FW utilization 2. Traversing the VIFs in a round-robin fashion, try to choose a high priority link. Links are traversed in a round-robin fashion inside a VIF. 3. If no high priority links are found, choose the first non-empty (low priority) link found in the round robin. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-12-05wlcore: track FW-allocated packets per linkArik Nemtsov
Move FW-allocation tracking code to the fw_status function and track allocations made by all links. These will be incorporated in the improved Tx scheduling algorithm. Manually zero the system link counters on op_stop, as this link is not allocated the normal way. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-12-05wlcore: count packets held per AC in each vifArik Nemtsov
This accounting will help find a vif that has data in a specific AC. Otherwise we have to traverse all the links, which can be lengthy for the AP case. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-12-05wlcore: track wlvif inside per-link structureArik Nemtsov
This allows us to pass only the link as a parameter to various functions and deduce the wlvif. Note that this member will be NULL for global links. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-12-05wlcore: initialize per-link FW freed blocks correctlyArik Nemtsov
When a link is allocated, sometimes the "freed packets" counter in FW is non zero, but we always assumed it is. This caused us to incorrectly account FW allocated blocks in some cases. When operating in AP mode, this bug caused some stations to never come back from PSM. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-12-05wlcore: restore default channel configurationVictor Goldenshtein
wlcore allocates two static structs wl1271_band_2ghz & wl1271_band_5ghz which are used/modified by Reg-Domain e.g. some channel might be marked as passive at some point. Make sure we don't keep stale settings around if the HW is unregistered/registered during operation. [Arik - use Tx-power constant and tweak commit message] Signed-off-by: Victor Goldenshtein <victorg@ti.com> Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-12-05wlcore: consolidate free_link and always call itArik Nemtsov
Make sure free_link is always called when removing an interface. This ensures all skbs belonging to this interface are returned to mac80211. Otherwise these dangling skbs might crash the system on the next call to wl1271_tx_reset_link_queues(). This happens on recovery/stop or an unsuccessful Tx flush. Signed-off-by: Ido Yariv <ido@wizery.com> Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-12-05wlcore: take the mutex before resetting Tx queuesArik Nemtsov
Otherwise we risk contention for private members of our global structure while op_stop_locked is running. Reported-by: Ido Yariv <ido@wizery.com> Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-12-05wlcore: remove unnecessary WARN_ON in wl12xx_tx_resetVictor Goldenshtein
Sometimes the driver can perform a recovery while Tx is active, this will trigger unnecessary warning which might delay the recovery for more than 100 mS. Signed-off-by: Victor Goldenshtein <victorg@ti.com> Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-12-04wl18xx: declare support for greenfield ht_capEliad Peller
The 18xx fw supports greenfield so add the IEEE80211_HT_CAP_GRN_FLD flag to the supported ht capabilities flags. Signed-off-by: Eliad Peller <eliad@wizery.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-12-04wlcore: clear roc_vif on iface removalArik Nemtsov
When removing an interface currently performing a ROC operation, clear the current ROC state. This is useful especially during recovery and keeps mac80211 in sync to our state. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-12-04wlcore: remove WLCORE_QUIRK_NO_ELPEliad Peller
all the current firmwares support elp, so we can safely remove WLCORE_QUIRK_NO_ELP. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>