Commit graph

19828 commits

Author SHA1 Message Date
Vladimir Kondratiev c888cdd41f wil6210: relaxed check for BACK start sequence
Sometimes, due to the race between Rx path and WMI_BA_STATUS_EVENTID WMI event,
few frames may be passed to the stack before reorder buffer allocated.
Then, after BACK establishment, it start getting frames with sequence number ahead of
SSN, and it get interpreted as missing frames. Then, BACK mechanism will wait
for missing frames; data traffic will be stopped. In case of interface configured
for DHCP, this data delay causes DHCP failure.

Relax checking for sequence number; use sequence of 1-st frame handled by the buffer
as SSN for this buffer.

This is work-around, real fix should be done when proper BACK mechanism implemented.

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-04-22 15:06:29 -04:00
Vladimir Kondratiev 6c2faf0939 wil6210: sync with the latest FW API
- add pcp_max_assoc_sta to the struct wmi_pcp_start_cmd
- enum for the scan ststus

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-04-22 15:06:28 -04:00
Vladimir Kondratiev 15e23124ce wil6210: fix printouts for better readability
Reshuffle prints to consolidate firmware/hardware information
report upon card init

Convert print for unhandled MISC ISR bits to "debug" - it is
normal situation and not an "error"

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-04-22 15:06:28 -04:00
Felix Fietkau d463af4a1c ath9k: implement p2p client powersave support
Use generic TSF timers to trigger powersave state changes based
information from the P2P NoA attribute.
Opportunistic Powersave is not handled, because the driver does not
support powersave at the moment.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-04-22 15:06:28 -04:00
Felix Fietkau 95ae481246 ath9k: support only one P2P interface
Preparation for adding P2P powersave and multi-channel support.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-04-22 15:06:28 -04:00
Julia Lawall 360298c11e ray_cs: replace del_timer by del_timer_sync
Use del_timer_sync to ensure that the timer is stopped on all CPUs before
the driver exits.

This change was suggested by Thomas Gleixner.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r@
identifier i,t,ex;
@@
struct t i = { .remove = ex, };

@@
identifier r.ex;
@@
ex(...) {
  <...
- del_timer
+ del_timer_sync
    (...)
  ...>
}
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-04-22 15:06:28 -04:00
Andrea Merello 294bc611ab rtl8180: be paranoid in stopping unused queues.
HW should never attempt to perform DMA for unused queues.
For rtl8187se this is ensured by setting a dedicated register at
init time, before enabling TX.

In rtl8180/5 the register is only written at the first TX (because
in rtl8180/5 it serves also to kick DMA for used queues).
This should be enough, but it's worth to add a register write at
init time, before enabling TX.

Signed-off-by: Andrea Merello <andrea.merello@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-04-22 15:06:27 -04:00
Andrea Merello 6bcb20c776 rtl8180: add parentheses to REG_ADDR macros
Parentheses are missing around the macro argument, causing the
macro possibly not to work passing certain expressions as
arguments.

This should not cause any issues with current code, however it's
worth to add them, as a good practice, and to eventually avoid
future bugs.

Suggested-by: Dave Kilroy <kilroyd@googlemail.com>
Signed-off-by: Andrea Merello <andrea.merello@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-04-22 15:06:27 -04:00
Andrea Merello 1c3fb9b8f8 rtl8180: fix enabled interrupt mask for rtl8187se
When preparing the bitfield to write to HW register, the high-priority
queue error interrupt bit is set two times, and the beacon queue
TX-OK interrupt is not enabled.

Currently this have no functional impact because the high-priority
queue is not used at all, and the beacon queue is not used yet.

This patch removes high-priority queue bits and it adds the
beacon queue missing bit.
It removes also the management queue bits because it is not used.

This was found by static code analyzer.

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Reported-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Andrea Merello <andrea.merello@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-04-22 15:06:27 -04:00
Larry Finger [ original patch ] 222aaffe12 rtl8180: change module name in rtl818x_pci
rtl8180 driver can handle also rtl8185 and rtl8187SE cards,
however in userspace tools (network manager) it still appares
as "rtl8180".
This might lead the user to think the wrong driver is in use.

This patch changes module name to "rtl818x_pci" that should be
more explanatory.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> [ original patch ]
Signed-off-by: Andrea Merello <andrea.merello@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-04-22 15:06:27 -04:00
John W. Linville 22b3b9578d Merge branch 'for-linville' of git://github.com/kvalo/ath 2014-04-22 15:02:03 -04:00
John W. Linville bf4c69f7dd Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next 2014-04-22 15:01:24 -04:00
Amitkumar Karwar f8d2b9209a mwifiex: fix hung task on command timeout
Sometimes when command timeout occurs due to a firmware or
hardware bug, there may be some synchronous commands in command
queue. These commands are never downloaded to firmware causing
hung task warnings. This patch replaces wait_event_interruptible
call with wait_event_interruptible_timeout to fix the issue.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-04-15 13:27:05 -04:00
Amitkumar Karwar 20474129d8 mwifiex: process event before command response
During extended scan, SCAN report event is always followed by
command response. Sometimes It is observed that command response
is processed before SCAN report which leads to a crash, because
current command node is cleared while handling the response.
This patch makes sure that driver's main thread gives priority
to events over command responses.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Maithili Hinge <maithili@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-04-15 13:27:05 -04:00
Eliad Peller c0da71ff4d wl18xx: align event mailbox with current fw
Some fields are missing from the event mailbox
struct definitions, which cause issues when
trying to handle some events.

Add the missing fields in order to align the
struct size (without adding actual support
for the new fields).

Reported-and-tested-by: Imre Kaloz <kaloz@openwrt.org>
Cc: stable@vger.kernel.org # 3.14+
Fixes: 028e724 ("wl18xx: move to new firmware (wl18xx-fw-3.bin)")
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-04-14 14:31:42 -04:00
Christian Engelmayer 61698b7e22 rsi: Fix a potential memory leak in rsi_send_auto_rate_request()
Fix a potential memory leak in the error path of function
rsi_send_auto_rate_request(). In case memory allocation for array
'selected_rates' fails, the error path exits and leaves the previously
allocated skb in place. Detected by Coverity: CID 1195575.

Signed-off-by: Christian Engelmayer <cengelma@gmx.at>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-04-14 14:31:42 -04:00
Frederic Danis 2004dabaac cw1200: Fix cw1200_debug_link_id
This array is used in debug string to display cw1200_link_status
defined in drivers/net/wireless/cw1200/cw1200.h.

Add missing strings for CW1200_LINK_RESET and CW1200_LINK_RESET_REMAP.

Signed-off-by: Frederic Danis <frederic.danis@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-04-14 14:31:42 -04:00
Luciano Coelho 69aa167583 wlcore: ignore dummy packet events in PLT mode
Sometimes the firmware sends a dummy packet event while we are in PLT
mode.  This doesn't make sense, it's a firmware bug.  Fix this by
ignoring dummy packet events when we're PLT mode.

Reported-by: Yegor Yefremov <yegorslists@googlemail.com>
Reported-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <luca@coelho.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-04-14 14:31:41 -04:00
Christian Engelmayer 98ddcbe033 rsi: Fix a potential memory leak in rsi_set_channel()
Fix a potential memory leak in function rsi_set_channel() that is used to
program channel changes. The channel check block for the frequency bands
directly exits the function in case of an error, thus leaving an already
allocated skb unreferenced. Move the checks above allocating the skb.
Detected by Coverity: CID 1195576.

Signed-off-by: Christian Engelmayer <cengelma@gmx.at>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-04-14 14:31:41 -04:00
Geert Uytterhoeven af64dc7474 rsi: Add missing initialization of ii
drivers/net/wireless/rsi/rsi_91x_core.c: In function ‘rsi_core_determine_hal_queue’:
drivers/net/wireless/rsi/rsi_91x_core.c:91: warning: ‘ii’ may be used uninitialized in this function

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-04-14 14:31:41 -04:00
John W. Linville 0215f4cf72 Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-fixes 2014-04-14 14:21:07 -04:00
Emmanuel Grumbach e03bbb62cf iwlwifi: don't disable SCD chain extension on newer devices
7000 device series have a fix for this hardware feature.
Stop disabling it, and get an improvement in Tx throughput.
This feature allows the scheduler to fetch more frames on
the fly while an A-MPDU is being built - which means that
we can get larger A-MPDU. This, of course, give an
improvement in the Tx throughput.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-04-13 22:23:20 +03:00
Avri Altman c6e37a686e iwlwifi: mvm: Re-factor enabling uAPSD logic
The driver can enable uAPSD and specify some of its related parameters.
This patch organizes this logic in a separate function.

Signed-off-by: Avri Altman <avri.altman@intel.com>
Reviewed-by: Alexander Bondar <alexander.bondar@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-04-13 22:23:19 +03:00
Emmanuel Grumbach 3a58d98e8d iwlwifi: mvm: replace leading spaces by tabs
Somehow I added spaces instead of tabs to a few lines in
debugfs.c.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-04-13 22:23:19 +03:00
Eliad Peller d15a747fc8 iwlwifi: mvm: don't use d3 fw if d0i3 is used
bail out from the suspend/resume callbacks if
d0i3 is used.

declare support for ANY wowlan trigger (i.e.
normal operation).

On resume, we shouldn't execute the d0i3 exit
flow (which might disconnect stations, etc.)
until mac80211 was resumed.
Add new flags to indicate we are in suspend,
and call the pending exit work on resume.

Since the resume flow can take some time, add
a new EXIT_WORK reference type to prevent going
back to d0i3 at this stage.

Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-04-13 22:23:18 +03:00
Emmanuel Grumbach f0d5bb07a3 iwlwifi: 7000: bump firmware API version to 9
Also warn if an older firmware is loaded.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-04-13 22:23:17 +03:00
Haim Dreyfuss e820c2da7e iwlwifi: mvm: Add support for Energy based scan (EBS)
This patch enables Energy Based Scan (EBS) - intended to detect energy
on 5 GHz band channels. Passive scan on this band takes up to 2.64 sec
assuming 110mSec per-channel * 24 channels. EBS is designed to detect
energy on channels with intensive Wifi activity as well as those where
only beacons are transmitted. EBS completes sampling all channels within
shortest beacon frame transmission time. Total EBS duration is about 100
msec (typical beacon interval).
Detecting Wifi activity on 5 GHz band channels can significantly reduce
scan duration thus saving time and power. EBS failure reported by FW
disables EBS for current connection. It is re-enabled upon new
connection attempt on any WLAN interface.

Signed-off-by: Haim Dreyfuss <haim.dreyfuss@intel.com>
Signed-off-by: Alexander Bondar <alexander.bondar@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-04-13 22:23:17 +03:00
Emmanuel Grumbach ae397472f6 iwlwifi: mvm: BT Coex - send priority tables from iwl_send_bt_init_conf
Calling iwl_send_bt_init_conf for INIT firmware is not a
problem, and calling iwl_send_bt_prio_tbl from
iwl_send_bt_init_conf allows us to prepare for new API.

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-04-13 22:23:16 +03:00
Emmanuel Grumbach e78973efe7 iwlwifi: mvm: BT Coex - minor API change
The BT Coex API underwent a minor backward compatible API
change.
We now need to set an invalid value in the override fields.
While at it, add kerneldoc comments on the fields in the
command.

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-04-13 22:23:15 +03:00
Emmanuel Grumbach 8a0063a051 iwlwifi: mvm: BT Coex - don't use comma operator
This is really not needed. This is a remainder from a C99
initialiser.

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-04-13 22:23:15 +03:00
Emmanuel Grumbach 639eabad3a iwlwifi: remove IWL_UCODE_TLV_FLAGS_DEVICE_PS_CMD flag
All the supported firmwares have this flag set.

Reviewed-by: Alexander Bondar <alexander.bondar@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-04-13 22:23:14 +03:00
Emmanuel Grumbach f9dc0004a1 iwlwifi: remove IWL_UCODE_TLV_FLAGS_STA_KEY_CMD flag
All the supported firmwares have this flag set.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-04-13 22:23:13 +03:00
Emmanuel Grumbach dc9a19296a iwlwifi: remove IWL_UCODE_TLV_FLAGS_UAPSD_SUPPORT flag
All the supported firmwares have this flag set.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-04-13 22:23:13 +03:00
Emmanuel Grumbach 536a3eee62 iwlwifi: remove IWL_UCODE_TLV_FLAGS_SCHED_SCAN flag
All the supported firmwares have this flag set.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-04-13 22:23:12 +03:00
Emmanuel Grumbach 3afec63957 iwlwifi: remove IWL_UCODE_TLV_FLAGS_D3_CONTINUITY_API flag
All the supported firmwares have this flag set.

Reviewed-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-04-13 22:23:11 +03:00
Emmanuel Grumbach 73e5f2c5d7 iwlwifi: remove IWL_UCODE_TLV_FLAGS_BF_UPDATED flag
All the supported firmwares have this flag set.

Reviewed-by: Alexander Bondar <alexander.bondar@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-04-13 22:23:11 +03:00
Emmanuel Grumbach a373f67cbe iwlwifi: remove IWL_UCODE_TLV_FLAGS_TIME_EVENT_API_V2 flag
All the supported firmwares have this flag set.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-04-13 22:23:10 +03:00
Emmanuel Grumbach 3fe47dca04 iwlwifi: remove IWL_UCODE_TLV_FLAGS_RX_ENERGY_API flag
All the supported firmwares have this flag set.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-04-13 22:23:09 +03:00
Emmanuel Grumbach ad2549d8ed iwlwifi: remove IWL_UCODE_TLV_FLAGS_PM_CMD_SUPPORT flag
All the supported firmwares have this flag set.

Reviewed-by: Alexander Bondar <alexander.bondar@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-04-13 22:23:09 +03:00
Emmanuel Grumbach 2dae313f98 iwlwifi: remove IWL_UCODE_TLV_FLAGS_NEWBT_COEX TLV flag
All the supported firmwares have this flag set.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-04-13 22:23:08 +03:00
Emmanuel Grumbach a6bc92803e iwlwifi: mvm: BT Coex - fix Look Up Table
A few entries were wrong and this caused throughput issues.

Cc: <stable@vger.kernel.org> [3.13+]
Fixes: dac94da8db ("iwlwifi: mvm: new BT Coex API")
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-04-13 16:51:07 +03:00
Eyal Shapira b804eeb664 iwlwifi: mvm: rs: clear per rate stats when aggregation changes
The per rate stats should be cleared when aggregation state changes
to avoid making rate scale decisions based on throughput figures which
were collected prior to the aggregation state change and are now stale.
While at it make sure any clearing of the per rate stats will get logged.

Cc: <stable@vger.kernel.org> [3.14]
Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-04-13 16:51:06 +03:00
Eyal Shapira d8fff919ec iwlwifi: mvm: avoid searching unnecessary columns
Don't search columns which are unlikely to succeed as previous
columns searched with less aggressive modulation failed.

Cc: <stable@vger.kernel.org> [3.14]
Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-04-13 16:51:06 +03:00
Eyal Shapira fd7dbee51b iwlwifi: mvm: rs: fallback to legacy Tx columns
Allow switching back to legacy Tx columns so we'll stop doing
HT/VHT in case we're far from the AP. Stop active aggregation when
making a deciding to stay in a legacy column.
Despite having low legacy rates in the LQ table lower entries
it doesn't help much in case we're doing aggregations as the
aggregation was being transmitted in the initial rate of the table.

This should help traffic stalls when far from the AP.

Cc: <stable@vger.kernel.org> [3.14]
Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-04-13 16:51:05 +03:00
Eyal Shapira 87d5e4155c iwlwifi: mvm: rs: reinit rs if no tx for a long time
After being idle for a long time (>5sec) the rs statistics
will be stale so we prefer to reset rs and start from legacy
rates again. This gives better results when the attenuation
increased signficantly (e.g. we got further from the AP) and
after a while we start Tx
Note that the first Tx after the idle period will still go out
in the old modulation and rate but this seemed a simpler approach
compared to adding a timer or modifying mac80211 for this.
The negative impact is negligble as we'll recover quickly.

Cc: <stable@vger.kernel.org> [3.14]
Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-04-13 16:51:04 +03:00
Eyal Shapira e53839eb98 iwlwifi: mvm: rs: fix and cleanup rs_get_rate_action
Change the down/upscale decision logic a bit to be based
on different success ratio thresholds. This fixes the implementation
compared to the rate scale algorithm which was planned to yield
optimal results. Also fix a case where a lower rate wasn't explored
despite being a potential for better throughput.
While at it rewrite rs_get_rate_action to be more clear and clean.

Cc: <stable@vger.kernel.org> [3.14]
Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-04-13 16:51:04 +03:00
Eyal Shapira 198266a3c1 iwlwifi: mvm: rs: use correct max expected throughput figures
The selection of the max expected throughput for a column
didn't take into account the maximal allowed rate for the current
peer. This can cause unnecessary switches during the search cycle
to columns which have no chance of beating the current throughput.

Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-04-13 16:51:03 +03:00
Emmanuel Grumbach 08a732f4e4 iwlwifi: add MODULE_FIRMWARE for 7265
It was missing.

Cc: <stable@vger.kernel.org> [3.13+]
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-04-13 16:50:56 +03:00
Emmanuel Grumbach c13b172559 iwlwifi: mvm: deprecate -7 firmware
This firmware is not supported any more.
A few code paths specific to old firmware can be removed.
We can now assume that a few TLV flags are always set since
we won't load firmware that didn't support the corresponding
features. This will be done in a separate patch.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-04-13 09:36:04 +03:00
Emmanuel Grumbach 748fa67cb7 iwlwifi: mvm: replace BUG_ON by WARN_ON in scan.c
While the scan_cmd should really be allocated in init (and
we do fail init in case the allocation failed), it doesn't
mean we should lock up the machine if something really bad
happened.

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-04-13 09:36:03 +03:00