aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2011-08-25wl12xx: add support for multiple SSIDs in sched_scanLuciano Coelho2-7/+57
The wl12xx firmwares support multiple SSIDs in a single sched_scan run. This patch implements support for it. We use three different types os sched_scan: FILTER_ANY (ie. not filtering, only wildcard SSID in the probe_reqs); FILTER_LIST (ie. send out probe_reqs with the specified SSIDs and only report if they are found); and FILTER_DISABLED (ie. send out probe_reqs with the specified SSIDs, but report anything found). Since we still don't have proper filter support in nl80211/cfg80211 yet, we cannot use filters when the wildcard SSID is used. Thus, we will not filter anything if the wildcard SSID is specified. Signed-off-by: Luciano Coelho <[email protected]>
2011-08-25wl12xx: enter psm only after station role was startedEliad Peller1-13/+13
The station didn't get into psm after recovery, because psm was configured before sta role was started. Move wl1271_ps_set_mode() to be executed only after the role was started. Signed-off-by: Eliad Peller <[email protected]> Signed-off-by: Luciano Coelho <[email protected]>
2011-08-25wl12xx: increase psm_entry_retriesEliad Peller1-1/+1
In congested env, sometimes 5 psm entry retries are not enough. Increase the retries count to 8. Signed-off-by: Eliad Peller <[email protected]> Signed-off-by: Luciano Coelho <[email protected]>
2011-08-25wl12xx: initialize rate_set on band rates initializationEliad Peller1-2/+6
In some corner cases, (invalid) 11g rates were used while working on 11a band. Take care of it by initializing rate_set according to the configured band. Signed-off-by: Eliad Peller <[email protected]> Signed-off-by: Luciano Coelho <[email protected]>
2011-08-25wl12xx: allow 11a AP-mode for wl127x devicesArik Nemtsov1-3/+1
There was a check preventing 127x devices from using the 11a band when operating as AP. Since we now support this functionality, remove the check. With this patch, a 11a AP starts ok on 127x cards. Signed-off-by: Arik Nemtsov <[email protected]> Signed-off-by: Eliad Peller <[email protected]> Signed-off-by: Luciano Coelho <[email protected]>
2011-08-25wl12xx: use 2 spare TX blocks for GEM cipherGuy Eilam4-3/+22
Add tx_spare_blocks member to the wl1271 struct for more generic configuration of the amount of spare TX blocks that should be used. The default value is 1. In case GEM cipher is used by the STA, we need 2 spare TX blocks instead of just 1. Signed-off-by: Guy Eilam <[email protected]> Acked-by: Arik Nemtsov <[email protected]> Signed-off-by: Luciano Coelho <[email protected]>
2011-08-22wl12xx: fix tx_queue_count spurious incrementArik Nemtsov1-12/+12
Only increment the queue count after actually queuing the skb. This avoids a spurious increment is case of dropped packets. Also move the Tx-watermark checking code after the packet is enqueued. This makes the count more accurate - it includes the just-queued packet. Signed-off-by: Arik Nemtsov <[email protected]> Signed-off-by: Eliad Peller <[email protected]> Signed-off-by: Luciano Coelho <[email protected]>
2011-08-22wl12xx: AP-mode - prevent Tx to stale/invalid stationsArik Nemtsov1-3/+17
Don't pollute the queues with Tx directed to invalid stations. This can happen during recovery. Signed-off-by: Arik Nemtsov <[email protected]> Signed-off-by: Eliad Peller <[email protected]> Signed-off-by: Luciano Coelho <[email protected]>
2011-08-22wl12xx: set the AP-started flag only after setting keysArik Nemtsov1-3/+3
This fix eliminates a potential race between starting the AP role and setting encryption keys. Signed-off-by: Arik Nemtsov <[email protected]> Signed-off-by: Eliad Peller <[email protected]> Signed-off-by: Luciano Coelho <[email protected]>
2011-08-22wl12xx: enable AP advanced functionalityArik Nemtsov4-51/+51
This adjusts FW TX block allocation for connected stations in PS. Firmware congestion is measured in allocated packets instead of blocks. Allow a link in PS to queue up to 2 packets to the FW. Signed-off-by: Arik Nemtsov <[email protected]> Signed-off-by: Eliad Peller <[email protected]> Signed-off-by: Luciano Coelho <[email protected]>
2011-08-22wl12xx: don't wait for disconnection eventEliad Peller1-6/+0
Sometimes the fw doesn't send the DISCONNECT_EVENT_COMPLETE_ID on station role stop, so don't wait for it. Signed-off-by: Eliad Peller <[email protected]> Signed-off-by: Luciano Coelho <[email protected]>
2011-08-22wl12xx: handle wrap-around overflow in released Tx blocks FW counterArik Nemtsov1-2/+9
When the FW Tx released blocks counter wraps around, we should correct our calculation of released blocks. Otherwise we add a large negative figure to our driver freed blocks counter Signed-off-by: Arik Nemtsov <[email protected]> Signed-off-by: Eliad Peller <[email protected]> Signed-off-by: Luciano Coelho <[email protected]>
2011-08-22wl12xx: schedule TX packets according to FW packet occupancyArik Nemtsov4-27/+57
When selecting packets for transmission, prefer the ACs that are least occupied in the FW. When packets for multiple ACs are present in the FW, it decides which to transmit according to WMM QoS parameters. With these changes, lower priority ACs should not be starved when higher priority traffic is present. Signed-off-by: Arik Nemtsov <[email protected]> Signed-off-by: Eliad Peller <[email protected]> Signed-off-by: Luciano Coelho <[email protected]>
2011-08-22wl12xx: track freed packets in FW by ACArik Nemtsov3-3/+23
Track the number of freed packets in each AC when receiving an interrupt from the FW. This paves the way for tracking allocated packets per AC. Signed-off-by: Arik Nemtsov <[email protected]> Signed-off-by: Eliad Peller <[email protected]> Signed-off-by: Luciano Coelho <[email protected]>
2011-08-22wl12xx: don't remove key if hlid was already deletedEliad Peller1-0/+5
When wep key was removed after disconnection, sta_hlid was invalid, and it resulted in a fw crash. Signed-off-by: Eliad Peller <[email protected]> Signed-off-by: Luciano Coelho <[email protected]>
2011-08-22wl12xx: use ap_bcast_hlid for recorded keysEliad Peller1-1/+6
when the key was recorded, wl->ap_bcast_hlid was invalid (since the role wasn't started), so when configuring the key we need to use the current ap_bcast_hlid. Signed-off-by: Eliad Peller <[email protected]> Signed-off-by: Luciano Coelho <[email protected]>
2011-08-22wl12xx: AP-mode - configure HT rate support to the FWArik Nemtsov2-0/+8
Unconditionally configure HT rate support to the FW on all ACs when starting the AP. When 11n support is disabled by usermode (hostapd), each STA joining the AP will appear as a non-HT STA. This will stop us from accidentally transmitting using MCS rates. Signed-off-by: Arik Nemtsov <[email protected]> Signed-off-by: Eliad Peller <[email protected]> Signed-off-by: Luciano Coelho <[email protected]>
2011-08-22wl12xx: AP-mode - configure STA HT rates on joinArik Nemtsov1-2/+8
When a new STA joins the BSS, configure the HT rates it supports to the FW. Signed-off-by: Arik Nemtsov <[email protected]> Signed-off-by: Eliad Peller <[email protected]> Signed-off-by: Luciano Coelho <[email protected]>
2011-08-22wl12xx: AP-mode - set STA HT capabilities when adding a STAArik Nemtsov3-12/+34
In addition, set global HT operation mode via ACX_HT_BSS_OPERATION when a change is detected by usermode Signed-off-by: Arik Nemtsov <[email protected]> Signed-off-by: Eliad Peller <[email protected]> Signed-off-by: Luciano Coelho <[email protected]>
2011-08-22wl12xx: support IBSS vif typeEliad Peller4-7/+39
Start IBSS role when the interface type is IBSS. As with sta role, use the dev role until the role is started. Signed-off-by: Eliad Peller <[email protected]> Signed-off-by: Luciano Coelho <[email protected]>
2011-08-22wl12xx: add wl12xx_cmd_role_start_ibss()Eliad Peller2-0/+63
Add wl12xx_cmd_role_start_ibss() implementation and defintion. This function is used in order to start the IBSS role. Stopping the IBSS is done by using the same api as stop STA, so there is no need for a separate function. Signed-off-by: Eliad Peller <[email protected]> Signed-off-by: Luciano Coelho <[email protected]>
2011-08-22wl12xx: don't remove key if hlid was already deletedEliad Peller1-0/+4
If hlid was already removed, there is no need to remove its key (it might cause a fw crash, as the key is invalid). Signed-off-by: Eliad Peller <[email protected]> Signed-off-by: Luciano Coelho <[email protected]>
2011-08-22wl12xx: call wl12xx_cmd_set_peer_state() in AP modeEliad Peller3-5/+9
After adding a station, call wl12xx_cmd_set_peer_state(). This is required for 11n support. Change wl12xx_cmd_set_peer_state() prototype to get hlid as param. Signed-off-by: Eliad Peller <[email protected]> Signed-off-by: Luciano Coelho <[email protected]>
2011-08-22wl12xx: re-enable block ack session supportArik Nemtsov7-170/+177
Incorporate interface changes for HT support. Add ba_bitmap field to the wl1271_link struct, to indicate activate RX BA sessions (for AP mode). Signed-off-by: Arik Nemtsov <[email protected]> Signed-off-by: Eliad Peller <[email protected]> Signed-off-by: Luciano Coelho <[email protected]>
2011-08-22wl12xx: use dynamic hlids for AP-modeArik Nemtsov4-20/+46
Using hlid=0 in AP mode is a bug. Dynamically allocate HLIDs. Set the "first sta hlid" as 3. This will have to be changed when multiple vifs will be supported. Signed-off-by: Arik Nemtsov <[email protected]> Signed-off-by: Eliad Peller <[email protected]> Signed-off-by: Luciano Coelho <[email protected]>
2011-08-22wl12xx: fix session counterArik Nemtsov2-6/+12
Increment the session counter on every wl12xx_cmd_role_start_sta() command. Signed-off-by: Arik Nemtsov <[email protected]> Signed-off-by: Eliad Peller <[email protected]> Signed-off-by: Luciano Coelho <[email protected]>
2011-08-22wl12xx: update BT coex configuration paramsEliad Peller5-367/+177
The BT coex params api have been changed. Update it, and init coex for both sta and ap. Signed-off-by: Eliad Peller <[email protected]> Signed-off-by: Luciano Coelho <[email protected]>
2011-08-22wl12xx: replace dummy_join with ROC/CROC commandsEliad Peller6-38/+182
The ROC command asks the fw stay on the channel of the given hlid. it currently has 2 primary functions: 1. Allow tx/rx from the device role. In order to tx/rx packets while the stations is not associated (e.g. auth req/resp), the device role has to be used, along with ROC on its link. Keep the logic similiar to the one used in dummy_join. However, since we can't scan while we ROC, we add CROC before starting a scan, and ROC again (if needed) on scan complete. 2. Keeping the antenna for a specific link. We ROC until the connection was completed (after EAPOLs exchange) in order to prevent BT coex operations from taking the antenna and failing the connection (after this stage, psm can be used). During association, we ROC on the station role, and then CROC the device role, thus assuring being ROC during all the connection process. Delete the WL1271_FLAG_JOINED flag, and use a roc bitmap to indicate what roles are currently ROCed. Add wl12xx_roc/croc functions in order to wrap the roc/croc commands while taking care of the roc bitmap. The current ROC/CROC state-machine is a bit complicated. In the future we'll probably want to use wpa_supplicant to control the ROC during connection. Signed-off-by: Eliad Peller <[email protected]> Signed-off-by: Luciano Coelho <[email protected]>
2011-08-22wl12xx: handle dummy packet event also in ap modeArik Nemtsov2-5/+9
Allow handling of DUMMY_PACKET_EVENT_ID also in ap mode. Signed-off-by: Arik Nemtsov <[email protected]> Signed-off-by: Eliad Peller <[email protected]> Signed-off-by: Luciano Coelho <[email protected]>
2011-08-22wl12xx: add ROC/CROC commandsEliad Peller2-0/+89
Add structs and functions to support the ROC/CROC commands. Signed-off-by: Eliad Peller <[email protected]> Signed-off-by: Luciano Coelho <[email protected]>
2011-08-22wl12xx: add system_hlidEliad Peller4-17/+36
system_hlid is a const hlid (always 0), used by the fw and driver for packets which are not bound to specific role (e.g. dynamic memory packets). indicate it as always allocated. Signed-off-by: Eliad Peller <[email protected]> Signed-off-by: Luciano Coelho <[email protected]>
2011-08-22wl12xx: add set_rate_mgmt_params acxEliad Peller5-0/+112
Configure rate management parameters on hw init Signed-off-by: Eliad Peller <[email protected]> Signed-off-by: Luciano Coelho <[email protected]>
2011-08-22wl12xx: use wl1271_acx_beacon_filter_opt for both sta and apEliad Peller4-37/+3
Use ACX_BEACON_FILTER_OPT for both station and ap roles (use the generic wl1271_acx_beacon_filter_opt() instead of wl1271_acx_set_ap_beacon_filter() ). Signed-off-by: Eliad Peller <[email protected]> Signed-off-by: Luciano Coelho <[email protected]>
2011-08-22wl12xx: change max/default template sizeEliad Peller4-38/+10
The max template size was increased in the new fw. However, we should use the max size only when needed, as it consumes some of the chip's memory. Thus, by default initialize the templates to the default size. Initialize to the maximum size only when required. Use WL1271_CMD_TEMPL_DFLT_SIZE instead of some of the predefined structs, as some of them didn't account for additional IEs that might be added to the template. Delete structs defintions not used after these changes. Signed-off-by: Eliad Peller <[email protected]> Signed-off-by: Luciano Coelho <[email protected]>
2011-08-22wl12xx: update rx/txEliad Peller4-20/+18
Update the rx/tx descriptors according to the new fw api (fw >= 6/7.3.0.0.75) Signed-off-by: Eliad Peller <[email protected]> Signed-off-by: Luciano Coelho <[email protected]>
2011-08-22wl12xx: update scan cmd apiEliad Peller2-10/+23
Update the scan command to use the new fw api (fw 6/7.3.0.0.75). Signed-off-by: Eliad Peller <[email protected]> Signed-off-by: Luciano Coelho <[email protected]>
2011-08-22wl12xx: add device role commandsEliad Peller3-1/+116
The device role is a special role used for rx and tx frames prior to association (as the STA role can get packets only from its associated bssid) Since this role is required for the sta association process, we enable it when a new sta interface is created. Signed-off-by: Eliad Peller <[email protected]> Signed-off-by: Luciano Coelho <[email protected]>
2011-08-22wl12xx: enable/disable role on interface add/removeEliad Peller1-0/+41
According to the new multi-role flow, we have to enable the role before using (starting) it, and disable it on cleanup (after it's no longer needed). Signed-off-by: Eliad Peller <[email protected]> Signed-off-by: Luciano Coelho <[email protected]>
2011-08-22wl12xx: update commands & eventsEliad Peller9-445/+527
Change the commands and events according to the new fw api (fw >= 6/7.3.0.0.75). The main change is the replacement of JOIN/DISCONNECT commands, with ROLE_START/ROLE_STOP commands. The use of these commands should be preceded by the ROLE_ENABLE command (allocating role resources), and followed by the ROLE_DISABLE command (freeing role resources). Signed-off-by: Eliad Peller <[email protected]> Signed-off-by: Luciano Coelho <[email protected]>
2011-08-22wl12xx: update acx commandsEliad Peller5-130/+138
Update the acx commands according to the new fw api (fw >= 6/7.3.0.0.75). The main change in most of the ACXs is the addition of a new role_id/link_id field, which is required for multi-role operation. Currently, we don't really support multi-role, as most of our data (inside wl) is global. As the current fw doesn't support concurrent roles yet, keep it this way and add wl->role_id and wl->sta_hlid to save the active role/link. Signed-off-by: Eliad Peller <[email protected]> Signed-off-by: Luciano Coelho <[email protected]>
2011-08-22wl12xx: update fw status structEliad Peller5-94/+68
Update the fw status struct according to the new fw api (fw >= 6/7.0.0.35). All the roles use the same struct now. The memory accounting was changed a bit according to the struct changes. Signed-off-by: Eliad Peller <[email protected]> Signed-off-by: Luciano Coelho <[email protected]>
2011-08-22wl12xx: remove rx filtering stuffEliad Peller14-339/+8
The new fw doesn't support rx_filtering configuration (as a stand-alone command. the rx filtering is done automatically according to the active role). Signed-off-by: Eliad Peller <[email protected]> Signed-off-by: Luciano Coelho <[email protected]>
2011-08-22wl12xx: temporarily disable advanced ap functionsEliad Peller2-0/+8
In order to keep to driver compiling during the patchset, while avoiding one-huge-patch, temporarily disable some advanced ap functions. These changes will be reverted later in the patchset, as part of the patches for advanced ap functions support. Signed-off-by: Eliad Peller <[email protected]> Signed-off-by: Luciano Coelho <[email protected]>
2011-08-22wl12xx: use 1 spare block in all casesArik Nemtsov3-21/+2
Remove support for firmwares that require 2 spare blocks for packet TX (and delete the WL12XX_QUIRK_USE_2_SPARE_BLOCKS quirk definition) Signed-off-by: Arik Nemtsov <[email protected]> Signed-off-by: Eliad Peller <[email protected]> Signed-off-by: Luciano Coelho <[email protected]>
2011-08-22wl12xx: Use a single fw for both STA and AP rolesArik Nemtsov4-37/+9
Firmware >= 6/7.3.0.0.75 (wl127x/wl128x) supports both STA and AP roles. Signed-off-by: Arik Nemtsov <[email protected]> Signed-off-by: Eliad Peller <[email protected]> Signed-off-by: Luciano Coelho <[email protected]>
2011-08-22wl12xx: Revert "wl12xx: schedule TX packets according to FW occupancy"Arik Nemtsov4-72/+33
This does not make sense in fw >= 6/7.3.0.0.75 (wl127x/wl128x) - we don't use Tx blocks to measure FW occupancy anymore. This reverts commit 9e374a37b6fa2310b71d3c5657cd0c1e693120c6. Signed-off-by: Arik Nemtsov <[email protected]> Signed-off-by: Eliad Peller <[email protected]> Signed-off-by: Luciano Coelho <[email protected]>
2011-08-12wl12xx: fixes for hw_pg_ver and chip id reportingGery Kahn3-7/+21
Fix the value of PG version for 128x at sysfs, remove write permissions from PG version (hw_pg_ver) in sysfs and add remove files (hw_pg_ver,bt_coex_state) from sysfs while freeing hardware. New macro names for register Fuse_data_2_1 depend on architecture. Propagate chip id through wiphy in PLT mode which still not work of a bug in ethtool. Signed-off-by: Gery Kahn <[email protected]> Signed-off-by: Luciano Coelho <[email protected]>
2011-08-12wl12xx: Add support to RX packets payload alignmentShahar Levi2-11/+36
In case of QoS packets the packet payload isn't aligned to 4 bytes. In that case the mac80211 layer take care of that via memmove() in ieee80211_deliver_skb(). Add support of copy packets from aggregation buffer to the skbs with packet payload aligned care. In case of QoS packets copy the packets in offset of 2 bytes guarantee payload aligned to 4 bytes. Signed-off-by: Shahar Levi <[email protected]> Signed-off-by: Luciano Coelho <[email protected]>
2011-08-11nl80211/cfg80211: Make addition of new sinfo fields saferJouni Malinen3-0/+7
Add a comment pointing out the use of enum station_info_flags for all new struct station_info fields. In addition, memset the sinfo buffer to zero before use on all paths in the current tree to avoid leaving uninitialized pointers in the data. Signed-off-by: Jouni Malinen <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-08-11cfg80211: fix a crash in nl80211_send_stationFelix Fietkau2-2/+4
mac80211 leaves sinfo->assoc_req_ies uninitialized, causing a random pointer memory access in nl80211_send_station. Instead of checking if the pointer is null, use sinfo->filled, like the rest of the fields. Signed-off-by: Felix Fietkau <[email protected]> Signed-off-by: John W. Linville <[email protected]>