summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ti/wlcore/wlcore.h
AgeCommit message (Collapse)Author
2021-03-07wlcore: Fix command execute failure 19 for wl12xxTony Lindgren
[ Upstream commit cb88d01b67383a095e3f7caeb4cdade5a6cf0417 ] We can currently get a "command execute failure 19" error on beacon loss if the signal is weak: wlcore: Beacon loss detected. roles:0xff wlcore: Connection loss work (role_id: 0). ... wlcore: ERROR command execute failure 19 ... WARNING: CPU: 0 PID: 1552 at drivers/net/wireless/ti/wlcore/main.c:803 ... (wl12xx_queue_recovery_work.part.0 [wlcore]) (wl12xx_cmd_role_start_sta [wlcore]) (wl1271_op_bss_info_changed [wlcore]) (ieee80211_prep_connection [mac80211]) Error 19 is defined as CMD_STATUS_WRONG_NESTING from the wlcore firmware, and seems to mean that the firmware no longer wants to see the quirk handling for WLCORE_QUIRK_START_STA_FAILS done. This quirk got added with commit 18eab430700d ("wlcore: workaround start_sta problem in wl12xx fw"), and it seems that this already got fixed in the firmware long time ago back in 2012 as wl18xx never had this quirk in place to start with. As we no longer even support firmware that early, to me it seems that it's safe to just drop WLCORE_QUIRK_START_STA_FAILS to fix the error. Looks like earlier firmware got disabled back in 2013 with commit 0e284c074ef9 ("wl12xx: increase minimum singlerole firmware version required"). If it turns out we still need WLCORE_QUIRK_START_STA_FAILS with any firmware that the driver works with, we can simply revert this patch and add extra checks for firmware version used. With this fix wlcore reconnects properly after a beacon loss. Cc: Raz Bouganim <r-bouganim@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20210115065613.7731-1-tony@atomide.com Signed-off-by: Sasha Levin <sashal@kernel.org>
2015-09-29wlcore: align reg_ch_conf_last[] to 64bitGuodong Xu
Align fields reg_ch_conf_last and reg_ch_conf_pending of struct wl1271{} to 64bit. Without this, on 64bit ARM, wlcore_set_pending_regdomain_ch() fails at the point it calls set_bit(ch_bit_idx, (long*)wl->reg_ch_conf_pending); Here is the error message while doing iw wlan0 scan or connect: [ 10.666857] wlcore: IRQ work [ 10.670046] wlcore: intr: 0x40 (fw_rx_counter = 1, drv_rx_counter = 0, tx_results_counter = 0) [ 10.678697] wlcore: WL1271_ACX_INTR_DATA [ 10.682810] Unhandled fault: alignment fault (0x96000021) at 0xffffffc037a817f4 [ 10.690139] Internal error: : 96000021 [#1] PREEMPT SMP [ 10.695366] Modules linked in: [ 10.698437] CPU: 3 PID: 894 Comm: irq/60-wl18xx Tainted: G W 4.2.0-rc6-linaro-hikey #2 [ 10.707501] Hardware name: HiKey Development Board (DT) [ 10.712733] task: ffffffc03a9d1680 ti: ffffffc039e18000 task.ti: ffffffc039e18000 [ 10.720239] PC is at set_bit+0x14/0x30 [ 10.724002] LR is at wlcore_set_pending_regdomain_ch+0x40/0x4c Signed-off-by: Guodong Xu <guodong.xu@linaro.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-08-06wl18xx: add dynamic fw tracesGuy Mishol
add option to dynamically configure the fw which debug traces to open Signed-off-by: Guy Mishol <guym@ti.com> Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-03-19wlcore: set irq_trigger in board files instead of hiding behind a quirkLuciano Coelho
The platform_quirk element in the platform data was used to change the way the IRQ is triggered. When set, the EDGE_IRQ quirk would change the irqflags used and treat edge trigger differently from the rest. Instead of hiding this irq flag setting behind the quirk, have the board files set the irq_trigger explicitly. This will allow us to use standard irq DT definitions later on. Signed-off-by: Luciano Coelho <luca@coelho.fi> [Eliad - rebase, add irq_trigger field and pass it, update board file changes] Signed-off-by: Eliad Peller <eliad@wizery.com> Tested-by: Nikita Kiryanov <nikita@compulab.co.il> Acked-by: Kalle Valo <kvalo@codeaurora.org> Acked-by: Sekhar Nori <nsekhar@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
2015-01-09wlcore: add dfs region to reg domain update cmdGuy Mishol
Add dfs region to the reg domain channel update command. Signed-off-by: Guy Mishol <guym@ti.com> Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-01-09wlcore: add dfs master restart callsEliad Peller
call wlcore_cmd_dfs_master_restart when starting the ap on a new channel (after csa is done). Add a new WLVIF_FLAG_BEACON_DISABLED flag to indicate that dfs_master_restart command is required. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-01-09wl18xx: add radar detection implementationEliad Peller
Add support for CAC start/stop commands, and pass radar detection events from the fw to mac80211. Bump fw name (to wl18xx-fw-4.bin) and min fw version (to 8.9.*.*.11), and align event mailbox accordingly. Signed-off-by: Guy Mishol <guym@ti.com> Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-01-09wlcore: enable sleep during AP mode operationKobi L
Enable ELP authorization in AP mode and enable the use of the wakeup bit in the ELP register. Introduce AP role sleep configuration which is disabled by default. When configured, it allows the AP to sleep when ELP is authorized for it. Signed-off-by: Kobi Leibovitch <kobi.lev100@gmail.com> Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-01-09wlcore: add ability to reduce FW interrupts during suspendRam Amrani
Add the ability to mask FW interrupts on RX BA activity, PSM entry/exit and fast-link notifications. This is used when the host is suspended in order to decrease redundant wake ups. Signed-off-by: Ram Amrani <ramrani@ti.com> Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-01-09wlcore/wl18xx: handle rc updates in a separate workEliad Peller
sta_rc_update runs in atomic context. thus, a new work should be scheduled in order to configure the fw with the required configuration. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2014-07-15wlcore/wl18xx/wl12xx: convert bitmaps to unsigned longsEliad Peller
The *_bit operations expect unsigned longs. Instead of casting the pointers, simply define various bitmaps as unsigned long (instead of u32). Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-07-15wlcore/wl18xx: add smart config commandsEliad Peller
These commands configures the fw to set key, enter smart config mode, and exit it. Add relevant hw ops as well. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-06-25mac80211: split sched scan IEsDavid Spinadel
Split sched scan IEs to band specific and not band specific blocks. Common IEs blocks may be sent to the FW once per command, instead of per band. This allows optimization of size of the command, which may be required by some drivers (eg. iwlmvm with newer firmware version). As this changes the mac80211 API, update all drivers to use the new version correctly, even if they don't (yet) make use of the split data. Signed-off-by: David Spinadel <david.spinadel@intel.com> Reviewed-by: Alexander Bondar <alexander.bondar@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2014-02-13wlcore: wl18xx: allow CCK rates for AP modeArik Nemtsov
12xx chips allow only OFDM rates in AP mode for BT-Coex purposes. This is no longer required in 18xx chips, starting with FW 8.6.0.0.8. Update the min allowed FW version in 18xx to support this functionality. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-02-13wlcore/wl12xx/wl18xx: configure iface_combinations per-hwEliad Peller
Each hw supports a different iface combinations. Define the supported combinations in each driver, and save it in wl->iface_combinations. Since each driver defines its own combinations now, it can also define its max supported channels, so we no longer need to save and set it explicitly in wlcore. Update wl18xx interface combinations to allow multiple APs. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-02-13wlcore/wl12xx/wl18xx: configure max_stations per-hwEliad Peller
Each hw supports a different max stations (connected to the same ap). add a new wl->max_ap_stations and use it instead of the current common AP_MAX_STATIONS. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-02-13wlcore/wl12xx/wl18xx: configure num_links per-hwEliad Peller
Upcoming fw versions will have different max links support (according to the hw). Get ready for it by configuring wl->num_links per-hw, instead of using the const WL12XX_MAX_LINKS. However, continue using WLCORE_MAX_LINKS in order to simplify structs declarations (we use it in multiple bitmaps, and converting them to dynamic arrays is just cumbersome). Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-02-13wlcore/wl12xx/wl18xx: simplify fw_status handlingEliad Peller
Instead of splitting the fw_status into 2 and using some complex calculations, read the fw status and let each low-level driver (wl12xx/wl18xx) convert it into a common struct. This is required for the upcoming fw api changes, which break the current logic anyway. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-02-13wlcore: memset wl->rx_filter_enabled to zero after recoveryNadim Zubidat
zero rx_filter_enabled array after recovery to avoid cases were the driver will keep trying to clear a filter which is not configured in FW. Such case will cause consecutive recoveries due to command execution failures. While on it, convert rx_filter_enabled to bitmap, to save some memory and make sparse happy (it doesn't like sizeof(bool array)). Signed-off-by: Nadim Zubidat <nadimz@ti.com> Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-10-23wlcore/wl18xx/wl12xx: FW log params per chip archIgal Chernobelsky
FW memory block size and FW log end marker parameters are added to wl structure and are initialized per chip architecture. convert_hwaddr hw operation is added to convert chip dependent FW internal address. Copy from FW log is also simplified to copy the entire memory block as FW logger utility is repsponsible for parsing of FW log content. Signed-off-by: Igal Chernobelsky <igalc@ti.com> Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
2013-10-23wlcore: add ap_event_maskEliad Peller
Add new ap_event_mask field, to indicate events that should be unmasked only when there's an ap interface. This is done in order to avoid spurious wakeups when we don't care about the incoming event anyway. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
2013-09-30wlcore: ROC on AP channel before auth replyArik Nemtsov
Start a ROC on the AP channel beforing sending the authentication reply to a connecting STA. This ROC is held up to 1 second via a timer. If the station is authorized and added by mac80211, the ROC is extended until the station is fully authorized. We make sure not to ROC twice when several stations are connecting in parallel and to only release the ROC when both the pending-reply timer and the STA-state callbacks do not require it. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
2013-03-25wlcore: set max num of Rx BA sessions per chipIgal Chernobelsky
Maximum number of supported RX BA sessions depends on chip type. wl18xx supports 5 RX BA sessions while wl12xx supports 3. Signed-off-by: Igal Chernobelsky <igalc@ti.com> Signed-off-by: Luciano Coelho <coelho@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-01-18Merge branch 'wl12xx-next' into for-linvilleLuciano Coelho
Conflicts: drivers/net/wireless/ti/wl12xx/main.c drivers/net/wireless/ti/wlcore/wlcore.h
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-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-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-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-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: 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-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>
2012-12-04wlcore/wl12xx: make sure session id is always zero for APArik Nemtsov
The 12xx FW doesn't support non-zero session ids for AP-mode. Introduce an appropriate quirk to make sure the session id is always zero when needed. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-12-04wlcore/wl12xx/wl18xx: verify multi-role and single-role fw versionsLuciano Coelho
Previously we were only checking the single-role firmware version. Now add code to check for the firmware versions separately for each firmware type. Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-12-04wlcore: change way of checking the firmware versionLuciano Coelho
The firmwares version string contain 5 integers. We used to consider all the digits (except for the first one, which indicates the chip) as linearly increasing version numbers. This is not correct, because some of the integers indicate type of firmware (eg. single-role vs. multi-role) or the internal project it was created for. Besides, this varies a bit from chip to chip, so we need to make the firmware version checks more flexible (eg. allow the lower driver to ignore some of the integers). Additionally, we need to change the code so that we only check for a linearly increasing number on the fields where this actually makes sense. Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-12-04wlcore/wl12xx: move wl12xx chip ID defines to the lower driverLuciano Coelho
Move wl12xx-specific chip ID macros to the wl12xx driver and rename them to 127X and 128X for clarity since both the "1" (2.4GHz) and the "3" (2.4GHz and 5GHz) variants use the same chip ID. Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-12-04wlcore: gather information about firmware stabilityLuciano Coelho
It's sometimes useful to gather information about the firmware stability in long test runs, especially to see if problems are recurring frequently or not. With this commit we count the number of times a hardware recovery was issued and print it out during recovery and in the driver_state in debugfs. Signed-off-by: Luciano Coelho <coelho@ti.com> 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-12-04wlcore/wl18xx/wl12xx: separate channel count between chipsArik Nemtsov
18xx chips are capable of staying on 2 channels at the same time. Introduce a chip-family specific parameter to set the number of channels in the interface-combinations published by the driver. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-11-28wlcore: use new set bandwidth command to adjusting channel BWArik Nemtsov
We support changing the channel BW when we started the STA role on a 40Mhz bandwidth. Otherwise a reconnection is required. Save the started channel width and use it when channel width updates arrive. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-11-28wlcore: call ieee80211_sched_scan_stopped on interface removalEliad Peller
The interface might go down before we got the SCHED_STOPPED event, so make sure to call ieee80211_sched_scan_stopped() if the scanned interface is removed. Replace sched_scanning with sched_vif in order to save the scanned interface. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-11-28wlcore: add new reg-domain configuration commandVictor Goldenshtein
In 18xx the calibration process of the PHY Cortex domain requires to perform an active calibration of the channel before it can be used for transmission. To fulfill world wide regulatory restrictions, fw should be always synchronized/updated with current CRDA configuration. Add a new "CMD_DFS_CHANNEL_CONFIG" command to update the fw with current reg-domain, this command passes a bit map of channels that are allowed to be used for transmission. The driver shall update the fw during initialization and after each change in the current reg-domain configuration. The driver will save the channel number of incoming beacons during the scan process, as they might be a result of the passive scan on "IEEE80211_CHAN_PASSIVE_SCAN" channel and will update the fw accordingly once the scan is finished, the purpose of this is to be ready in case of the authentication request on one of these disabled (uncalibrated) channels. The new command requires to wait for the fw completion event "DFS_CHANNELS_CONFIG_COMPLETE_EVENT". No scan commands (including the sched scan) can be executed concurrently with the "CMD_DFS_CHANNEL_CONFIG", wl->mutex ensures that. [Arik - move reset of reg_ch_conf_last to safe place inside op_stop_locked] [Eliad - adjust to new event waiting api] Signed-off-by: Victor Goldenshtein <victorg@ti.com> Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-11-27wlcore: save session_id per-linkEliad Peller
A new session_id is generated on link allocation. it is saved in a global array and used later, on tx. The new fw api adds new bcast/global_session_id fields to start_role(ap) command, and a new session_id field to add_peer command. align the driver with it. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-11-27wlcore: update events enum/struct to new fw apiEliad Peller
The event mailbox in wl18xx has a different (non-compatible) structure. Create common functions in wlcore to handle the events, and call them from the chip-specific event mailbox parsers. This way, each driver (wl12xx/wl18xx) extracts the event mailbox by itself according to its own structure, and then calls the common wlcore functions to handle it. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-11-27wlcore: update channel_switch/stop_channel_switch commandsEliad Peller
Some fields were added to the channel_switch and stop_channel_switch commands. Unfortunately, the new 18xx channel_switch struct is not backward compatible with the 12xx channel switch struct. Add a new channel_switch op to wlcore, and update the driver accordingly. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-11-27wl18xx: increase MAX_CHANNELS_5GHZEliad Peller
Some regdomains have more than 23 valid 5ghz channels, so 18xx's MAX_CHANNELS_5GHZ was increased to 32. Since now we have different max 5ghz channels values for wl12xx and wl18xx, add a new wl->max_channels_5ghz field, and use it for scan channels configuration. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-11-27wlcore: split 18xx and 12xx scan mechanismEliad Peller
The scan APIs of 12xx and 18xx are totally different. Use some common functions as much as possible (e.g. for setting scan channels), but split scan.c into chip-specific scan.c files, each implementing its own scan mechanism. (in other words - move most of the current wlcore's scan.c into wl12xx, and implement a similar mechanism in 18xx, according to the new api) New wlcore ops are introduced in order to call the chip-specific scan functions. The template indices used for each scan (regular/scheduled) are also different between the chips, so set the correct indices used for each scan type after identifying the chip. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-11-27wlcore: implement .remain_on_channel() callbackEliad Peller
implement the reamin_on_channel() callback by starting a dev role (already associated with the current vif) on the requested channel/band. This channel is usually different from the channel of the sta role, so pass it to wl12xx_roc() as well, and notify mac80211 (async) when the fw is ready on the new channel. Now, in case of offchannel tx, we should use the dev role hlid, instead of the sta hlid. Signed-off-by: Eliad Peller <eliad@wizery.com> Reviewed-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-11-27wlcore: workaround start_sta problem in wl12xx fwEliad Peller
for some reason, the wl12xx fw is not able to rx/tx on the first start_sta cmd. Workaround it by issuing a dummy start_sta + stop_sta before starting the sta for the final time. Signed-off-by: Eliad Peller <eliad@wizery.com> Reviewed-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>