Vladimir Kondratiev [Mon, 16 Jun 2014 16:37:16 +0000 (19:37 +0300)]
wil6210: fix disconnect handling for AP
For the AP-like interface, if "disconnect all" requested,
every station should be deleted with cfg80211_del_sta().
Implement this behavior.
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Vladimir Kondratiev [Mon, 16 Jun 2014 16:37:15 +0000 (19:37 +0300)]
wil6210: avoid dmesg pollution by Tx errors
On Tx path, when vring for the destination not found,
it was considered as error and message was printed unconditionally.
However, this situation is normal after disconnect. If disconnect was while
heavy traffic load, lots of Tx packets will be dropped and this would
cause significant amount of prints in dmesg.
Demote messages priority from 'error' to 'debug'.
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Vladimir Kondratiev [Mon, 16 Jun 2014 16:37:14 +0000 (19:37 +0300)]
wil6210: Debug print GRO Rx result
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Vladimir Kondratiev [Mon, 16 Jun 2014 16:37:13 +0000 (19:37 +0300)]
wil6210: add 'freq' and 'link' debugfs entries
Expose operational frequency and link info
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Vladimir Kondratiev [Mon, 16 Jun 2014 16:37:12 +0000 (19:37 +0300)]
wil6210: Use "name = value" format in the debugfs
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Vladimir Kondratiev [Mon, 16 Jun 2014 16:37:11 +0000 (19:37 +0300)]
wil6210: debug print when scan request state changes
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Vladimir Kondratiev [Mon, 16 Jun 2014 16:37:10 +0000 (19:37 +0300)]
wil6210: print error when notifying about FW error
Print to dmesg when FW error notification is about to be sent
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Vladimir Kondratiev [Mon, 16 Jun 2014 16:37:09 +0000 (19:37 +0300)]
wil6210: writeable ITR registers
Interrupt threshold registers may be written to.
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Vladimir Kondratiev [Mon, 16 Jun 2014 16:37:08 +0000 (19:37 +0300)]
wil6210: debugfs interface to send raw WMI command
Debug aid
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Vladimir Kondratiev [Mon, 16 Jun 2014 16:37:07 +0000 (19:37 +0300)]
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>
Vladimir Kondratiev [Mon, 16 Jun 2014 16:37:06 +0000 (19:37 +0300)]
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>
Vladimir Kondratiev [Mon, 16 Jun 2014 16:37:05 +0000 (19:37 +0300)]
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>
Vladimir Kondratiev [Mon, 16 Jun 2014 16:37:04 +0000 (19:37 +0300)]
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>
Vladimir Kondratiev [Mon, 16 Jun 2014 16:37:03 +0000 (19:37 +0300)]
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>
Vladimir Kondratiev [Mon, 16 Jun 2014 16:37:02 +0000 (19:37 +0300)]
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>
Vladimir Kondratiev [Mon, 16 Jun 2014 16:37:01 +0000 (19:37 +0300)]
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>
Vladimir Kondratiev [Mon, 16 Jun 2014 16:37:00 +0000 (19:37 +0300)]
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>
Vladimir Kondratiev [Mon, 16 Jun 2014 16:36:59 +0000 (19:36 +0300)]
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>
Jahnavi Meher [Mon, 16 Jun 2014 14:17:03 +0000 (19:47 +0530)]
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>
Jahnavi Meher [Mon, 16 Jun 2014 14:16:48 +0000 (19:46 +0530)]
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>
Jahnavi Meher [Mon, 16 Jun 2014 14:16:31 +0000 (19:46 +0530)]
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>
Jahnavi Meher [Mon, 16 Jun 2014 14:16:13 +0000 (19:46 +0530)]
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>
Jahnavi Meher [Mon, 16 Jun 2014 14:15:45 +0000 (19:45 +0530)]
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>
Jahnavi Meher [Mon, 16 Jun 2014 14:15:03 +0000 (19:45 +0530)]
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>
Jahnavi Meher [Mon, 16 Jun 2014 14:14:12 +0000 (19:44 +0530)]
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>
Jahnavi Meher [Mon, 16 Jun 2014 14:13:54 +0000 (19:43 +0530)]
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>
Jahnavi Meher [Mon, 16 Jun 2014 14:13:35 +0000 (19:43 +0530)]
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>
Jahnavi Meher [Mon, 16 Jun 2014 14:13:09 +0000 (19:43 +0530)]
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>
Jahnavi Meher [Mon, 16 Jun 2014 14:11:58 +0000 (19:41 +0530)]
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>
Jahnavi Meher [Mon, 16 Jun 2014 14:11:41 +0000 (19:41 +0530)]
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>
Jahnavi Meher [Mon, 16 Jun 2014 14:11:22 +0000 (19:41 +0530)]
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>
Jahnavi Meher [Mon, 16 Jun 2014 14:10:55 +0000 (19:40 +0530)]
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>
Jahnavi Meher [Mon, 16 Jun 2014 14:10:02 +0000 (19:40 +0530)]
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>
Jahnavi Meher [Mon, 16 Jun 2014 14:09:40 +0000 (19:39 +0530)]
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>
Joe Perches [Sun, 15 Jun 2014 20:37:43 +0000 (13:37 -0700)]
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>
Rajkumar Manoharan [Wed, 11 Jun 2014 10:48:16 +0000 (16:18 +0530)]
ath9k: Advertise multichannel support
Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rajkumar Manoharan [Wed, 11 Jun 2014 10:48:15 +0000 (16:18 +0530)]
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>
Felix Fietkau [Wed, 11 Jun 2014 10:48:14 +0000 (16:18 +0530)]
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>
Felix Fietkau [Wed, 11 Jun 2014 10:48:13 +0000 (16:18 +0530)]
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>
Felix Fietkau [Wed, 11 Jun 2014 10:48:12 +0000 (16:18 +0530)]
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>
Felix Fietkau [Wed, 11 Jun 2014 10:48:11 +0000 (16:18 +0530)]
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>
Felix Fietkau [Wed, 11 Jun 2014 10:48:10 +0000 (16:18 +0530)]
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>
Felix Fietkau [Wed, 11 Jun 2014 10:48:09 +0000 (16:18 +0530)]
ath9k: Implement mgd_prepare_tx
Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Wed, 11 Jun 2014 10:48:08 +0000 (16:18 +0530)]
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>
Felix Fietkau [Wed, 11 Jun 2014 10:48:07 +0000 (16:18 +0530)]
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>
Felix Fietkau [Wed, 11 Jun 2014 10:48:06 +0000 (16:18 +0530)]
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>
Rajkumar Manoharan [Wed, 11 Jun 2014 10:48:05 +0000 (16:18 +0530)]
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>
Felix Fietkau [Wed, 11 Jun 2014 10:48:04 +0000 (16:18 +0530)]
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>
Rajkumar Manoharan [Wed, 11 Jun 2014 10:48:03 +0000 (16:18 +0530)]
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>
Rajkumar Manoharan [Wed, 11 Jun 2014 10:48:02 +0000 (16:18 +0530)]
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>
Felix Fietkau [Wed, 11 Jun 2014 10:48:01 +0000 (16:18 +0530)]
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>
Felix Fietkau [Wed, 11 Jun 2014 10:48:00 +0000 (16:18 +0530)]
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>
Felix Fietkau [Wed, 11 Jun 2014 10:47:59 +0000 (16:17 +0530)]
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>
Rajkumar Manoharan [Wed, 11 Jun 2014 10:47:58 +0000 (16:17 +0530)]
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>
Felix Fietkau [Wed, 11 Jun 2014 10:47:57 +0000 (16:17 +0530)]
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>
Felix Fietkau [Wed, 11 Jun 2014 10:47:56 +0000 (16:17 +0530)]
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>
Felix Fietkau [Wed, 11 Jun 2014 10:47:55 +0000 (16:17 +0530)]
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>
Felix Fietkau [Wed, 11 Jun 2014 10:47:54 +0000 (16:17 +0530)]
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>
Felix Fietkau [Wed, 11 Jun 2014 10:47:53 +0000 (16:17 +0530)]
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>
Felix Fietkau [Wed, 11 Jun 2014 10:47:52 +0000 (16:17 +0530)]
ath9k: Add channel context worker thread
The channel context worker is used to switch to next requested
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>
Felix Fietkau [Wed, 11 Jun 2014 10:47:51 +0000 (16:17 +0530)]
ath9k: Move acq to channel context
Add support to maintain per-channel ACs list.
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>
Felix Fietkau [Wed, 11 Jun 2014 10:47:50 +0000 (16:17 +0530)]
ath9k: Move txpower limit to 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>
Felix Fietkau [Wed, 11 Jun 2014 10:47:49 +0000 (16:17 +0530)]
ath9k: Add channel context structure
The channel context structure is defined to enable
multi-channel concurrency 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>
Kees Cook [Tue, 10 Jun 2014 17:37:24 +0000 (10:37 -0700)]
rtlwifi: btcoexist: avoid format string in printk
Since CL_PRINTF only ever takes a single argument, make sure a format
string cannot leak into printk.
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Alexey Khoroshilov [Sat, 7 Jun 2014 03:18:31 +0000 (07:18 +0400)]
rsi_91x_sdio: add error handling into rsi_module_init()
Fix rsi_module_init() to propagate sdio_register_driver() errors.
Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Alexey Khoroshilov [Sat, 7 Jun 2014 03:18:30 +0000 (07:18 +0400)]
rsi: Use module_usb_driver
module_usb_driver eliminates the boilerplate and makes the code simpler,
in addition to the fact currently rsi_module_init() ignores usb_deregister() error.
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Bing Zhao [Sat, 7 Jun 2014 02:47:44 +0000 (19:47 -0700)]
mwifiex: wowlan: do not disconnect on suspend
For users who do not need wowlan, load mwifiex.ko with
disconnect_on_suspend = 1; or iw phy0 wowlan disable.
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Zhiyuan Yang [Sat, 7 Jun 2014 02:47:42 +0000 (19:47 -0700)]
mwifiex: support wowlan magic-packet encapsulated as UDP packet
When magic-packet is generated as a UDP packet the offset should
be 20+8 more bytes to cover IPv4 header and UDP header. So the
total offset become 56.
Add a new MEF entry to support both magic-packet patterns
generated by different tools.
Cc: Andreas Fenkart <afenkart@gmail.com>
Signed-off-by: Zhiyuan Yang <yangzy@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Thu, 5 Jun 2014 18:20:44 +0000 (20:20 +0200)]
bcma: gpio: register all 32 GPIOs on BCM53572
I've here a device detected as:
bcma: bus0: Found chip with id 0xD144, rev 0x01 and package 0x08
I couldn't find GPIO handling hw button until trying GPIO 20. It seems
BCM53572 also has 32 GPIOs.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Stanislaw Gruszka [Thu, 5 Jun 2014 11:52:27 +0000 (13:52 +0200)]
rt2x00: do not initialize BCN_OFFSET registers
We setup BCN_OFFSET{0,1} registers dynamically, don't have to
initialize them.
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Stanislaw Gruszka [Thu, 5 Jun 2014 11:52:26 +0000 (13:52 +0200)]
rt2x00: change order when stop beaconing
When no beaconing is needed, first stop beacon queue (disable beaconing
globally) to avoid possible sending of not prepared beacon on short
period after clearing beacon and before stop of BCN queue.
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Stanislaw Gruszka [Thu, 5 Jun 2014 11:52:25 +0000 (13:52 +0200)]
rt2x00: change default MAC_BSSID_DW1_BSS_BCN_NUM
We setup MAC_BSSID_DW1_BSS_BCN_NUM dynamically when numbers of active
beacons increase. Change default to 0 to tell hardware that we want to
send only one beacon as default.
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Stanislaw Gruszka [Thu, 5 Jun 2014 11:52:24 +0000 (13:52 +0200)]
rt2x00: change beaconing setup on RT2800
As reported by Matthias, on 5572 chip, even if we clear up TXWI
of corresponding beacon, hardware still try to send it or do other
action that increase power consumption peak up to 1A.
To avoid the issue, setup beaconing dynamically by configuring offsets
of currently active beacons and MAC_BSSID_DW1_BSS_BCN_NUM variable,
which limit number of beacons that hardware will try to send.
Reported-by: Matthias Fend <Matthias.Fend@wolfvision.net>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Stanislaw Gruszka [Thu, 5 Jun 2014 11:52:23 +0000 (13:52 +0200)]
rt2x00: change beaconing locking
This patch is needed for further changes to keep global variables
consistent when changing beaconing on diffrent vif's.
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Markus Pargmann [Wed, 4 Jun 2014 13:32:32 +0000 (15:32 +0200)]
mwifiex: Remove custom world regulatory domain
A custom regulatory domain was introduced in this commit:
cc0ba0d mwifiex: support custom world regulatory domain
The commit description says that it was introduced because the world
regulatory domain does not include channels 52-64 and 100-140. These
channels are described in the world regulatory domain now, so we can
drop this custom regulatory domain.
Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Acked-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rickard Strandqvist [Sun, 1 Jun 2014 20:14:38 +0000 (22:14 +0200)]
net: wireless: rtlwifi: rtl8192de: phy.c: Cleaning up uninitialized variable
There is a risk that the variables will be used without being initialized.
Have also moved variable to the part of the code where it is used.
This was largely found by using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rickard Strandqvist [Sun, 1 Jun 2014 12:44:13 +0000 (14:44 +0200)]
net: wireless: rt2x00: rt2x00mac.c: Cleaning up uninitialized variables
There is a risk that the variable will be used without being initialized.
This was largely found by using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rickard Strandqvist [Sun, 1 Jun 2014 12:39:20 +0000 (14:39 +0200)]
net: wireless: libertas: cmd.c: Cleaning up uninitialized variables
There is a risk that the variable will be used without being initialized.
This was largely found by using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Sat, 31 May 2014 18:49:41 +0000 (20:49 +0200)]
b43: PHY: drop channel_type (we can get this info from chandef)
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Sat, 31 May 2014 18:49:40 +0000 (20:49 +0200)]
b43: PHY: drop is_40mhz (get width info from chandef)
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Sat, 31 May 2014 18:49:39 +0000 (20:49 +0200)]
b43: PHY: drop own channel_freq (get it from chandef when needed)
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Sat, 31 May 2014 18:49:38 +0000 (20:49 +0200)]
b43: store current channel using struct cfg80211_chan_def
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Sat, 31 May 2014 18:49:37 +0000 (20:49 +0200)]
b43: b43_op_config: set channel info before switching band
Band switching code needs to know what channel we switch to.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Sat, 31 May 2014 18:49:36 +0000 (20:49 +0200)]
b43: PHY: don't force default channel during init
PHY may need to be re-initialized during runtime (e.g. on band switch).
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Sat, 31 May 2014 18:49:35 +0000 (20:49 +0200)]
b43: b43_op_config: use IEEE80211_CONF_CHANGE_CHANNEL
This is tiny optimization and grouping band/channel ops.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Sat, 31 May 2014 18:49:34 +0000 (20:49 +0200)]
b43: b43_op_config: drop check for core change
There aren't devices with multiple 802.11 cores supported by b43.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Sat, 31 May 2014 18:49:33 +0000 (20:49 +0200)]
b43: drop B43_DEFAULT_CHANNEL
It was never used, b43_switch_channel is always called with hw_value
(from mac80211) or whatever get_default_chan returns.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Andrea Merello [Sat, 31 May 2014 16:30:26 +0000 (18:30 +0200)]
rtl818x_pci: fix possible RX descriptor invalid data read
RX descriptor data must be read only if the descriptor has been fully
updated by HW.
There is a "ownership" flag in the descriptor itself to test this.
The driver code contains a read for the "ownership" flag and, after
it, other read access for descriptor data.
This is in DMA coherent memory, that is _not_ guaranteed to be immune
to instruction reordering, thus it is possible that the descriptor
data is read _before_ the "ownership" flag.
This can theoretically lead to a DMA/CPU race that may end up with the
driver reading the data when it is still not valid, and the "ownership"
bit just after enough time that the HW make the whole descriptor valid.
The driver will in this case believe the data is valid, but it will use
the invalid data read earlier.
In order to avoid this, this patch adds a rmb() to force the "ownership"
bit read to be issued before other descriptor data reads are attempted.
Signed-off-by: Andrea Merello <andrea.merello@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Andrea Merello [Sat, 31 May 2014 16:30:13 +0000 (18:30 +0200)]
rtl818x_pci: provide dBm signal information for rtl8185
This patch makes the driver report signal information for rtl8185
boards using dBm instead of unspecified unit.
Rtl8180 remains untouched.
I did some tests to confirm the correctness of the measure performed
by the board and it seems reasonably correct.
The test setup has been made by connecting an AP with coax and
RF attenuators to the card antenna port.
In order to get a reference measure I tried with several cards with
different chipset I own. I found that many gave different results, and
I finally selected two cards that gave me consistent results to use
as reference: AR9271 and Prism54-usb (isl3887 with Frisbee radio).
Using this references I compared the RSSI information with my rtl8185
and I repeated tests with three different attenuation values, increasing
attenuation by 10dB each step.
I made only relative measures, making NO assumption about source power.
CCK measures seem very close to my references, OFDM are a little bit
less precise but, considering that these cards are not measuring
instrumentation, IMHO this is still fairly good.
CCK measures (1Mbps beacons)
ATTENUATOR 1
p54usb: -58dBm
ath9k_htc: -59dBm
rtl8185: -59dBm
ATTENUATOR 2
p54usb: -67dBm
ath9k_htc: -68dBm
rtl8185: -70dBm
ATTENUATOR 3
p54usb: -78dBm
ath9k_htc: -79dBm
rtl8185: -79dBm
OFDM measures (54Mbps ping)
ATTENUATOR 1
p54usb: -58dBm
ath9k_htc: -57dBm
rtl8185: -62dBm
ATTENUATOR 2
p54usb: -68dBm
rtl8185: -71dBm
Signed-off-by: Andrea Merello <andrea.merello@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Andrea Merello [Sat, 31 May 2014 16:29:46 +0000 (18:29 +0200)]
rtl818x_pci: make RSSI code more readable
remove the if-else chains and use switch-case to make code more
readable and avoiding long lines that broke in several lines
Signed-off-by: Andrea Merello <andrea.merello@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Peter Senna Tschudin [Sat, 31 May 2014 16:12:26 +0000 (13:12 -0300)]
cw1200: Remove useless return variables
This patch remove variables that are initialized with a constant,
are never updated, and are only used as parameter of return.
Return the constant instead of using a variable.
Verified by compilation only.
The coccinelle script that find and fixes this issue is:
// <smpl>
@@
type T;
constant C;
identifier ret;
@@
- T ret = C;
... when != ret
when strict
return
- ret
+ C
;
// </smpl>
Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Peter Senna Tschudin [Sat, 31 May 2014 13:14:06 +0000 (10:14 -0300)]
net: wireless: Remove useless return variables
This patch remove variables that are initialized with a constant,
are never updated, and are only used as parameter of return.
Return the constant instead of using a variable.
wl_cfg80211.c verified by compilation only.
phy/phy_cmn.c unverified.
The coccinelle script that find and fixes this issue is:
// <smpl>
@@
type T;
constant C;
identifier ret;
@@
- T ret = C;
... when != ret
when strict
return
- ret
+ C
;
// </smpl>
Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Linus Torvalds [Mon, 16 Jun 2014 03:45:28 +0000 (17:45 -1000)]
Linux 3.16-rc1
Linus Torvalds [Mon, 16 Jun 2014 02:37:03 +0000 (16:37 -1000)]
Merge git://git./linux/kernel/git/davem/net
Pull networking fixes from David Miller:
1) Fix checksumming regressions, from Tom Herbert.
2) Undo unintentional permissions changes for SCTP rto_alpha and
rto_beta sysfs knobs, from Denial Borkmann.
3) VXLAN, like other IP tunnels, should advertize it's encapsulation
size using dev->needed_headroom instead of dev->hard_header_len.
From Cong Wang.
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
net: sctp: fix permissions for rto_alpha and rto_beta knobs
vxlan: Checksum fixes
net: add skb_pop_rcv_encapsulation
udp: call __skb_checksum_complete when doing full checksum
net: Fix save software checksum complete
net: Fix GSO constants to match NETIF flags
udp: ipv4: do not waste time in __udp4_lib_mcast_demux_lookup
vxlan: use dev->needed_headroom instead of dev->hard_header_len
MAINTAINERS: update cxgb4 maintainer
Linus Torvalds [Mon, 16 Jun 2014 02:02:20 +0000 (16:02 -1000)]
Merge tag 'clk-for-linus-3.16-part2' of git://git.linaro.org/people/mike.turquette/linux
Pull more clock framework updates from Mike Turquette:
"This contains the second half the of the clk changes for 3.16.
They are simply fixes and code refactoring for the OMAP clock drivers.
The sunxi clock driver changes include splitting out the one
mega-driver into several smaller pieces and adding support for the A31
SoC clocks"
* tag 'clk-for-linus-3.16-part2' of git://git.linaro.org/people/mike.turquette/linux: (25 commits)
clk: sunxi: document PRCM clock compatible strings
clk: sunxi: add PRCM (Power/Reset/Clock Management) clks support
clk: sun6i: Protect SDRAM gating bit
clk: sun6i: Protect CPU clock
clk: sunxi: Rework clock protection code
clk: sunxi: Move the GMAC clock to a file of its own
clk: sunxi: Move the 24M oscillator to a file of its own
clk: sunxi: Remove calls to clk_put
clk: sunxi: document new A31 USB clock compatible
clk: sunxi: Implement A31 USB clock
ARM: dts: OMAP5/DRA7: use omap5-mpu-dpll-clock capable of dealing with higher frequencies
CLK: TI: dpll: support OMAP5 MPU DPLL that need special handling for higher frequencies
ARM: OMAP5+: dpll: support Duty Cycle Correction(DCC)
CLK: TI: clk-54xx: Set the rate for dpll_abe_m2x2_ck
CLK: TI: Driver for DRA7 ATL (Audio Tracking Logic)
dt:/bindings: DRA7 ATL (Audio Tracking Logic) clock bindings
ARM: dts: dra7xx-clocks: Correct name for atl clkin3 clock
CLK: TI: gate: add composite interface clock to OMAP2 only build
ARM: OMAP2: clock: add DT boot support for cpufreq_ck
CLK: TI: OMAP2: add clock init support
...
Linus Torvalds [Mon, 16 Jun 2014 01:58:03 +0000 (15:58 -1000)]
Merge git://git.infradead.org/users/willy/linux-nvme
Pull NVMe update from Matthew Wilcox:
"Mostly bugfixes again for the NVMe driver. I'd like to call out the
exported tracepoint in the block layer; I believe Keith has cleared
this with Jens.
We've had a few reports from people who're really pounding on NVMe
devices at scale, hence the timeout changes (and new module
parameters), hotplug cpu deadlock, tracepoints, and minor performance
tweaks"
[ Jens hadn't seen that tracepoint thing, but is ok with it - it will
end up going away when mq conversion happens ]
* git://git.infradead.org/users/willy/linux-nvme: (22 commits)
NVMe: Fix START_STOP_UNIT Scsi->NVMe translation.
NVMe: Use Log Page constants in SCSI emulation
NVMe: Define Log Page constants
NVMe: Fix hot cpu notification dead lock
NVMe: Rename io_timeout to nvme_io_timeout
NVMe: Use last bytes of f/w rev SCSI Inquiry
NVMe: Adhere to request queue block accounting enable/disable
NVMe: Fix nvme get/put queue semantics
NVMe: Delete NVME_GET_FEAT_TEMP_THRESH
NVMe: Make admin timeout a module parameter
NVMe: Make iod bio timeout a parameter
NVMe: Prevent possible NULL pointer dereference
NVMe: Fix the buffer size passed in GetLogPage(CDW10.NUMD)
NVMe: Update data structures for NVMe 1.2
NVMe: Enable BUILD_BUG_ON checks
NVMe: Update namespace and controller identify structures to the 1.1a spec
NVMe: Flush with data support
NVMe: Configure support for block flush
NVMe: Add tracepoints
NVMe: Protect against badly formatted CQEs
...
Daniel Borkmann [Sat, 14 Jun 2014 22:59:14 +0000 (00:59 +0200)]
net: sctp: fix permissions for rto_alpha and rto_beta knobs
Commit
3fd091e73b81 ("[SCTP]: Remove multiple levels of msecs
to jiffies conversions.") has silently changed permissions for
rto_alpha and rto_beta knobs from 0644 to 0444. The purpose of
this was to discourage users from tweaking rto_alpha and
rto_beta knobs in production environments since they are key
to correctly compute rtt/srtt.
RFC4960 under section 6.3.1. RTO Calculation says regarding
rto_alpha and rto_beta under rule C3 and C4:
[...]
C3) When a new RTT measurement R' is made, set
RTTVAR <- (1 - RTO.Beta) * RTTVAR + RTO.Beta * |SRTT - R'|
and
SRTT <- (1 - RTO.Alpha) * SRTT + RTO.Alpha * R'
Note: The value of SRTT used in the update to RTTVAR
is its value before updating SRTT itself using the
second assignment. After the computation, update
RTO <- SRTT + 4 * RTTVAR.
C4) When data is in flight and when allowed by rule C5
below, a new RTT measurement MUST be made each round
trip. Furthermore, new RTT measurements SHOULD be
made no more than once per round trip for a given
destination transport address. There are two reasons
for this recommendation: First, it appears that
measuring more frequently often does not in practice
yield any significant benefit [ALLMAN99]; second,
if measurements are made more often, then the values
of RTO.Alpha and RTO.Beta in rule C3 above should be
adjusted so that SRTT and RTTVAR still adjust to
changes at roughly the same rate (in terms of how many
round trips it takes them to reflect new values) as
they would if making only one measurement per
round-trip and using RTO.Alpha and RTO.Beta as given
in rule C3. However, the exact nature of these
adjustments remains a research issue.
[...]
While it is discouraged to adjust rto_alpha and rto_beta
and not further specified how to adjust them, the RFC also
doesn't explicitly forbid it, but rather gives a RECOMMENDED
default value (rto_alpha=3, rto_beta=2). We have a couple
of users relying on the old permissions before they got
changed. That said, if someone really has the urge to adjust
them, we could allow it with a warning in the log.
Fixes: 3fd091e73b81 ("[SCTP]: Remove multiple levels of msecs to jiffies conversions.")
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Cc: Vlad Yasevich <vyasevich@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Sun, 15 Jun 2014 08:00:56 +0000 (01:00 -0700)]
Merge branch 'csum_fixes'
Tom Herbert says:
====================
Fixes related to some recent checksum modifications.
- Fix GSO constants to match NETIF flags
- Fix logic in saving checksum complete in __skb_checksum_complete
- Call __skb_checksum_complete from UDP if we are checksumming over
whole packet in order to save checksum.
- Fixes to VXLAN to work correctly with checksum complete
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Tom Herbert [Sun, 15 Jun 2014 06:24:36 +0000 (23:24 -0700)]
vxlan: Checksum fixes
Call skb_pop_rcv_encapsulation and postpull_rcsum for the Ethernet
header to work properly with checksum complete.
Signed-off-by: Tom Herbert <therbert@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Tom Herbert [Sun, 15 Jun 2014 06:24:28 +0000 (23:24 -0700)]
net: add skb_pop_rcv_encapsulation
This function is used by UDP encapsulation protocols in RX when
crossing encapsulation boundary. If ip_summed is set to
CHECKSUM_UNNECESSARY and encapsulation is not set, change to
CHECKSUM_NONE since the checksum has not been validated within the
encapsulation. Clears csum_valid by the same rationale.
Signed-off-by: Tom Herbert <therbert@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>