]> git.karo-electronics.de Git - linux-beck.git/log
linux-beck.git
10 years agobrcmfmac: Change USB probe routine to support Composite USB
Hante Meuleman [Sat, 21 Jun 2014 10:11:15 +0000 (12:11 +0200)]
brcmfmac: Change USB probe routine to support Composite USB

Some of the USB devices also have Bluetooth inside. These devices
can with specific firmware result in a composite USB device. This
change will update the driver such that it will also accept the
correct interface of composite devices. It is backward compatible
with old non-composite USB fw.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agobrcmfmac: clear ht info during attach phase
Arend van Spriel [Sat, 21 Jun 2014 10:11:14 +0000 (12:11 +0200)]
brcmfmac: clear ht info during attach phase

After updating 2G bandwidth capability clear ht info. This will be properly
set upon calling brcmf_update_wiphy_bands().

Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agobrcmfmac: Add USB device 43566 to supported devices.
Hante Meuleman [Sat, 21 Jun 2014 10:11:13 +0000 (12:11 +0200)]
brcmfmac: Add USB device 43566 to supported devices.

Add the USB 43566 device to the supported devices list. The 43566
is a WiFi-only variant of the 43569. It uses the same FW as 43569.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agobrcmfmac: Add 43569 USB support.
Hante Meuleman [Sat, 21 Jun 2014 10:11:12 +0000 (12:11 +0200)]
brcmfmac: Add 43569 USB support.

Added usb device id for the new device 43569 to the list of
supported devices.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agonet/wireless/brcm80211/brcmfmac: Make return type and name reflect actual semantics
Rasmus Villemoes [Sun, 22 Jun 2014 18:50:40 +0000 (20:50 +0200)]
net/wireless/brcm80211/brcmfmac: Make return type and name reflect actual semantics

Applying ++ to a bool is equivalent to setting it true, regardless of
its initial value (bools are not uint1_t). Hence the function
wl_get_vif_state_all can only ever return true/false. The only in-tree
caller uses its return value as a boolean. So update its return type,
and since the list traversal and bit testing have no side effects,
just return true immediately. Its return value tells if any vif is in
the specified state, so also rename it to brcmf_get_vif_state_any.

Reviewed-by: Arend van Spriel<arend@broadcom.com>
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agomwifiex: print sleep_confirm cmd/response and power save events
Bing Zhao [Fri, 20 Jun 2014 04:38:58 +0000 (21:38 -0700)]
mwifiex: print sleep_confirm cmd/response and power save events

Sleep Confirm command is sent separately while other commands
are handled through cmd_pending_q. Print sleep_confirm cmd and
its response as well as power save events so that we have a
clearer picture of power save handshake in driver log.

Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agomwifiex: update Copyright to 2014
Xinming Hu [Fri, 20 Jun 2014 04:38:57 +0000 (21:38 -0700)]
mwifiex: update Copyright to 2014

This patch updates mwifiex Copyright to 2014.

Signed-off-by: Xinming Hu <huxm@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agomwifiex: add hscfg to debugfs
Xinming Hu [Fri, 20 Jun 2014 04:38:56 +0000 (21:38 -0700)]
mwifiex: add hscfg to debugfs

Some SDIO controllers do not support MMC_PM_KEEP_POWER properly.
To test host sleep feature without putting the system into sleep
we need to simulate host sleep configuration & handshake between
driver and firmware using customized parameters.
This patch adds hscfg debugfs item, with which user could change
host sleep parameters for debugging.

Signed-off-by: Xinming Hu <huxm@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agomwifiex: add firmware dump feature for SDIO
Amitkumar Karwar [Fri, 20 Jun 2014 04:38:55 +0000 (21:38 -0700)]
mwifiex: add firmware dump feature for SDIO

Firmware dump feature is added for SDIO based chipsets
which can be used with the help of ethtool commands.

1) Trigger firmware dump operation:
ethtool --set-dump mlan0 0xff

When the operation is completed, udev event will be sent to
trigger external application.

2) Following udev rule can be used to get the data from ethtool:
DRIVER=="mwifiex_sdio", ACTION=="change", RUN+="/sbin/mwifiex_sdio_fw_dump.sh"

mwifiex_sdio_fw_dump.sh: #!/bin/bash
ethtool --set-dump mlan0 0
ethtool --get-dump mlan0
ethtool --get-dump mlan0 data /tmp/ITCM.log

ethtool --set-dump mlan0 1
ethtool --get-dump mlan0
ethtool --get-dump mlan0 data /tmp/DTCM.log

ethtool --set-dump mlan0 2
ethtool --get-dump mlan0
ethtool --get-dump mlan0 data /tmp/SQRAM.log

ethtool --set-dump mlan0 3
ethtool --get-dump mlan0
ethtool --get-dump mlan0 data /tmp/APU.log

ethtool --set-dump mlan0 4
ethtool --get-dump mlan0
ethtool --get-dump mlan0 data /tmp/CIU.log

ethtool --set-dump mlan0 5
ethtool --get-dump mlan0
ethtool --get-dump mlan0 data /tmp/ICU.log

ethtool --set-dump mlan0 6
ethtool --get-dump mlan0
ethtool --get-dump mlan0 data /tmp/MAC.log

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>
10 years agomwifiex: get rid of global pointer reset_host
Amitkumar Karwar [Fri, 20 Jun 2014 04:38:54 +0000 (21:38 -0700)]
mwifiex: get rid of global pointer reset_host

As we can derive host pointer from adapter, maintaining
a global variable doesn't make sense.

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>
10 years agomwifiex: use generic 'iface_work' workqueue for SDIO interface
Amitkumar Karwar [Fri, 20 Jun 2014 04:38:53 +0000 (21:38 -0700)]
mwifiex: use generic 'iface_work' workqueue for SDIO interface

Existing dedicated card_reset work queue is replaced with the
interface specific workqueue pointer provided by mwifiex module.
Also new work flag is added for card reset task.

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>
10 years agomwifiex: add firmware dump feature for PCIe
Amitkumar Karwar [Fri, 20 Jun 2014 04:38:52 +0000 (21:38 -0700)]
mwifiex: add firmware dump feature for PCIe

Firmware dump feature is added for PCIe based chipsets which can
be used with the help of ethtool commands.

1) Trigger firmware dump operation:
ethtool --set-dump mlan0 0xff

When the operation is completed, udev event will be sent to
trigger external application.

2) Following udev rule can be used to get the data from ethtool:
DRIVER=="mwifiex_pcie", ACTION=="change", RUN+="/sbin/mwifiex_pcie_fw_dump.sh"

mwifiex_pcie_fw_dump.sh: #!/bin/bash
ethtool --set-dump mlan0 0
ethtool --get-dump mlan0
ethtool --get-dump mlan0 data /tmp/ITCM.log

ethtool --set-dump mlan0 1
ethtool --get-dump mlan0
ethtool --get-dump mlan0 data /tmp/DTCM.log

ethtool --set-dump mlan0 2
ethtool --get-dump mlan0
ethtool --get-dump mlan0 data /tmp/SQRAM.log

ethtool --set-dump mlan0 3
ethtool --get-dump mlan0
ethtool --get-dump mlan0 data /tmp/IRAM.log

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>
10 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwif...
John W. Linville [Wed, 25 Jun 2014 19:29:03 +0000 (15:29 -0400)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next

10 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
John W. Linville [Wed, 25 Jun 2014 19:15:14 +0000 (15:15 -0400)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next

10 years agocfg80211: remove channel_switch combination check
Michal Kazior [Wed, 25 Jun 2014 10:35:10 +0000 (12:35 +0200)]
cfg80211: remove channel_switch combination check

Driver is now responsible for veryfing if the
switch is possible.

Since this is inherently tricky driver may decide
to disconnect an interface later with
cfg80211_stop_iface().

This doesn't mean driver can accept everything. It
should do it's best to verify requests and reject
them as soon as possible.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agomac80211: use chanctx reservation for STA CSA
Michal Kazior [Wed, 25 Jun 2014 10:35:09 +0000 (12:35 +0200)]
mac80211: use chanctx reservation for STA CSA

Channel switch finalization is now 2-step. First
step is when driver calls chswitch_done(), the
other is when reservation is actually finalized
(which be defered for in-place reservation).

It is now safe to call ieee80211_chswitch_done()
more than once.

Also remove the ieee80211_vif_change_channel()
because it is no longer used.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agomac80211: use chanctx reservation for AP CSA
Michal Kazior [Wed, 25 Jun 2014 10:35:08 +0000 (12:35 +0200)]
mac80211: use chanctx reservation for AP CSA

Channel switch finalization is now 2-step. First
step is when driver calls csa_finish(), the other
is when reservation is actually finalized (which
can be deferred for in-place reservation).

It is now safe to call ieee80211_csa_finish() more
than once.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agomac80211: make check_combinations() aware of chanctx reservation
Michal Kazior [Wed, 25 Jun 2014 10:35:07 +0000 (12:35 +0200)]
mac80211: make check_combinations() aware of chanctx reservation

The ieee80211_check_combinations() computes
radar_detect accordingly depending on chanctx
reservation status.

This makes it possible to use the function for
channel_switch validation.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agomac80211: implement multi-vif in-place reservations
Michal Kazior [Wed, 25 Jun 2014 10:35:06 +0000 (12:35 +0200)]
mac80211: implement multi-vif in-place reservations

Multi-vif in-place reservations happen when
it is impossible to allocate more channel contexts
as indicated by interface combinations.

Such reservations are not finalized until all
assigned interfaces are ready.

This still doesn't handle all possible cases
(i.e. degradation of number of channels) properly.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agomac80211: split sched scan IEs
David Spinadel [Thu, 6 Feb 2014 14:15:23 +0000 (16:15 +0200)]
mac80211: split sched scan IEs

Split sched scan IEs to band specific and not band specific
blocks. Common IEs blocks may be sent to the FW once per command,
instead of per band.

This allows optimization of size of the command, which may be
required by some drivers (eg. iwlmvm with newer firmware version).

As this changes the mac80211 API, update all drivers to use the
new version correctly, even if they don't (yet) make use of the
split data.

Signed-off-by: David Spinadel <david.spinadel@intel.com>
Reviewed-by: Alexander Bondar <alexander.bondar@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agomac80211: support more than one band in scan request
David Spinadel [Wed, 5 Feb 2014 13:21:13 +0000 (15:21 +0200)]
mac80211: support more than one band in scan request

Some drivers (such as iwlmvm) can handle multiple bands in a single
HW scan request. Add a HW flag to indicate that the driver support
this. To hold the required data, create a separate structure for
HW scan request that holds cfg scan request and data about
different parts of the scan IEs.

As this changes the mac80211 API, update all drivers using it to
use the correct new function type/argument.

Signed-off-by: David Spinadel <david.spinadel@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agoiwlwifi: mvm: handle device start failures during restart
Johannes Berg [Wed, 30 Apr 2014 14:34:45 +0000 (16:34 +0200)]
iwlwifi: mvm: handle device start failures during restart

If the device fails during a restart, mac80211 now handles the
situation better but we still have a little bit of cleanup to
do in the driver - add the required code.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-by: ArikX Nemtsov <arik@wizery.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwivi: mvm: BT Coex - properly set the priority of beacons
Emmanuel Grumbach [Mon, 2 Jun 2014 07:03:33 +0000 (10:03 +0300)]
iwlwivi: mvm: BT Coex - properly set the priority of beacons

Since the new API allows multiple priorities, we need to
properly set the beacon's prorities in the TX cmd associated
to it.

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: support extended beacon notification
David Spinadel [Thu, 27 Feb 2014 14:41:52 +0000 (16:41 +0200)]
iwlwifi: mvm: support extended beacon notification

Use extended beacon notification when supported by FW.
Set last beacon system time to AP or GO interface.
System time of last beacon can be used to avoid TBTT overlapping
between two interfaces, CSA and other uses.

Signed-off-by: David Spinadel <david.spinadel@intel.com>
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: Introduce an API to set STA_FLG_DISABLE_TX flag
Andrei Otcheretianski [Sun, 25 May 2014 14:07:38 +0000 (17:07 +0300)]
iwlwifi: mvm: Introduce an API to set STA_FLG_DISABLE_TX flag

Introduce new station flag STA_FLG_DISABLE_TX, which is modified with ADD_STA
command. This flag, when set, disables tx to the STA.
Provide an API (iwl_mvm_sta_modify_disable_tx) to modify this flag, which
should be used in channel switch and immediate quiet flows.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: disable beacon filtering escape timer in d0i3
Eliad Peller [Sun, 15 Jun 2014 08:12:38 +0000 (11:12 +0300)]
iwlwifi: mvm: disable beacon filtering escape timer in d0i3

The beacon filtering configuration in d0i3 currently uses
the max value defined as 1024. However, with beacon interval
of 100ms we end up with too-frequent wakeups.

Instead, configure the escape timer to 0, asking the fw
to disable it altogether.

Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: BT Coex - avoid the shared antenna for management frames
Emmanuel Grumbach [Wed, 28 May 2014 18:53:39 +0000 (21:53 +0300)]
iwlwifi: mvm: BT Coex - avoid the shared antenna for management frames

If BT is active, we need to refrain from using the shared
antenna. This logic is done in the firmware when we use the
link quality tables. But for management frames, the rate is
written in the Tx command by the driver.
Hence the driver needs to make sure not use the shared
antenna when BT is active for any frames that don't use
the rate scale table such as management frames or multicast.

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: BT Coex - add reduced Tx power thresholds to constants
Emmanuel Grumbach [Tue, 27 May 2014 19:54:18 +0000 (22:54 +0300)]
iwlwifi: mvm: BT Coex - add reduced Tx power thresholds to constants

This really belongs to the constants file.

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: BT Coex - don't limit rate control if TTC is on
Emmanuel Grumbach [Mon, 2 Jun 2014 13:18:42 +0000 (16:18 +0300)]
iwlwifi: mvm: BT Coex - don't limit rate control if TTC is on

When the firmware enables TxTxCorunning, we can lift the
constaints on the rate control.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: BT Coex - allow MIMO in more cases
Emmanuel Grumbach [Sun, 25 May 2014 10:58:31 +0000 (13:58 +0300)]
iwlwifi: mvm: BT Coex - allow MIMO in more cases

We can Tx in MIMO rates when we are in TxTx Disallow mode
just like we can when we are in Tight mode.
Same if we are in 5Ghz regardless of the mode we are.
Change the code to allow MIMO in these cases.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: BT Coex - allow to force the antenna allocation
Emmanuel Grumbach [Wed, 28 May 2014 09:06:41 +0000 (12:06 +0300)]
iwlwifi: mvm: BT Coex - allow to force the antenna allocation

This can be used for testing.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: assure no overflows occur while reading otp
Liad Kaufman [Wed, 21 May 2014 11:37:00 +0000 (14:37 +0300)]
iwlwifi: mvm: assure no overflows occur while reading otp

Just in case sizes change in the OTP without proper SW
updating, an additional check is inserted when reading OTP
sections to assure no overflows occur.

Signed-off-by: Liad Kaufman <liad.kaufman@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: nvm: update maximal parsed values in external nvm
Liad Kaufman [Mon, 28 Apr 2014 11:42:04 +0000 (14:42 +0300)]
iwlwifi: nvm: update maximal parsed values in external nvm

Some of the maximum values of the parsed external NVM file
in the B-step of the 8000 HW family were updated, so this
updates these values.

Signed-off-by: Liad Kaufman <liad.kaufman@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: update trans->hw_rev 8000 hw family format
Liad Kaufman [Sun, 1 Jun 2014 14:21:33 +0000 (17:21 +0300)]
iwlwifi: update trans->hw_rev 8000 hw family format

The format of the CSR_HW_REV register has changed in 8000
HW family. To keep backwards compatibility, we store the
value of this register as usual in trans->hw_rev, only we
store it in the old format in this variable.

Signed-off-by: Liad Kaufman <liad.kaufman@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: fix bug in set_hw_address function
Eran Harary [Wed, 7 May 2014 08:09:11 +0000 (11:09 +0300)]
iwlwifi: mvm: fix bug in set_hw_address function

Don't use nvm_hw pointer if it is NULL. Print an error
message if the MAC address isn't valid.

Signed-off-by: Eran Harary <eran.harary@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: dvm: add a force_cam module parameter to fully disable power saving
Andy Lutomirski [Sat, 7 Jun 2014 16:21:15 +0000 (09:21 -0700)]
iwlwifi: dvm: add a force_cam module parameter to fully disable power saving

iwldvm stalls are often blamed on power management.  Add an option
to force it all the way off.

Signed-off-by: Andy Lutomirski <luto@amacapital.net>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: pcie: improve debugfs queue info
Andy Lutomirski [Sat, 7 Jun 2014 16:13:44 +0000 (09:13 -0700)]
iwlwifi: pcie: improve debugfs queue info

This adds need_update and write_actual to rx_queue and need_update
and an HCMD indicator to tx_queue.

On my card, rx_queue now looks like:

read: 181
write: 180
write_actual: 176
need_update: 0
free_count: 40
closed_rb_num: 181

tx_queue now looks like:

hwq 00: read=29 write=30 use=1 stop=0 need_update=0
hwq 01: read=0 write=0 use=1 stop=0 need_update=0
hwq 02: read=128 write=128 use=1 stop=0 need_update=0
hwq 03: read=0 write=0 use=1 stop=0 need_update=0
hwq 04: read=94 write=94 use=1 stop=0 need_update=0 HCMD
hwq 05: read=0 write=0 use=0 stop=0 need_update=0
hwq 06: read=0 write=0 use=0 stop=0 need_update=0
hwq 07: read=0 write=0 use=0 stop=0 need_update=0
hwq 08: read=0 write=0 use=0 stop=0 need_update=0
hwq 09: read=0 write=0 use=0 stop=0 need_update=0
hwq 10: read=0 write=0 use=0 stop=0 need_update=0
hwq 11: read=0 write=0 use=0 stop=0 need_update=0
hwq 12: read=0 write=0 use=0 stop=0 need_update=0
hwq 13: read=0 write=0 use=0 stop=0 need_update=0
hwq 14: read=0 write=0 use=0 stop=0 need_update=0
hwq 15: read=0 write=0 use=0 stop=0 need_update=0
hwq 16: read=0 write=0 use=0 stop=0 need_update=0
hwq 17: read=0 write=0 use=0 stop=0 need_update=0
hwq 18: read=0 write=0 use=0 stop=0 need_update=0
hwq 19: read=0 write=0 use=0 stop=0 need_update=0

This may help with debugging queue stalls.

Signed-off-by: Andy Lutomirski <luto@amacapital.net>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: pcie: log when waking the NIC for hcmd submission fails
Andy Lutomirski [Sat, 7 Jun 2014 16:00:11 +0000 (09:00 -0700)]
iwlwifi: pcie: log when waking the NIC for hcmd submission fails

I've never seen this happen, but it's useful to rule it out.

Signed-off-by: Andy Lutomirski <luto@amacapital.net>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: fix NVM channel attribute map.
David Spinadel [Wed, 29 May 2013 08:37:28 +0000 (11:37 +0300)]
iwlwifi: fix NVM channel attribute map.

Fix NVM channel attributes. Add indoor-only and GO Concurrent
bits. Remove DFS channel bit which is overlapped with radar.

Signed-off-by: David Spinadel <david.spinadel@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: fixes for 8000 NVM flow
Eran Harary [Sun, 1 Jun 2014 11:55:21 +0000 (14:55 +0300)]
iwlwifi: mvm: fixes for 8000 NVM flow

The nvm_file should be loaded by default for SDIO
procucts only. Change the configuration accordingly.
While at it, fix a typo in the device name.

Signed-off-by: Eran Harary <eran.harary@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: pcie: add firmware monitor capabilities
Emmanuel Grumbach [Sun, 1 Jun 2014 05:05:52 +0000 (08:05 +0300)]
iwlwifi: pcie: add firmware monitor capabilities

This allows to use the firmware monitor. This capability
uses a lot of contiguous memory (up to 64MB), so make its
usage module parameter dependent.

The driver will try to allocate as much contiguous memory
as possible downgrading its requirements until the
allocation succeeds.

Dump this data into the fw-error dump file when an error
happens.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: rename iwl_mvm_fw_error_next_data
Emmanuel Grumbach [Thu, 5 Jun 2014 10:50:31 +0000 (13:50 +0300)]
iwlwifi: rename iwl_mvm_fw_error_next_data

This is not related to mvm. Rename to iwl_fw_error_next_data.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: add device / firmware to fw-error-dump file
Emmanuel Grumbach [Mon, 2 Jun 2014 05:34:53 +0000 (08:34 +0300)]
iwlwifi: add device / firmware to fw-error-dump file

This can be useful later for parsing since the parsing may
differ based on the device's family / bus.
Also add the human readable version of the firmware.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: remove MCS32 support declaration
Eliad Peller [Sun, 15 Jun 2014 07:40:48 +0000 (10:40 +0300)]
iwlwifi: remove MCS32 support declaration

MCS32 is currently not supported, so don't
declare support for it.

Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: don't use hardcoded num of scan channels
David Spinadel [Thu, 5 Jun 2014 08:20:43 +0000 (11:20 +0300)]
iwlwifi: mvm: don't use hardcoded num of scan channels

Use num of scan channels as advertised by fw TLV.

Signed-off-by: David Spinadel <david.spinadel@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoMerge remote-tracking branch 'iwlwifi-fixes/master' into iwlwifi-next
Emmanuel Grumbach [Tue, 24 Jun 2014 12:05:09 +0000 (15:05 +0300)]
Merge remote-tracking branch 'iwlwifi-fixes/master' into iwlwifi-next

10 years agoiwlwifi: mvm: add back support for low-priority scan
Johannes Berg [Wed, 4 Jun 2014 08:13:50 +0000 (10:13 +0200)]
iwlwifi: mvm: add back support for low-priority scan

The low-priority scan feature can be useful, e.g. for OBSS
scans (if those are required by the AP); add back support
for it, restoring the maximum out time to the value it was
for low-priority scan before that was removed.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: use ksize to memset scan_command
David Spinadel [Mon, 2 Jun 2014 06:59:49 +0000 (09:59 +0300)]
iwlwifi: mvm: use ksize to memset scan_command

Use ksize to get scan command size instead of calculating it, to
avoid nasty bugs.

Signed-off-by: David Spinadel <david.spinadel@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: bump API version for 8000 devices
Emmanuel Grumbach [Tue, 24 Jun 2014 11:12:43 +0000 (14:12 +0300)]
iwlwifi: bump API version for 8000 devices

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agoiwlwifi: mvm: rework sched scan channel configuration
Eliad Peller [Mon, 26 May 2014 15:44:35 +0000 (18:44 +0300)]
iwlwifi: mvm: rework sched scan channel configuration

The current sched scan channel configuration code
configures all the supported channels for scanning.

However, this can result in SYSASSERT in some cases,
when the configured channel is disabled.

Instead, configure only the channels given in the
req struct, and set the channel_count field appropriately.

While on it, change the code to use channel->hw_value
instead of recalculating the channel number.

Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
10 years agomac80211: protect TDLS discovery session
Arik Nemtsov [Wed, 11 Jun 2014 14:18:27 +0000 (17:18 +0300)]
mac80211: protect TDLS discovery session

After sending a TDLS discovery-request, we expect a reply to arrive on
the AP's channel. We must stay on the channel (no PSM, scan, etc.), since
a TDLS setup-response is a direct packet not buffered by the AP.
Add a new mac80211 driver callback to allow discovery session protection.

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agomac80211: make sure TDLS peer STA exists during setup
Arik Nemtsov [Wed, 11 Jun 2014 14:18:26 +0000 (17:18 +0300)]
mac80211: make sure TDLS peer STA exists during setup

Make sure userspace added a TDLS peer station before invoking the
transmission of the first setup frame. This ensures packets to the peer
won't go through the AP path.

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agomac80211: add API to request TDLS operation from userspace
Arik Nemtsov [Wed, 11 Jun 2014 14:18:25 +0000 (17:18 +0300)]
mac80211: add API to request TDLS operation from userspace

Write a mac80211 to the cfg80211 API for requesting a userspace TDLS
operation. Define TDLS specific reason codes that can be used here.

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agomac80211: implement proper Tx path flushing for TDLS
Arik Nemtsov [Wed, 11 Jun 2014 14:18:24 +0000 (17:18 +0300)]
mac80211: implement proper Tx path flushing for TDLS

As the spec mandates, flush data in the AP path before transmitting the
first setup frame. Data packets transmitted during setup are already
dropped in the Tx path.

For the teardown flow, flush all packets in the direct path before
transmitting the teardown frame. Un-authorize the peer sta after teardown
is sent, forcing all subsequent Tx to the peer through the AP.

Make sure to flush the queues when disabling the link to get the
teardown packet out.

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
[adjust to Luca's new quuee API and stop only vif queues]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agomac80211: split tdls_mgmt function
Arik Nemtsov [Wed, 11 Jun 2014 14:18:23 +0000 (17:18 +0300)]
mac80211: split tdls_mgmt function

There are setup/teardown specific actions to be done that accompany
the sending of a TDLS management packet. Split the main function to
simplify future additions.

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agomac80211: use TDLS initiator in tdls_mgmt operations
Arik Nemtsov [Wed, 11 Jun 2014 14:18:22 +0000 (17:18 +0300)]
mac80211: use TDLS initiator in tdls_mgmt operations

The TDLS initiator is set once during link setup. If determines the
address ordering in the link identifier IE.
Use the value from userspace in order to have a correct teardown packet.
With the current code, a teardown from the responder side fails the TDLS
MIC check because of a bad link identifier IE.

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agocfg80211: pass TDLS initiator in tdls_mgmt operations
Arik Nemtsov [Wed, 11 Jun 2014 14:18:21 +0000 (17:18 +0300)]
cfg80211: pass TDLS initiator in tdls_mgmt operations

The TDLS initiator is set once during link setup. If determines the
address ordering in the link identifier IE.

Fix dependent drivers - mwifiex and mac80211.

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agomac80211: cleanup TDLS state during failed setup
Arik Nemtsov [Wed, 11 Jun 2014 14:18:20 +0000 (17:18 +0300)]
mac80211: cleanup TDLS state during failed setup

When setting up a TDLS session, register a delayed work to remove
the peer if setup times out. Prevent concurrent setups to support this
capacity.

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agomac80211: set auth flags after other station info
Arik Nemtsov [Wed, 11 Jun 2014 14:18:19 +0000 (17:18 +0300)]
mac80211: set auth flags after other station info

For TDLS, the AUTHORIZED flag arrives with all other important station
info (supported rates, HT/VHT caps, ...). Make sure to set the station
state in the low-level driver after transferring this information to
the mac80211 STA entry.
This aligns the STA information during sta_state callbacks with the
non-TDLS case.

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agomac80211: clarify TDLS Tx handling
Arik Nemtsov [Wed, 11 Jun 2014 14:18:18 +0000 (17:18 +0300)]
mac80211: clarify TDLS Tx handling

Rename the flags used in the Tx path and add an explanation for the
reasons to drop, send directly or through the AP.

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agomac80211: stop only the queues assigned to the vif during channel switch
Luciano Coelho [Fri, 13 Jun 2014 13:30:07 +0000 (16:30 +0300)]
mac80211: stop only the queues assigned to the vif during channel switch

Instead of stopping all the hardware queues during channel switch,
which is especially bad when we have large CSA counts, stop only the
queues that are assigned to the vif that is performing the channel
switch.

Additionally, check for (sdata->csa_block_tx) instead of calling
ieee80211_csa_needs_block_tx(), which can now be removed.

Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agomac80211: add functions to stop and wake all queues assigned to a vif
Luciano Coelho [Fri, 13 Jun 2014 13:30:06 +0000 (16:30 +0300)]
mac80211: add functions to stop and wake all queues assigned to a vif

In some cases we may want to stop the queues of a single vif (for
instance during a channel-switch).  Add a function that stops all the
queues that are assigned to a vif.  If a queue is assigned to more
than one vif, the corresponding netdev subqueue of the other vif(s)
will also be stopped.  If the HW doesn't set the
IEEE80211_HW_QUEUE_CONTROL flag, then all queues are stopped.

Also add a corresponding function to wake the queues of a vif back.

Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agomac80211: introduce refcount for queue_stop_reasons
Luciano Coelho [Fri, 13 Jun 2014 13:30:05 +0000 (16:30 +0300)]
mac80211: introduce refcount for queue_stop_reasons

Sometimes different vifs may be stopping the queues for the same
reason (e.g. when several interfaces are performing a channel switch).
Instead of using a bitmask for the reasons, use an integer that holds
a refcount instead.  In order to keep it backwards compatible,
introduce a boolean in some functions that tell us whether the queue
stopping should be refcounted or not.  For now, use not refcounted for
all calls to keep it functionally the same as before.

Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agomac80211: don't stop all queues when flushing
Luciano Coelho [Fri, 13 Jun 2014 13:30:04 +0000 (16:30 +0300)]
mac80211: don't stop all queues when flushing

There is no need to stop all queues when we want to flush specific
queues, so stop only the queues that will be flushed.

Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agonet: Mac80211: Remove silly timespec dance
Thomas Gleixner [Wed, 11 Jun 2014 23:59:18 +0000 (23:59 +0000)]
net: Mac80211: Remove silly timespec dance

Converting time from one format to another seems to give coders a warm
and fuzzy feeling.

Use the proper interfaces.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: John Stultz <john.stultz@linaro.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: John W. Linville <linville@tuxdriver.com>
[fix compile error]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agomac80211_hwsim: clean up own address matching
Johannes Berg [Thu, 12 Jun 2014 20:34:49 +0000 (22:34 +0200)]
mac80211_hwsim: clean up own address matching

Using perm_addr is always wrong, it may be reassigned by
anyone using standard netdev APIs. Remove that from the
match function and also use the match function where only
the perm_addr was used now.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agomac80211: Use ktime_get_ts()
Thomas Gleixner [Wed, 11 Jun 2014 23:59:14 +0000 (23:59 +0000)]
mac80211: Use ktime_get_ts()

do_posix_clock_monotonic_gettime() is a leftover from the initial
posix timer implementation which maps to ktime_get_ts().

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agomac80211: use csa counter offsets instead of csa_active
Michal Kazior [Thu, 5 Jun 2014 12:21:37 +0000 (14:21 +0200)]
mac80211: use csa counter offsets instead of csa_active

vif->csa_active is protected by mutexes only. This
means it is unreliable to depend on it on codeflow
in non-sleepable beacon and CSA code. There was no
guarantee to have vif->csa_active update be
visible before beacons are updated on SMP systems.

Using csa counter offsets which are embedded in
beacon struct (and thus are protected with single
RCU assignment) is much safer.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agomac80211: move csa counters from sdata to beacon/presp
Michal Kazior [Thu, 5 Jun 2014 12:21:36 +0000 (14:21 +0200)]
mac80211: move csa counters from sdata to beacon/presp

Having csa counters part of beacon and probe_resp
structures makes it easier to get rid of possible
races between setting a beacon and updating
counters on SMP systems by guaranteeing counters
are always consistent against given beacon struct.

While at it relax WARN_ON into WARN_ON_ONCE to
prevent spamming logs and racing.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
[remove pointless array check]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agomac80211: allow tx via monitor iface when DFS
Janusz Dziedzic [Thu, 5 Jun 2014 06:12:57 +0000 (08:12 +0200)]
mac80211: allow tx via monitor iface when DFS

Allow send frames using monitor interface
when DFS chandef and we pass CAC (beaconing
allowed).

This fix problem when old kernel and new backports used,
in such case hostapd create/use also monitor interface.
Before this patch all frames hostapd send using monitor
iface were dropped when AP was configured on DFS channel.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agocfg80211: make ethtool the driver's responsibility
Johannes Berg [Wed, 4 Jun 2014 15:31:56 +0000 (17:31 +0200)]
cfg80211: make ethtool the driver's responsibility

Currently, cfg80211 tries to implement ethtool, but that doesn't
really scale well, with all the different operations. Make the
lower-level driver responsible for it, which currently only has
an effect on mac80211. It will similarly not scale well at that
level though, since mac80211 also has many drivers.

To cleanly implement this in mac80211, introduce a new file and
move some code to appropriate places.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agomac80211: remove weak WEP IV accounting
Johannes Berg [Wed, 4 Jun 2014 15:06:23 +0000 (17:06 +0200)]
mac80211: remove weak WEP IV accounting

Since WEP is practically dead, there seems very little
point in keeping WEP weak IV accounting.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agotrivial: net/mac80211/mesh.c: fix typo s/Substract/Subtract/
Antonio Ospite [Wed, 4 Jun 2014 12:03:49 +0000 (14:03 +0200)]
trivial: net/mac80211/mesh.c: fix typo s/Substract/Subtract/

Signed-off-by: Antonio Ospite <ao2@ao2.it>
Cc: Luis Carlos Cobo <luisca@cozybit.com>
Cc: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-wireless@vger.kernel.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agomac80211: remove ignore_plink_timer flag
Bob Copeland [Wed, 4 Jun 2014 13:27:31 +0000 (09:27 -0400)]
mac80211: remove ignore_plink_timer flag

The mesh_plink code is doing some interesting things with the
ignore_plink_timer flag.  It seems the original intent was to
handle this race:

cpu 0                           cpu 1
-----                           -----
                                start timer handler for state X
acquire sta_lock
change state from X to Y
mod_timer() / del_timer()
release sta_lock
                                acquire sta_lock
                                execute state Y timer too soon

However, using the mod_timer()/del_timer() return values to
detect these cases is broken.  As a result, timers get ignored
unnecessarily, and stations can get stuck in the peering state
machine.

Instead, we can detect the case by looking at the timer expiration.
In the case of del_timer, just ignore the timers in the following
(LISTEN/ESTAB) states since they won't have timers anyway.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agomac80211: fix station/driver powersave race
Johannes Berg [Tue, 27 May 2014 14:32:27 +0000 (16:32 +0200)]
mac80211: fix station/driver powersave race

It is currently possible to have a race due to the station PS
unblock work like this:
 * station goes to sleep with frames buffered in the driver
 * driver blocks wakeup
 * station wakes up again
 * driver flushes/returns frames, and unblocks, which schedules
   the unblock work
 * unblock work starts to run, and checks that the station is
   awake (i.e. that the WLAN_STA_PS_STA flag isn't set)
 * we process a received frame with PM=1, setting the flag again
 * ieee80211_sta_ps_deliver_wakeup() runs, delivering all frames
   to the driver, and then clearing the WLAN_STA_PS_DRIVER and
   WLAN_STA_PS_STA flags

In this scenario, mac80211 will think that the station is awake,
while it really is asleep, and any TX'ed frames should be filtered
by the device (it will know that the station is sleeping) but then
passed to mac80211 again, which will not buffer it either as it
thinks the station is awake, and eventually the packets will be
dropped.

Fix this by moving the clearing of the flags to exactly where we
learn about the situation. This creates a problem of reordering,
so introduce another flag indicating that delivery is being done,
this new flag also queues frames and is cleared only while the
spinlock is held (which the queuing code also holds) so that any
concurrent delivery/TX is handled correctly.

Reported-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agomac80211: remove PID rate control
John W. Linville [Fri, 30 May 2014 14:47:28 +0000 (10:47 -0400)]
mac80211: remove PID rate control

Minstrel has long since proven its worth.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agoath9k: Fix build error in ath_reset_internal
Rajkumar Manoharan [Fri, 20 Jun 2014 17:17:49 +0000 (22:47 +0530)]
ath9k: Fix build error in ath_reset_internal

drivers/net/wireless/ath/ath9k/main.c:299 ath_reset_internal()
error: we previously assumed 'hchan' could be null (see line 293)

Cc: Felix Fietkau <nbd@openwrt.org>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agob43: add config for (en|dis)abling G-PHY support
Rafał Miłecki [Fri, 20 Jun 2014 15:22:01 +0000 (17:22 +0200)]
b43: add config for (en|dis)abling G-PHY support

This allows new devices users to save some space.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agob43: remove leftover code from old devices support
Rafał Miłecki [Fri, 20 Jun 2014 15:22:00 +0000 (17:22 +0200)]
b43: remove leftover code from old devices support

Old devices (A-PHY or B-PHY) are supposed to be supported by b43legacy.
We keep phy_a.c as it's needed for G-PHY which shares some design.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowil6210: fix for 64-bit integer division
Vladimir Kondratiev [Fri, 20 Jun 2014 07:05:07 +0000 (10:05 +0300)]
wil6210: fix for 64-bit integer division

On some platforms, cycles_t is 64-bit, and gcc generates call to
__udivdi3 for straight division of cycles_t/cycles_t. This leads
to compilation failure, as this function is not exist in the kernel
runtime. do_div() to rescue

Original report:

tree:   git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next.git master
head:   2e91606f5e1ec7329557dfc0e298c4c021acbb80
commit: 7c0acf868d2e470c9d6a40091acf8d6444c01b57 [81/103] wil6210: Tx performance monitoring
config: i386-randconfig-ha3-0620 (attached as .config)

All error/warnings:

   drivers/built-in.o: In function `wil_vring_debugfs_show':
>> debugfs.c:(.text+0x39b9be): undefined reference to `__udivdi3'

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agomwifiex: Use the proper interfaces
Thomas Gleixner [Fri, 20 Jun 2014 04:48:12 +0000 (21:48 -0700)]
mwifiex: Use the proper interfaces

Why is converting time formats so desired if there are proper
interfaces for this?

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoPCMCIA_HERMES: ioport_map/unmap relies on HAS_IOPORT_MAP
Fabian Frederick [Wed, 18 Jun 2014 17:55:38 +0000 (19:55 +0200)]
PCMCIA_HERMES: ioport_map/unmap relies on HAS_IOPORT_MAP

Fixing following sh-allmodconfig errors reported on kisskb

"
drivers/net/wireless/orinoco/orinoco_cs.c:153:2: error: implicit declaration of function 'ioport_map' [-Werror=implicit-function-declaration]
drivers/net/wireless/orinoco/orinoco_cs.c:205:3: error: implicit declaration of function 'ioport_unmap' [-Werror=implicit-function-declaration]
"

Cc: "John W. Linville" <linville@tuxdriver.com>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: linux-wireless@vger.kernel.org
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoLIBERTAS_CS: ioport_map/unmap relies on HAS_IOPORT_MAP
Fabian Frederick [Wed, 18 Jun 2014 17:48:02 +0000 (19:48 +0200)]
LIBERTAS_CS: ioport_map/unmap relies on HAS_IOPORT_MAP

Fixing following sh-allmodconfig errors reported on kisskb

"
drivers/net/wireless/libertas/if_cs.c:826:3: error: implicit declaration of function 'ioport_unmap' [-Werror=implicit-function-declaration]
drivers/net/wireless/libertas/if_cs.c:878:2: error: implicit declaration of function 'ioport_map' [-Werror=implicit-function-declaration]
"

Cc: "John W. Linville" <linville@tuxdriver.com>
Cc: Dan Williams <dcbw@redhat.com>
Cc: linux-wireless@vger.kernel.org
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoSPECTRUM_CS: ioport_map/unmap relies on HAS_IOPORT_MAP
Fabian Frederick [Wed, 18 Jun 2014 17:43:31 +0000 (19:43 +0200)]
SPECTRUM_CS: ioport_map/unmap relies on HAS_IOPORT_MAP

Fixing following sh-allmodconfig errors reported on kisskb

"
drivers/net/wireless/orinoco/spectrum_cs.c:216:2: error: implicit declaration of function 'ioport_map' [-Werror=implicit-function-declaration]
drivers/net/wireless/orinoco/spectrum_cs.c:273:3: error: implicit declaration of function 'ioport_unmap' [-Werror=implicit-function-declaration]
"

Cc: "John W. Linville" <linville@tuxdriver.com>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: linux-wireless@vger.kernel.org
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agodrivers/net/wireless/rt2x00/rt2x00dev.c: remove null test before kfree
Fabian Frederick [Wed, 18 Jun 2014 14:51:29 +0000 (16:51 +0200)]
drivers/net/wireless/rt2x00/rt2x00dev.c: remove null test before kfree

Fix checkpatch warning:
WARNING: kfree(NULL) is safe this check is probably not required

Cc: Ivo van Doorn <IvDoorn@gmail.com>
Cc: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowil6210: track Tx queue state
Vladimir Kondratiev [Mon, 16 Jun 2014 16:37:23 +0000 (19:37 +0300)]
wil6210: track Tx queue state

Provide both event (netif_tx_[stop|wake]) tracking via printk;
and state via debugfs 'info'

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowil6210: interrupt statistics
Vladimir Kondratiev [Mon, 16 Jun 2014 16:37:22 +0000 (19:37 +0300)]
wil6210: interrupt statistics

Track number of interrupts and Tx/Rx packets;
expose through debugfs 'info'. Reset upon read.
Used to analyse effectivness of interrupt coalescing and NAPI.
Read twice with some interval like
cat info > /dev/null; sleep 1; cat info

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowil6210: add 'info' debugfs entry
Vladimir Kondratiev [Mon, 16 Jun 2014 16:37:21 +0000 (19:37 +0300)]
wil6210: add 'info' debugfs entry

Use 'info' debugfs entry for misc. assorted information.
Start with indication whether platform is AC-powered;
will use it later for power related decisions

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowil6210: work around for platforms with broken INTx
Vladimir Kondratiev [Mon, 16 Jun 2014 16:37:20 +0000 (19:37 +0300)]
wil6210: work around for platforms with broken INTx

There are platforms where INTx can't be routed by ACPI,
this leads to pci_enable_device failure. Re-try pretending we have
MSI already configured; in this case pci_enable_device do not try
to configure INTx. However, MSI could still work.

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowil6210: fix for unreachable code in wmi_recv_cmd
Vladimir Kondratiev [Mon, 16 Jun 2014 16:37:19 +0000 (19:37 +0300)]
wil6210: fix for unreachable code in wmi_recv_cmd

As reported by Dan Carpenter <dan.carpenter@oracle.com>:

The patch a715c7ddd65a: "wil6210: improve debug for WMI receive" from
May 29, 2014, leads to the following static checker warning:

        drivers/net/wireless/ath/wil6210/wmi.c:746 wmi_recv_cmd()
        info: ignoring unreachable code.

drivers/net/wireless/ath/wil6210/wmi.c
   739                  spin_unlock_irqrestore(&wil->wmi_ev_lock, flags);
   740                  {
   741                          int q = queue_work(wil->wmi_wq,
   742                                             &wil->wmi_event_worker);
   743                          wil_dbg_wmi(wil, "queue_work -> %d\n", q);
   744                  }
   745          }
   746          if (n > 1)
                ^^^^^^^^^^
We never reach this if statemtent.

   747                  wil_dbg_wmi(wil, "%s -> %d events processed\n", __func__, n);
   748  }

Exit loop with "break", not "return".

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowil6210: map additional registers on target
Vladimir Kondratiev [Mon, 16 Jun 2014 16:37:18 +0000 (19:37 +0300)]
wil6210: map additional registers on target

New registers area introduced, mark corresponded address range as valid

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowil6210: remove unused #include
Vladimir Kondratiev [Mon, 16 Jun 2014 16:37:17 +0000 (19:37 +0300)]
wil6210: remove unused #include

In the pcie_bus.c, knowledge about debugfs is not necessary

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowil6210: fix disconnect handling for AP
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>
10 years agowil6210: avoid dmesg pollution by Tx errors
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>
10 years agowil6210: Debug print GRO Rx result
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>
10 years agowil6210: add 'freq' and 'link' debugfs entries
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>
10 years agowil6210: Use "name = value" format in the debugfs
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>
10 years agowil6210: debug print when scan request state changes
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>
10 years agowil6210: print error when notifying about FW error
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>
10 years agowil6210: writeable ITR registers
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>