Commit graph

454977 commits

Author SHA1 Message Date
Vladimir Kondratiev d5b1c32f51 wil6210: BACK: track last dropped SSN
Track and print on debugfs

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-06-19 15:49:24 -04:00
Vladimir Kondratiev 94b7b64c73 wil6210: Allow driver load if FW not ready
Usable for debugging, to be able to obtain FW traces

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-06-19 15:49:24 -04:00
Vladimir Kondratiev 7c0acf868d wil6210: Tx performance monitoring
For performance monitoring, trace time intervals when Tx vring
is idle/not idle. Use CPU cycle counter for this, because jiffies is
too rough, and other precise time measurement methods involve
overhead while get_cycles() should be fast.
This used to provide some estimation for percentage when Tx vring
was idle, i.e. when hardware is under-utilized.
Estimation is not precise because of many reasons - CPU frequency scaling,
grt_cycles() may be per core etc. But still, it is good estimation

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-06-19 15:49:24 -04:00
Vladimir Kondratiev 67c3e1b41e wil6210: more debug info for vring
print used/available counters on debugfs;
print to dmesg when Tx vring becomes empty

This aids with performance investigation

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-06-19 15:49:24 -04:00
Vladimir Kondratiev 8eea944af0 wil6210: print more info about BSS found
print essential info to dmesg

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-06-19 15:49:24 -04:00
Vladimir Kondratiev 3de6cf204d wil6210: trace wil->status on debugfs
For debug purposes

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-06-19 15:49:23 -04:00
Vladimir Kondratiev ca959773f0 wil6210: print debug info when starting AP
In the wil_cfg80211_start_ap(), debug print selected data:
- beacon (before and after fix-up)
- crypto parameters
- mark start/stop AP invocation

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-06-19 15:49:23 -04:00
Vladimir Kondratiev 304464f482 wil6210: indicate mgmt_tx status
Inform cfg80211 about Tx result

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-06-19 15:49:23 -04:00
Vladimir Kondratiev 0b39aaf2f2 wil6210: Tx mgmt frame from debugfs
Provide 2 files on the debugfs:
- "rxon": write channel (1..4) to open Rx on it, 0 to rxoff
- "tx_mgmt": write binary frame, starting from MAC header

one need to care about turning receiver on/off before/after tx_mgmt

Correct sequence is:
 echo $channel > rxon
 cat mfmt_frame > tx_mgmt
 echo 0 > rxon

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-06-19 15:49:23 -04:00
Jahnavi Meher e8c58e7a5a rsi: Changes for 40MHz
Added code required for 40MHz.

Signed-off-by: Jahnavi Meher <jahnavi.meher@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-06-19 15:49:23 -04:00
Jahnavi Meher 686a254177 rsi: Adding support for host based bgscan.
Added support for host based bgscan. The h/w queues are blocked
while bgscan is being performed and after coming to the connected
channel, the queues are unblocked.

Signed-off-by: Jahnavi Meher <jahnavi.meher@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-06-19 15:49:23 -04:00
Jahnavi Meher 85af5bf829 rsi: Adding support for 5GHz
Adding support for 5GHz.

Signed-off-by: Jahnavi Meher <jahnavi.meher@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-06-19 15:49:23 -04:00
Jahnavi Meher 7b748dc0ed rsi: Sending QoS null packet via the mgmt queue.
Send the QoS null packet via mgmt queue.

Signed-off-by: Jahnavi Meher <jahnavi.meher@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-06-19 15:49:22 -04:00
Jahnavi Meher 258587f913 rsi: Added debug messages.
Added some debug messages.

Signed-off-by: Jahnavi Meher <jahnavi.meher@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-06-19 15:49:22 -04:00
Jahnavi Meher 360accb0db rsi: Changed the logic of dequeuing packets from hal queues.
The number of packets being dequeued from s/w queues was fixed -
changed it to a dynamic calculation based on txop. There are also
some fixes to the dequeuing algorithm.

Signed-off-by: Jahnavi Meher <jahnavi.meher@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-06-19 15:49:22 -04:00
Jahnavi Meher f75d3419ec rsi: Changed the SDIO interrupt variables and some clean up.
Changed the SDIO interrupt variables and some clean ups.

Signed-off-by: Jahnavi Meher <jahnavi.meher@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-06-19 15:49:22 -04:00
Jahnavi Meher 2bfa6969d9 rsi: Use SGI if configured for fixed rate transmission.
Use SGI if configured while sending data packets at a fixed rate.

Signed-off-by: Jahnavi Meher <jahnavi.meher@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-06-19 15:49:22 -04:00
Jahnavi Meher be876b299e rsi: Lower level debug messages and changed handling of confirm received for rsi_program_bb_rf().
Lower level debug messages for some frames and changed confirm
received for rsi_program_bb_rf() to a valid case.

Signed-off-by: Jahnavi Meher <jahnavi.meher@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-06-19 15:49:22 -04:00
Jahnavi Meher 0d59f5267d rsi: Changed rate handling.
Changed rate handling.

Signed-off-by: Jahnavi Meher <jahnavi.meher@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-06-19 15:49:22 -04:00
Jahnavi Meher 8701d03128 rsi: Changed the rsi_set_channel() and rsi_program_bb_rf().
Made required changes to rsi_set_channel() and rsi_program_bb_rf()
functions.

Signed-off-by: Jahnavi Meher <jahnavi.meher@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-06-19 15:49:21 -04:00
Jahnavi Meher 4550faac36 rsi: Changed the radio caps frame.
Changed the radio caps frame and added the required fields.

Signed-off-by: Jahnavi Meher <jahnavi.meher@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-06-19 15:49:21 -04:00
Jahnavi Meher f870a340f1 rsi: Add macros for endpoints and set default value of endpoint.
Added macros for the endpoints and set the default value of endpoint
to 2.4GHz and 20MHz.

Signed-off-by: Jahnavi Meher <jahnavi.meher@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-06-19 15:49:21 -04:00
Jahnavi Meher aabd3ad41a rsi: Using band from rsi_common to fill in ieee80211_rx_status
Filling in band from common->band.

Signed-off-by: Jahnavi Meher <jahnavi.meher@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-06-19 15:49:21 -04:00
Jahnavi Meher 19d2e619e7 rsi: Fixed the kernel doc
Changed the function header to match the function name.

Signed-off-by: Jahnavi Meher <jahnavi.meher@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-06-19 15:49:21 -04:00
Jahnavi Meher 51b4a86abd rsi: Mapping the debugfs stats to the correct s/w queues.
Changed the queue numbers to macros, and corrected the mappings.

Signed-off-by: Jahnavi Meher <jahnavi.meher@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-06-19 15:49:21 -04:00
Joe Perches df6e633323 rt2x00: Use dma_zalloc_coherent
Use the zeroing function instead of dma_alloc_coherent & memset(,0,)

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-06-19 15:49:21 -04:00
Rajkumar Manoharan a4068323d5 ath9k: Advertise multichannel support
Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-06-19 15:49:20 -04:00
Rajkumar Manoharan 3ad9c3861a ath9k: use separate HW queue for each channel context
Use seperate tx queue for each AC in each channel context and expose
these information to mac80211 to avoid stopping one channel context
leads to stopping the entire traffic for that AC even on other contexts.

Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-06-19 15:49:20 -04:00
Felix Fietkau 42eda11558 ath9k: Add recovery mechanism for hw TSF timer
Configure the TSF based hardware timer for a channel switch.
Also set up backup software timer, in case the gen timer fails.
This could be caused by a hardware reset.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-06-19 15:49:20 -04:00
Felix Fietkau a899b678d9 ath9k: Update channel switch timer
TSF time might have been updated by the incoming beacon,
need update the channel switch timer to reflect the change.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-06-19 15:49:20 -04:00
Felix Fietkau ec70abe1f6 ath9k: Handle beacon miss on multi channel context
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-06-19 15:49:20 -04:00
Felix Fietkau 7414863ed3 ath9k: Add periodic NoA support
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-06-19 15:49:20 -04:00
Felix Fietkau 73fa2f26d3 ath9k: Add multi-channel scheduling support
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-06-19 15:49:20 -04:00
Felix Fietkau 6036c28456 ath9k: Implement mgd_prepare_tx
Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-06-19 15:49:19 -04:00
Felix Fietkau 58b5737528 ath9k: Adjust AP beacon tsf based on station context
In multi channel context (AP + STA case), adjust the TSF time of
the AP chanctx to keep its beacons at half beacon interval offset
relative to the STA chanctx.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-06-19 15:49:19 -04:00
Felix Fietkau 8eab25108e ath9k: switch channel after sending beacon
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-06-19 15:49:19 -04:00
Felix Fietkau 3ae07d39ea ath9k: Add p2p go NoA attribute
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-06-19 15:49:19 -04:00
Rajkumar Manoharan ea6ff2de5c ath9k: Store current offchannel duration
Update current offchannel duration during scan or roc request.

Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-06-19 15:49:19 -04:00
Felix Fietkau 748299f27b ath9k: switch channel context for beaconing
Add a basic state machine for switch channel context
for beacon transmission.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-06-19 15:49:19 -04:00
Rajkumar Manoharan 9a9c4fbc3f ath9k: Summarize hw state per channel context
Group and set hw state (opmode, primary_sta, beacon conf) per
channel context instead of whole list of vifs. This would allow
each channel context to run in different mode (STA/AP).

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-06-19 15:49:18 -04:00
Rajkumar Manoharan ca900ac9d9 ath9k: Move beacon config to channel context
Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-06-19 15:49:18 -04:00
Felix Fietkau 8d7e09dda8 ath9k: save tsf in channel context
Save TSF in channel context for multiple operating channels.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-06-19 15:49:18 -04:00
Felix Fietkau 26f16c246c ath9k: Add ATH_OP_MULTI_CHANNEL
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-06-19 15:49:18 -04:00
Felix Fietkau b01459e856 ath9k: Move caldata into channel context
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-06-19 15:49:18 -04:00
Rajkumar Manoharan c4dc0d040e ath9k: Fetch appropriate operating channel context
Retrieve appropriate operating channel context while switching
between operating and off channels.

Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-06-19 15:49:18 -04:00
Felix Fietkau 3930563570 ath9k: Implement channel context ops
Add channel context operations (add, remove, change, assign and
unassign) to enable support for multiple channels.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-06-19 15:49:17 -04:00
Felix Fietkau 405393cfde ath9k: Implement remain-on-channal support
Add remain on channel support in order to enable multi-channel
concurrency.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-06-19 15:49:17 -04:00
Felix Fietkau 78b2194971 ath9k: Implement hw_scan support
Implement hw_scan support for enabling multi-channel cuncurrency.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-06-19 15:49:17 -04:00
Felix Fietkau c083ce9980 ath9k: send powersave frame on channel switch
While leaving from or entering to active channel context, send out
nullfunc frame to inform to the AP about the presence of station.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-06-19 15:49:17 -04:00
Felix Fietkau befcf7e70e ath9k: channel context based transmission
Force queueing of all frames that belong to a virtual interface on
a different channel context, to ensure that they are sent on the
correct channel.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-06-19 15:49:17 -04:00