pandora-kernel.git
9 years agoath9k_htc: avoid kernel panic in ath9k_hw_reset
Marek Puzyniak [Tue, 7 Oct 2014 15:04:30 +0000 (17:04 +0200)]
ath9k_htc: avoid kernel panic in ath9k_hw_reset

hw pointer of ath_hw is not assigned to proper value
in function ath9k_hw_reset what finally causes kernel panic.
This can be solved by proper initialization of ath_hw in
ath9k_init_priv.

Signed-off-by: Marek Puzyniak <marek.puzyniak@tieto.com>
Acked-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agoath9k: Fix crash in MCC mode
Sujith Manoharan [Tue, 7 Oct 2014 04:44:37 +0000 (10:14 +0530)]
ath9k: Fix crash in MCC mode

When a channel context is removed, the hw_queue_base
is set to -1, this will result in a panic because
ath9k_chanctx_stop_queues() can be called on an interface
that is not assigned to any context yet - for example,
when trying to scan.

Fix this issue by setting the hw_queue_base to zero
when a channel context is removed.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agoath: Fix smatch warning
Sujith Manoharan [Tue, 7 Oct 2014 04:44:36 +0000 (10:14 +0530)]
ath: Fix smatch warning

drivers/net/wireless/ath/main.c:88 ath_printk()
 error: we previously assumed 'common->hw' could be null (see line 82)

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agortl818x_pci: fix response rate may be incorrect.
Andrea Merello [Mon, 6 Oct 2014 18:23:55 +0000 (20:23 +0200)]
rtl818x_pci: fix response rate may be incorrect.

Currently the allowed "respose rate" set (rates for HW generated frames
like ACKs) is the same as the basic rate set.

The HW will use the higher allowed response rate that is lower than the
rate of the received frame.

This is more or less what IEEE80211 mandates, but I missed the fact
that IEEE80211 also says that whenever it happens that for a modulation
class there is no any rate in the basic rates set, then the response rate
set shall include also all the mandatory rates for that modulation class.

This patch adds mandatory OFDM rates to the allowed response rate set if
no OFDM rate is included in the basic rate set.

Depending by the AP, I faced cases in which this patch seems to cause a
noticeable perfomance improvement.

- With my usual test AP there is no particular perfomance difference.
- With a prism54/hostapd AP this patch causes RX thoughput increase from
  about 5Mbps to about 20Mbps.

Hopefully this patch may help people that faced performance regression wrt
the old staging driver.

Signed-off-by: Andrea Merello <andrea.merello@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
John W. Linville [Tue, 7 Oct 2014 18:48:29 +0000 (14:48 -0400)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless

9 years agortlwifi: Fix static checker warnings for various drivers
Larry Finger [Thu, 2 Oct 2014 17:00:54 +0000 (12:00 -0500)]
rtlwifi: Fix static checker warnings for various drivers

Indenting errors yielded the following static checker warnings:

drivers/net/wireless/rtlwifi/rtl8192ee/hw.c:533 rtl92ee_set_hw_reg() warn: add curly braces? (if)
drivers/net/wireless/rtlwifi/rtl8192ee/hw.c:539 rtl92ee_set_hw_reg() warn: add curly braces? (if)

An unreleased version of the static checker also reported:

drivers/net/wireless/rtlwifi/rtl8723be/trx.c:550 rtl8723be_rx_query_desc() warn: 'hdr' can't be NULL.
drivers/net/wireless/rtlwifi/rtl8188ee/trx.c:621 rtl88ee_rx_query_desc() warn: 'hdr' can't be NULL.
drivers/net/wireless/rtlwifi/rtl8192ee/trx.c:567 rtl92ee_rx_query_desc() warn: 'hdr' can't be NULL.
drivers/net/wireless/rtlwifi/rtl8821ae/trx.c:758 rtl8821ae_rx_query_desc() warn: 'hdr' can't be NULL.
drivers/net/wireless/rtlwifi/rtl8723ae/trx.c:494 rtl8723e_rx_query_desc() warn: 'hdr' can't be NULL.
drivers/net/wireless/rtlwifi/rtl8192se/trx.c:315 rtl92se_rx_query_desc() warn: 'hdr' can't be NULL.
drivers/net/wireless/rtlwifi/rtl8192ce/trx.c:392 rtl92ce_rx_query_desc() warn: 'hdr' can't be NULL.

All of these are fixed.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agortlwifi: Fix Kconfig for RTL8192EE
Larry Finger [Thu, 2 Oct 2014 17:00:53 +0000 (12:00 -0500)]
rtlwifi: Fix Kconfig for RTL8192EE

The driver needs btcoexist, but Kconfig fails to select it. This omission
could cause build errors for some configurations.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agoath9k: Fix flushing in MCC mode
Sujith Manoharan [Thu, 2 Oct 2014 01:03:20 +0000 (06:33 +0530)]
ath9k: Fix flushing in MCC mode

When we are attempting to switch to a new
channel context, the TX queues are flushed, but
the mac80211 queues are not stopped and traffic
can still come down to the driver.

This patch fixes it by stopping the queues
assigned to the current context/vif before
trying to flush.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agoath9k: Fix queue handling for channel contexts
Sujith Manoharan [Thu, 2 Oct 2014 01:03:19 +0000 (06:33 +0530)]
ath9k: Fix queue handling for channel contexts

When a full chip reset is done, all the queues
across all VIFs are stopped, but if MCC is enabled,
only the queues of the current context is awakened,
when we complete the reset.

This results in unfairness for the inactive context.
Since frames are queued internally in the driver if
there is a context mismatch, we can awaken all the
queues when coming out of a reset.

The VIF-specific queues are still used in flow control,
to ensure fairness when traffic is high.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agoath9k: Add ath9k_chanctx_stop_queues()
Sujith Manoharan [Thu, 2 Oct 2014 01:03:18 +0000 (06:33 +0530)]
ath9k: Add ath9k_chanctx_stop_queues()

This can be used when the queues of a context
needs to be stopped.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agoath9k: Pass context to ath9k_chanctx_wake_queues()
Sujith Manoharan [Thu, 2 Oct 2014 01:03:17 +0000 (06:33 +0530)]
ath9k: Pass context to ath9k_chanctx_wake_queues()

Change the ath9k_chanctx_wake_queues() API so
that we can pass the channel context that needs its
queues to be stopped.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agoath9k: Fix queue handling in flush()
Sujith Manoharan [Thu, 2 Oct 2014 01:03:16 +0000 (06:33 +0530)]
ath9k: Fix queue handling in flush()

When draining of the TX queues fails, a
full HW reset is done. ath_reset() makes sure
that the queues in mac80211 are restarted,
so there is no need to wake them up again.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agoath9k: Remove duplicate code
Sujith Manoharan [Thu, 2 Oct 2014 01:03:15 +0000 (06:33 +0530)]
ath9k: Remove duplicate code

ath9k_has_tx_pending() can be used to
check if there are pending frames instead
of having duplicate code.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agoath9k: Fix pending frame check
Sujith Manoharan [Thu, 2 Oct 2014 01:03:14 +0000 (06:33 +0530)]
ath9k: Fix pending frame check

Checking for the queue depth outside of
the TX queue lock is incorrect and in this
case, is not required since it is done inside
ath9k_has_pending_frames().

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agoath9k: Check pending frames properly
Sujith Manoharan [Thu, 2 Oct 2014 01:03:13 +0000 (06:33 +0530)]
ath9k: Check pending frames properly

There is no need to check if the current
channel context has active ACs queued up
if the TX queue is not empty.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agoath9k: Print RoC expiration
Sujith Manoharan [Thu, 2 Oct 2014 01:03:12 +0000 (06:33 +0530)]
ath9k: Print RoC expiration

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agomwifiex: add support for SD8887 chipset
Avinash Patil [Wed, 1 Oct 2014 17:55:26 +0000 (10:55 -0700)]
mwifiex: add support for SD8887 chipset

This patch adds SD8887 support to mwifiex.
SD8887 is Marvell's 1x1 11ac solution.

The corresponding firmware image file is located at:
"mrvl/sd8887_uapsta.bin"

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: Frank Huang <frankh@marvell.com>
Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agomwifiex: few more register offset entries for sdio card structure
Avinash Patil [Wed, 1 Oct 2014 17:55:25 +0000 (10:55 -0700)]
mwifiex: few more register offset entries for sdio card structure

This patch adds some more defitions to card specific register structure
and removes static defines for these registers.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agowil6210: atomic I/O for the card memory
Vladimir Kondratiev [Wed, 1 Oct 2014 12:05:25 +0000 (15:05 +0300)]
wil6210: atomic I/O for the card memory

Introduce netdev IOCTLs, to be used by the debug tools.

Allows to read/write single dword value or
memory block, aligned to dword
Different address modes supported:
- BAR offset
- Firmware "linker" address
- target's AHB bus

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agowil6210: manual FW error recovery mode
Vladimir Kondratiev [Wed, 1 Oct 2014 12:05:24 +0000 (15:05 +0300)]
wil6210: manual FW error recovery mode

Introduce manual FW recovery mode. It is activated if module parameter
@no_fw_recovery set to true. May be changed at runtime.

Recovery information provided by new "recovery" debugfs file. It prints:

mode = [auto|manual]
state = [idle|pending|running]

In manual mode, after FW error, recovery won't start automatically. Instead,
after notification to user space, recovery waits in "pending" state, as indicated by the
"recovery" debugfs file. User space tools may perform data collection and allow to
continue recovery by writing "run" to the "recovery" debugfs file.
Alternatively, recovery pending may be canceled by stopping network interface
i.e. 'ifconfig wlan0 down'

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agoath: Add support for tracing
Sujith Manoharan [Sat, 27 Sep 2014 07:57:45 +0000 (13:27 +0530)]
ath: Add support for tracing

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agoMerge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetoot...
John W. Linville [Thu, 2 Oct 2014 17:56:19 +0000 (13:56 -0400)]
Merge branch 'for-upstream' of git://git./linux/kernel/git/bluetooth/bluetooth-next

9 years agoBluetooth: 6lowpan: Check transmit errors for multicast packets
Jukka Rissanen [Wed, 1 Oct 2014 12:59:15 +0000 (15:59 +0300)]
Bluetooth: 6lowpan: Check transmit errors for multicast packets

We did not return error if multicast packet transmit failed.
This might not be desired so return error also in this case.
If there are multiple 6lowpan devices where the multicast packet
is sent, then return error even if sending to only one of them fails.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
9 years agoBluetooth: 6lowpan: Return EAGAIN error also for multicast packets
Jukka Rissanen [Wed, 1 Oct 2014 12:59:14 +0000 (15:59 +0300)]
Bluetooth: 6lowpan: Return EAGAIN error also for multicast packets

Make sure that we are able to return EAGAIN from l2cap_chan_send()
even for multicast packets. The error code was ignored unncessarily.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
9 years agoBluetooth: 6lowpan: Avoid memory leak if memory allocation fails
Jukka Rissanen [Wed, 1 Oct 2014 08:30:57 +0000 (11:30 +0300)]
Bluetooth: 6lowpan: Avoid memory leak if memory allocation fails

If skb_unshare() returns NULL, then we leak the original skb.
Solution is to use temp variable to hold the new skb.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
9 years agoBluetooth: 6lowpan: Memory leak as the skb is not freed
Jukka Rissanen [Wed, 1 Oct 2014 08:30:26 +0000 (11:30 +0300)]
Bluetooth: 6lowpan: Memory leak as the skb is not freed

The earlier multicast commit 36b3dd250dde ("Bluetooth: 6lowpan:
Ensure header compression does not corrupt IPv6 header") lost one
skb free which then caused memory leak.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
9 years agoBluetooth: Fix lockdep warning with l2cap_chan_connect
Johan Hedberg [Thu, 2 Oct 2014 07:16:22 +0000 (10:16 +0300)]
Bluetooth: Fix lockdep warning with l2cap_chan_connect

The L2CAP connection's channel list lock (conn->chan_lock) must never be
taken while already holding a channel lock (chan->lock) in order to
avoid lock-inversion and lockdep warnings. So far the l2cap_chan_connect
function has acquired the chan->lock early in the function and then
later called l2cap_chan_add(conn, chan) which will try to take the
conn->chan_lock. This violates the correct order of taking the locks and
may lead to the following type of lockdep warnings:

-> #1 (&conn->chan_lock){+.+...}:
       [<c109324d>] lock_acquire+0x9d/0x140
       [<c188459c>] mutex_lock_nested+0x6c/0x420
       [<d0aab48e>] l2cap_chan_add+0x1e/0x40 [bluetooth]
       [<d0aac618>] l2cap_chan_connect+0x348/0x8f0 [bluetooth]
       [<d0cc9a91>] lowpan_control_write+0x221/0x2d0 [bluetooth_6lowpan]
-> #0 (&chan->lock){+.+.+.}:
       [<c10928d8>] __lock_acquire+0x1a18/0x1d20
       [<c109324d>] lock_acquire+0x9d/0x140
       [<c188459c>] mutex_lock_nested+0x6c/0x420
       [<d0ab05fd>] l2cap_connect_cfm+0x1dd/0x3f0 [bluetooth]
       [<d0a909c4>] hci_le_meta_evt+0x11a4/0x1260 [bluetooth]
       [<d0a910eb>] hci_event_packet+0x3ab/0x3120 [bluetooth]
       [<d0a7cb08>] hci_rx_work+0x208/0x4a0 [bluetooth]

       CPU0                    CPU1
       ----                    ----
  lock(&conn->chan_lock);
                               lock(&chan->lock);
                               lock(&conn->chan_lock);
  lock(&chan->lock);

Before calling l2cap_chan_add() the channel is not part of the
conn->chan_l list, and can therefore only be accessed by the L2CAP user
(such as l2cap_sock.c). We can therefore assume that it is the
responsibility of the user to handle mutual exclusion until this point
(which we can see is already true in l2cap_sock.c by it in many places
touching chan members without holding chan->lock).

Since the hci_conn and by exctension l2cap_conn creation in the
l2cap_chan_connect() function depend on chan details we cannot simply
add a mutex_lock(&conn->chan_lock) in the beginning of the function
(since the conn object doesn't yet exist there). What we can do however
is move the chan->lock taking later into the function where we already
have the conn object and can that way take conn->chan_lock first.

This patch implements the above strategy and does some other necessary
changes such as using __l2cap_chan_add() which assumes conn->chan_lock
is held, as well as adding a second needed label so the unlocking
happens as it should.

Reported-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Tested-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Acked-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
9 years agortlwifi: Fix randconfig build error with next-20140930
Larry Finger [Tue, 30 Sep 2014 16:18:21 +0000 (11:18 -0500)]
rtlwifi: Fix randconfig build error with next-20140930

Configuration randconfig-1412075201 gets an error because driver rtl8821ae
depends on driver btcoexist, but Kconfig does not select it.

Reported-by: Jim Davis <jim.epost@gmail.com>
Cc: Jim Davis <jim.epost@gmail.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agomwifiex: add client mac address while configuring keys on GO.
Maithili Hinge [Tue, 30 Sep 2014 10:59:38 +0000 (16:29 +0530)]
mwifiex: add client mac address while configuring keys on GO.

When mwifiex device becomes GO, unicast traffic between client1 and GO stops
when client2 connects to GO. Reason behind this was PTK getting
overwritten by key_material command for client2 as it did not have client
mac address. So, client1 can no more decode GO's ping packets though it
responds to its broadcast packets.

This patch adds case to check for BSS_ROLE instead of bss_type to set
client mac address while configuring keys when device becomes GO.

Signed-off-by: Maithili Hinge <maithili@marvell.com>
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agoath9k: fix getting tx duration for dynack
Felix Fietkau [Tue, 30 Sep 2014 09:24:23 +0000 (11:24 +0200)]
ath9k: fix getting tx duration for dynack

On AR9003, tx control and tx status are in separate descriptor rings.
Tx duration is extracted from the tx control descriptor data, which
ar9003_hw_proc_txdesc cannot access.

Fix getting the duration by adding a separate callback for it.

Acked-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agoath9k: Check early for HW reset
Sujith Manoharan [Tue, 30 Sep 2014 08:45:23 +0000 (14:15 +0530)]
ath9k: Check early for HW reset

chan_lock is not required for checking if
we are in the middle of a HW reset, so do it
early. This also removes the small window
where the lock is dropped and reacquired.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agobrcmfmac: Add wowl support for PCIE devices.
Hante Meuleman [Tue, 30 Sep 2014 08:23:18 +0000 (10:23 +0200)]
brcmfmac: Add wowl support for PCIE devices.

Add basic wowl (magic packet and disconnect) support. This patch adds
this support only for PCIE bus devices. This feature requires FW which
has support for wowl built in.

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>
9 years agobrcmfmac: Fix crash on cleanup.
Hante Meuleman [Tue, 30 Sep 2014 08:23:17 +0000 (10:23 +0200)]
brcmfmac: Fix crash on cleanup.

When driver gets unloaded due to error situation there is a chance
a packet gets received while fws has already been cleaned up. This
will result in kernel crash. This patch adds a check to avoid this
crash.

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>
9 years agobrcmfmac: assure P2P discovery is disabled when setting P2P_DEVICE mac address
Arend van Spriel [Tue, 30 Sep 2014 08:23:16 +0000 (10:23 +0200)]
brcmfmac: assure P2P discovery is disabled when setting P2P_DEVICE mac address

In order to provision the P2P_DEVICE mac address using p2p_da_override iovar
the discovery interface must be disabled. On some targets setting the mac
address failed so disable the discovery interface to be certain.

Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@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>
9 years agobrcmfmac: Avoid usage of GFP_ATOMIC.
Hante Meuleman [Tue, 30 Sep 2014 08:23:15 +0000 (10:23 +0200)]
brcmfmac: Avoid usage of GFP_ATOMIC.

Msgbuf is using GFP_ATOMIC where GFP_KERNEL is also sufficient. On
some platforms the coherent DMA memory is very limited when using
GFP_ATOMIC. This patch changes usage of GFP_ATOMIC to GFP_KERNEL and
uses worker to make this possible for creation of flowring.

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>
9 years agobrcmfmac: Fix sign issue with IOCTL return code in msgbuf.
Hante Meuleman [Tue, 30 Sep 2014 08:23:14 +0000 (10:23 +0200)]
brcmfmac: Fix sign issue with IOCTL return code in msgbuf.

Need a cast to assure correct value is propagated.

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>
9 years agobrcmfmac: On scan timeout do send received results.
Hante Meuleman [Tue, 30 Sep 2014 08:23:13 +0000 (10:23 +0200)]
brcmfmac: On scan timeout do send received results.

Increase driver scan timeout from 8 to 10 seconds and report results
to cfg80211. Without this patch the already received results were
dropped on driver timeout.

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>
9 years agoath9k_hw: fix PLL clock initialization for newer SoC
Felix Fietkau [Mon, 29 Sep 2014 18:45:42 +0000 (20:45 +0200)]
ath9k_hw: fix PLL clock initialization for newer SoC

On AR934x and newer SoC devices, the layout of the AR_RTC_PLL_CONTROL
register changed. This currently breaks at least 5/10 MHz operation.
AR933x uses the old layout.

It might also have been causing other stability issues because of the
different location of the PLL_BYPASS bit which needs to be set during
PLL clock initialization.

This patch also removes more instances of hardcoded register values in
favor of properly computed ones with the PLL_BYPASS bit added.

Reported-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agoath9k_hw: reduce ANI spur immunity setting on HT40 extension channel
Felix Fietkau [Mon, 29 Sep 2014 18:45:41 +0000 (20:45 +0200)]
ath9k_hw: reduce ANI spur immunity setting on HT40 extension channel

The cycpwr_thr1 value needs to be lower on the extension channel than on
the control channel, similar to how the register settings are programmed
in the initvals.

Also drop the unnecessary check for HT40 - this register can always be
written. This patch has been reported to improve HT40 stability and
throughput in some environments.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agoRevert "ath9k_hw: reduce ANI firstep range for older chips"
Felix Fietkau [Mon, 29 Sep 2014 18:45:40 +0000 (20:45 +0200)]
Revert "ath9k_hw: reduce ANI firstep range for older chips"

This reverts commit 09efc56345be4146ab9fc87a55c837ed5d6ea1ab

I've received reports that this change is decreasing throughput in some
rare conditions on an AR9280 based device

Cc: stable@vger.kernel.org
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agomwifiex: remove unnecessary rx_q lock
Avinash Patil [Mon, 29 Sep 2014 16:14:15 +0000 (21:44 +0530)]
mwifiex: remove unnecessary rx_q lock

SKB lists have their own lock. So this lock is not needed.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agomwifiex: do not decrement rx_pending count twice
Avinash Patil [Mon, 29 Sep 2014 16:14:14 +0000 (21:44 +0530)]
mwifiex: do not decrement rx_pending count twice

This patch fixes an issue with rx processing function where we were
decrementing rx_pending count twice.

Patch also queues correct main_work item when rx_pending count reaches
low watermark.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agomwifiex: fix soft lockup during iperf UDP RX
Avinash Patil [Mon, 29 Sep 2014 16:14:13 +0000 (21:44 +0530)]
mwifiex: fix soft lockup during iperf UDP RX

A soft lockup was observed on ARM multicore platform while UDP
RX iperf was running on station.

Reason for this is delay_main_task was not taken into consideration while
jumping to process_start. Now if delay_main_task is true, we would exit
mwifiex_main_process instead of going to process_start again.
This ensure other process is scheduled on this CPU and soft lockup is avoided.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kevin Gan <ganhy@marvell.com>
Signed-off-by: Marc Yang <yangyang@marvell.com>
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agoMAINTAINERS: change rt2x00 maintainer
Stanislaw Gruszka [Sun, 28 Sep 2014 12:03:06 +0000 (14:03 +0200)]
MAINTAINERS: change rt2x00 maintainer

After short chat with Ivo, we decided that I'll take maintenance
of rt2x00 driver.

Thanks for Ivo's great work in the past!

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Ivo Van Doorn <ivdoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agoath9k_hw: disable hardware ad-hoc flag on ar934x rev 3
Felix Fietkau [Sat, 27 Sep 2014 20:49:44 +0000 (22:49 +0200)]
ath9k_hw: disable hardware ad-hoc flag on ar934x rev 3

On AR934x rev 3, settin the ad-hoc flag completely messes up hardware
state - beacons get stuck, almost no packets make it out, hardware is
constantly reset.

When leaving out that flag and setting up the hw like in AP mode, TSF
timers won't be automatically synced, but at least the rest works.

AR934x rev 2 and older are not affected by this bug

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agoath9k: use ah->get_mac_revision for all SoC devices if available
Felix Fietkau [Sat, 27 Sep 2014 20:49:43 +0000 (22:49 +0200)]
ath9k: use ah->get_mac_revision for all SoC devices if available

It is needed for AR934x as well

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agoath5k: add missing include for debug code
Felix Fietkau [Sat, 27 Sep 2014 16:05:47 +0000 (18:05 +0200)]
ath5k: add missing include for debug code

Needed for calling vmalloc()/vfree()

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agortlwifi: rtl8188ee: rtl8723ae: rtl8821ae: Initialize some variables
Larry Finger [Fri, 26 Sep 2014 21:40:28 +0000 (16:40 -0500)]
rtlwifi: rtl8188ee: rtl8723ae: rtl8821ae: Initialize some variables

In a number of places, kmalloc or valloc were used to acquire memory.
To ensure that these locations are correctly initialized, the calls were
changed to kzalloc and vzalloc. The change fixes a problem that was causing
HT operations to be cancelled.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agortlwifi: rtl8188ee: rtl8192com: rtl8192cu: rtl8192ee: rtl8723ae: rtl87323be: rtl8821a...
Larry Finger [Fri, 26 Sep 2014 21:40:27 +0000 (16:40 -0500)]
rtlwifi: rtl8188ee: rtl8192com: rtl8192cu: rtl8192ee: rtl8723ae: rtl87323be: rtl8821ae: Use common cmd_send_packet

A locking problem was found in routine _rtl92ee_cmd_send_packet() that led
to system freezes. Upon inspection, several drivers had the same problem;
however, the routines all used the same code. The common code has been
moved into rtlwifi.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agortlwifi: rtl8192ce: rtl8192common: Update for latest version of Realtek drivers
Larry Finger [Fri, 26 Sep 2014 21:40:26 +0000 (16:40 -0500)]
rtlwifi: rtl8192ce: rtl8192common: Update for latest version of Realtek drivers

Realtek released new drivers on 06/28/2014. These changes implement all their
changes into the kernel version of the driver. In addition, these modifications
are part of the process of unifying the Realtek and kernel code bases.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agortlwifi: rtl8723be: Update driver to match Realtek release of 06/28/14
Larry Finger [Fri, 26 Sep 2014 21:40:25 +0000 (16:40 -0500)]
rtlwifi: rtl8723be: Update driver to match Realtek release of 06/28/14

This patch updates the driver to match the latest Realtek release, and
it is an important step in getting the internal code source at Realtek to match
the code in the kernel. The primary reason for this is to make it easier for
Realtek to maintain the kernel source without requiring an intermediate like me.

In this process of merging the two source repositories, there are a lot
of changes in both, and this commit is rather large.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agortlwifi: rtl8723ae: Update driver to match 06/28/14 Realtek version
Larry Finger [Fri, 26 Sep 2014 21:40:24 +0000 (16:40 -0500)]
rtlwifi: rtl8723ae: Update driver to match 06/28/14 Realtek version

Not only does this patch update the driver to match the latest Realtek release,
it is an important step in getting the internal code source at Realtek to match
the code in the kernel. The primary reason for this is to make it easier for
Realtek to maintain the kernel source without requiring an intermediate like me.

In this process of merging the two source repositories, there are a lot
of changes in both, and this commit is rather large.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agortlwifi: rtl8192ee: Move driver from staging to the regular tree
Larry Finger [Fri, 26 Sep 2014 21:40:23 +0000 (16:40 -0500)]
rtlwifi: rtl8192ee: Move driver from staging to the regular tree

This driver was entered into staging a few cycles ago because there was
not time to integrate the Realtek version into the support routines in
the kernel. Now that there is an effort to converg the code base from Linux
and the Realtek repo, it is time to move this driver. In addition, all the
updates included in the 06/28/2014 version of the Realtek drivers are
included here.

With this change, it will be necessary to delete the staging driver. That
will be handled in a separate patch. As it impacts the staging tree, such a
patch is sent to a different destination.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agortlwifi: rtl8188ee: rtl8821ae: Fix a queue locking problem
Larry Finger [Fri, 26 Sep 2014 21:40:22 +0000 (16:40 -0500)]
rtlwifi: rtl8188ee: rtl8821ae: Fix a queue locking problem

The code fails to lock the skb queue, which leads to a number of problems.
This patch also fixes a Sparse warning about using a memset of 1 byte.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: troy_tan@realsil.com.cn
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agobcma: use chipcommon node from DT for SoC GPIO chip
Rafał Miłecki [Tue, 30 Sep 2014 10:55:48 +0000 (12:55 +0200)]
bcma: use chipcommon node from DT for SoC GPIO chip

This will allow us to define GPIO-attached devices (LEDs, buttons) in
the the device tree.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agobcma: register bcma as device tree driver
Hauke Mehrtens [Thu, 25 Sep 2014 22:09:19 +0000 (00:09 +0200)]
bcma: register bcma as device tree driver

This driver is used by the bcm53xx ARM SoC code. Now it is possible to
give the address of the chipcommon core in device tree and bcma will
search for all the other cores.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agomwifiex: add more dump information for PCIe interface
Amitkumar Karwar [Thu, 18 Sep 2014 11:18:50 +0000 (07:18 -0400)]
mwifiex: add more dump information for PCIe interface

We will now dump MAC, APU, CIU, ICU firmware memory segments also
for PCIe interface. Following is the updated userspace script which
reads firmware dump information.

    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

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

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

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

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

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agomwifiex: error path handling in pcie firmware dump
Amitkumar Karwar [Thu, 18 Sep 2014 12:04:01 +0000 (08:04 -0400)]
mwifiex: error path handling in pcie firmware dump

This patch takes care of missing error paths in firmware dump.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agoBluetooth: btusb: remove redundant lock variable
Amitkumar Karwar [Tue, 30 Sep 2014 11:39:05 +0000 (07:39 -0400)]
Bluetooth: btusb: remove redundant lock variable

This variable is nowhere used in the code.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
9 years agoBluetooth: btmrvl: support Marvell Bluetooth device SD8887
Xinming Hu [Tue, 30 Sep 2014 10:45:33 +0000 (06:45 -0400)]
Bluetooth: btmrvl: support Marvell Bluetooth device SD8887

This patch adds driver support for marvell SD8887 chip.

Signed-off-by: Xinming Hu <huxm@marvell.com>
Signed-off-by: Kevin Gan <ganhy@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
9 years agoBluetooth: btmrvl: rename definitions from 88xx to 8897
Amitkumar Karwar [Tue, 30 Sep 2014 10:45:32 +0000 (06:45 -0400)]
Bluetooth: btmrvl: rename definitions from 88xx to 8897

Register offsets are different for SD8897 and newer chip SD8887.
We can not have common btmrvl_sdio_card_reg map for them.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
9 years agoBluetooth: 6lowpan: Enable multicast support
Jukka Rissanen [Mon, 29 Sep 2014 13:37:26 +0000 (16:37 +0300)]
Bluetooth: 6lowpan: Enable multicast support

Set multicast support for 6lowpan network interface.
This is needed in every network interface that supports IPv6.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
9 years agoBluetooth: 6lowpan: Ensure header compression does not corrupt IPv6 header
Jukka Rissanen [Mon, 29 Sep 2014 13:37:25 +0000 (16:37 +0300)]
Bluetooth: 6lowpan: Ensure header compression does not corrupt IPv6 header

If skb is going to multiple destinations, then make sure that we
do not overwrite the common IPv6 headers. So before compressing
the IPv6 headers, we copy the skb and that is then sent to 6LoWPAN
Bluetooth devices.

This is a similar patch as what was done for IEEE 802.154 6LoWPAN
in commit f19f4f9525cf3 ("ieee802154: 6lowpan: ensure header compression
does not corrupt ipv6 header")

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
9 years agoBluetooth: 6lowpan: Make sure skb exists before accessing it
Jukka Rissanen [Mon, 29 Sep 2014 07:55:46 +0000 (10:55 +0300)]
Bluetooth: 6lowpan: Make sure skb exists before accessing it

We need to make sure that the saved skb exists when
resuming or suspending a CoC channel. This can happen if
initial credits is 0 when channel is connected.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
9 years agortlwifi: Fix problems with building an allyesconfig
Larry Finger [Mon, 22 Sep 2014 14:39:27 +0000 (09:39 -0500)]
rtlwifi: Fix problems with building an allyesconfig

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agortlwifi: rtl8821ae: Move driver from staging to regular tree
Larry Finger [Mon, 22 Sep 2014 14:39:26 +0000 (09:39 -0500)]
rtlwifi: rtl8821ae: Move driver from staging to regular tree

This driver was entered into staging a few cycles ago because there was
not time to integrate the Realtek version into the support routines in
the kernel. Now that there is an effort to converg the code base from Linux
and the Realtek repo, it is time to move this driver. In addition, all the
updates included in the 06/28/2014 version of the Realtek drivers are
included here.

With this change, it will be necessary to delete the staging driver. That
will be handled in a separate patch. As it impacts the staging tree, such a
patch is sent to a different destination.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agortlwifi: rtl8188ee: Update driver to match Realtek release of 06282014
Larry Finger [Mon, 22 Sep 2014 14:39:25 +0000 (09:39 -0500)]
rtlwifi: rtl8188ee: Update driver to match Realtek release of 06282014

Not only does this patch update the driver to match the latest Realtek release,
it is an important step in getting the internal code source at Realtek to match
the code in the kernel. The primary reason for this is to make it easier for
Realtek to maintain the kernel source without requiring an intermediate like me.

In this process of merging the two source repositories, there are a lot
of changes in both, and this commit is rather large.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agortlwifi: Finish modifying core routines for new drivers
Larry Finger [Mon, 22 Sep 2014 14:39:24 +0000 (09:39 -0500)]
rtlwifi: Finish modifying core routines for new drivers

Addition of the new drivers and the update to a new version for the others
lead to changes in all the core routines.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agortlwifi: Update power-save routines for 062814 driver
Larry Finger [Mon, 22 Sep 2014 14:39:23 +0000 (09:39 -0500)]
rtlwifi: Update power-save routines for 062814 driver

Realtek released a new version of the drivers on 06/28/2014. This
patch implements the new power-save code. These changes also force
corresponding changes in the drivers.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agortlwifi: Modify cam.{c,h} and efuse.{c,h} for new drivers
Larry Finger [Mon, 22 Sep 2014 14:39:22 +0000 (09:39 -0500)]
rtlwifi: Modify cam.{c,h} and efuse.{c,h} for new drivers

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agortlwifi: Modify base.{c,h} for new drivers
Larry Finger [Mon, 22 Sep 2014 14:39:21 +0000 (09:39 -0500)]
rtlwifi: Modify base.{c,h} for new drivers

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agortlwifi: Modify core.c for new drivers
Larry Finger [Mon, 22 Sep 2014 14:39:20 +0000 (09:39 -0500)]
rtlwifi: Modify core.c for new drivers

Each of the routines in the rtlwifi common driver needs to be modified
for the coming changes. This patch prepares core.c, but also touches other
files.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agortlwifi: rtl_pci: Start modification for new drivers
Larry Finger [Mon, 22 Sep 2014 14:39:19 +0000 (09:39 -0500)]
rtlwifi: rtl_pci: Start modification for new drivers

Future patches will move the drivers for RTL8192EE and RTL8821AE
from staging to the regular wireless tree. Here, the necessary features
are added to the PCI driver. Other files are touched due to changes
in the various data structs.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agortlwifi: Remove extra workqueue for enter/leave power state
Larry Finger [Mon, 22 Sep 2014 14:39:18 +0000 (09:39 -0500)]
rtlwifi: Remove extra workqueue for enter/leave power state

When the rtlwifi family of drivers was converted to use a workqueue when
entering or leaving power save mode (commits a269913c52a5ffbe0a19,
41affd5286b9116b9a2b, and 6539306b2c), the code began scheduling work from
the callback routine of a different workqueue with a resulting increase in
overhead.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agortlwifi: btcoexist: Fix Smatch warning
Larry Finger [Mon, 22 Sep 2014 14:39:17 +0000 (09:39 -0500)]
rtlwifi: btcoexist: Fix Smatch warning

The capability for 802.11ac will soon be added to these drivers. Once
that is done, a bitmask will be too large for the data storage.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agoath9k: Fix offchannel queuing
Sujith Manoharan [Wed, 24 Sep 2014 06:18:16 +0000 (11:48 +0530)]
ath9k: Fix offchannel queuing

Clearing IEEE80211_TX_CTL_PS_RESPONSE in a frame
that is not in the current context doesn't seem right.
Instead make sure that we don't add such frames
to the UAPSD queue by using a local variable.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agoath9k: Use normal queues for offchannel frames
Sujith Manoharan [Wed, 24 Sep 2014 06:18:15 +0000 (11:48 +0530)]
ath9k: Use normal queues for offchannel frames

There is no reason why frames marked with
IEEE80211_TX_CTL_TX_OFFCHAN have to be sent using
the UAPSD queue. Since mac80211 makes sure that
RoC is done before pushing an offchannel frame
to the driver, we can use the normal TX queues
for transmission.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agoath9k: Fix queue management
Sujith Manoharan [Wed, 24 Sep 2014 06:18:14 +0000 (11:48 +0530)]
ath9k: Fix queue management

Since we use IEEE80211_HW_QUEUE_CONTROL now, the
CAB/Offchannel queues are registered as the last
two queues. There is no need to check and reassign
the queues in the TX start()/done() routines.

CAB frames will not reach the tx() callback since
we set IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING and
pull the buffered frames during beacon transmission.
We also don't have a special HW queue for handling
off-channel frames.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agort2800: correct BBP1_TX_POWER_CTRL mask
Stanislaw Gruszka [Wed, 24 Sep 2014 09:24:54 +0000 (11:24 +0200)]
rt2800: correct BBP1_TX_POWER_CTRL mask

Two bits control TX power on BBP_R1 register. Correct the mask,
otherwise we clear additional bit on BBP_R1 register, what can have
unknown, possible negative effect.

Cc: stable@vger.kernel.org
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agowil6210: ethtool ops
Vladimir Kondratiev [Mon, 22 Sep 2014 12:31:41 +0000 (15:31 +0300)]
wil6210: ethtool ops

Provide ethtool support; with support for interrupt coalescing through
get_coalesce/set_coalesce.
Placeholders for begin/complete will be used by runtime PM
to make sure target is powered up while performing ethtool operations

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agobcma: gpio: use ChipCommon GPIO IRQ on BCM47XX arch only
Rafał Miłecki [Sun, 21 Sep 2014 18:45:13 +0000 (20:45 +0200)]
bcma: gpio: use ChipCommon GPIO IRQ on BCM47XX arch only

GPIOs can be also used on bcm53xx, however this arch requires different
implementation of IRQ support. It uses different IRQ number (117) and
different masks & acking.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agortl818x_pci: add RSSI information for rtl8187SE
andrea.merello [Sat, 20 Sep 2014 17:45:24 +0000 (19:45 +0200)]
rtl818x_pci: add RSSI information for rtl8187SE

This patch makes the driver to report signal strength information
to mac80211 for rtl8187se boards.

It differs from my previous RFT patch:
http://marc.info/?l=linux-wireless&m=140155388332534&w=2
because:
- I have now a working rtl8187se card, so I could serve my RFT by myself. :)
- CCK measurement code has changed a bit, but it does basically the same things.
- OFDM measurement method is changed because the older method reported incorrect
  measures, at least for signals stronger than -40dBm).

CCK measurement seems quite good. OFDM seems less accurate, but this is the
same as the "reference" staging driver dose. I wanted not to change things just
to make measures of _one_ (my) card a bit more close to what _I_ (in my setup)
expected..

IMHO results are still good enough to justify reporting signal in dBm rather than in
"unspecified" units, so this is what this patch actually does.

Results of my tests with a working rtl8187se card connected with coaxes and
various RF attenuators to my AP are:

Input (approx) | CCK meas | OFDM meas
--------------------------------------
      -30dBm   |  -32dBm  |  -31dBm
      -40dBm   |  -40dBm  |  -41dBm
      -50dBm   |  -50dBm  |  -55dBm
      -60dBm   |  -59dBm  |  -63dBm
      -70dBm   |  -69dBm  |  -73dBm
      -80dBm   |  -79dBm  |  -83dBm

Also some real-field tests has been done (no coax, packets in the air) for the CCK
measure method, and they resulted in reasonable values.

Thanks-to: Bernhard Schiffner <bernhard@schiffner-limbach.de> [ for real-field tests]
Signed-off-by: andrea.merello <andrea.merello@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agoath9k: Fix p2p address management
Sujith Manoharan [Fri, 19 Sep 2014 07:30:42 +0000 (13:00 +0530)]
ath9k: Fix p2p address management

When multiple channel contexts are enabled, a p2p interface
that is assigned to a context will have an address that
is different from the device mac address, which is used
by wpa_s as the p2p device ID.

Certain frames like provision requests use the device address
and these get dropped since ath9k_calculate_summary_state()
iterates over only the active interfaces in a context and the
device address is not used.

Fix this by adding the device mac address to the bssid mask.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agobcma: print chip ID in a more user-friendly form
Rafał Miłecki [Wed, 17 Sep 2014 21:50:55 +0000 (23:50 +0200)]
bcma: print chip ID in a more user-friendly form

Some chip IDs are easier to read/understand when printed in a decimal
form. For example on my bcm53xx arch router this patch replaces:
Found chip with id 0xCF12, rev 0x00 and package 0x02
with a:
Found chip with id 53010, rev 0x00 and package 0x02

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agomwifiex: ensure user_scan_in not NULL while setting scan channel gap
Avinash Patil [Wed, 17 Sep 2014 17:31:26 +0000 (23:01 +0530)]
mwifiex: ensure user_scan_in not NULL while setting scan channel gap

Check for scan channel gap only when user_scan_in is not NULL.
user_scan_in is NULL for internal scans and if we check scan channel gap
at this place, it may result into crash.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agoath9k: Cache BSS information
Sujith Manoharan [Wed, 17 Sep 2014 09:15:56 +0000 (14:45 +0530)]
ath9k: Cache BSS information

Using the BSS information stored in mac80211 directly
is racy in certain conditions. For example, in a MCC
setup, if the scheduler is switching channels when
a local deauth is issued, calculation of the opmode/bssid
etc. is incorrect. To avoid this, store the bss params
in the driver and use it.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agoath5k: Remove AHB bus support
Paul Bolle [Wed, 10 Sep 2014 08:53:41 +0000 (10:53 +0200)]
ath5k: Remove AHB bus support

AHB bus support was added in v2.6.38, through commit a0b907ee2a71
("ath5k: Add AHB bus support."). That code can only be build if the
Kconfig symbol ATHEROS_AR231X is set. But that symbol has never been
added to the tree. So AHB bus support has always been dead code.

Let's remove all code that depends on ATHEROS_AR231X. If that symbol
ever gets added to the tree the AHB bus support can be re-added too.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agoMerge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetoot...
John W. Linville [Fri, 26 Sep 2014 17:38:51 +0000 (13:38 -0400)]
Merge branch 'for-upstream' of git://git./linux/kernel/git/bluetooth/bluetooth-next

9 years agoMerge tag 'nfc-next-3.18-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo...
John W. Linville [Fri, 26 Sep 2014 17:37:02 +0000 (13:37 -0400)]
Merge tag 'nfc-next-3.18-1' of git://git./linux/kernel/git/sameo/nfc-next

Samuel Ortiz <sameo@linux.intel.com> says:

"NFC: 3.18 pull request

This is the NFC pull request for 3.18.

We've had major updates for TI and ST Microelectronics drivers:

For TI's trf7970a driver:

- Target mode support for trf7970a
- Suspend/resume support for trf7970a
- DT properties additions to handle different quirks
- A bunch of fixes for smartphone IOP related issues

For ST Microelectronics' ST21NFCA and ST21NFCB drivers:

- ISO15693 support for st21nfcb
- checkpatch and sparse related warning fixes
- Code cleanups and a few minor fixes

Finally, Marvell add ISO15693 support to the NCI stack, together with a
couple of NCI fixes."

Signed-off-by: John W. Linville <linville@tuxdriver.com>
9 years agoMerge branch 'for-linville' of git://github.com/kvalo/ath
John W. Linville [Fri, 26 Sep 2014 17:35:46 +0000 (13:35 -0400)]
Merge branch 'for-linville' of git://github.com/kvalo/ath

9 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwif...
John W. Linville [Fri, 26 Sep 2014 17:33:58 +0000 (13:33 -0400)]
Merge branch 'master' of git://git./linux/kernel/git/iwlwifi/iwlwifi-next

9 years agoBluetooth: Rename sco_param_wideband table to esco_param_msbc
Johan Hedberg [Thu, 25 Sep 2014 06:48:01 +0000 (09:48 +0300)]
Bluetooth: Rename sco_param_wideband table to esco_param_msbc

The sco_param_wideband table represents the eSCO parameters for
specifically mSBC encoding. This patch renames the table to the more
descriptive esco_param_msbc name.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
9 years agoBluetooth: Add retransmission effort into SCO parameter table
Johan Hedberg [Wed, 24 Sep 2014 19:41:46 +0000 (22:41 +0300)]
Bluetooth: Add retransmission effort into SCO parameter table

It is expected that new parameter combinations will have the
retransmission effort value different between some entries (mainly
because of the new S4 configuration added by HFP 1.7), so it makes sense
to move it into the table instead of having it hard coded based on the
selected SCO_AIRMODE_*.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
9 years agoieee802154: 6lowpan: ensure header compression does not corrupt ipv6 header
Simon Vincent [Wed, 24 Sep 2014 10:21:33 +0000 (12:21 +0200)]
ieee802154: 6lowpan: ensure header compression does not corrupt ipv6 header

The 6lowpan ipv6 header compression was causing problems for other interfaces
that expected a ipv6 header to still be in place, as we were replacing the
ipv6 header with a compressed version. This happened if you sent a packet to a
multicast address as the packet would be output on 802.15.4, ethernet, and also
be sent to the loopback interface. The skb data was shared between these
interfaces so all interfaces ended up with a compressed ipv6 header.

The solution is to ensure that before we do any header compression we are not
sharing the skb or skb data with any other interface. If we are then we must
take a copy of the skb and skb data before modifying the ipv6 header.
The only place we can copy the skb is inside the xmit function so we don't
leave dangling references to skb.

This patch moves all the header compression to inside the xmit function. Very
little code has been changed it has mostly been moved from lowpan_header_create
to lowpan_xmit. At the top of the xmit function we now check if the skb is
shared and if so copy it. In lowpan_header_create all we do now is store the
source and destination addresses for use later when we compress the header.

Signed-off-by: Simon Vincent <simon.vincent@xsilon.com>
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
9 years agomrf24j40: use pr_* / dev_* instead of printk()
Varka Bhadram [Wed, 24 Sep 2014 10:21:32 +0000 (12:21 +0200)]
mrf24j40: use pr_* / dev_* instead of printk()

Replace printk() with dev_*() pr_*().

Signed-off-by: Varka Bhadram <varkab@cdac.in>
Acked-by: Alan Ott <alan@signal11.us>
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
9 years agomrf24j40: remove unnecessary return statement
Varka Bhadram [Wed, 24 Sep 2014 10:21:31 +0000 (12:21 +0200)]
mrf24j40: remove unnecessary return statement

Remove the return statement in the void function.

Signed-off-by: Varka Bhadram <varkab@cdac.in>
Acked-by: Alan Ott <alan@signal11.us>
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
9 years agomrf24j40: fix Missing a blank line after declarations
Varka Bhadram [Wed, 24 Sep 2014 10:21:30 +0000 (12:21 +0200)]
mrf24j40: fix Missing a blank line after declarations

Signed-off-by: Varka Bhadram <varkab@cdac.in>
Acked-by: Alan Ott <alan@signal11.us>
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
9 years agoBluetooth: Fix reason code used for rejecting SCO connections
Johan Hedberg [Wed, 24 Sep 2014 10:14:46 +0000 (13:14 +0300)]
Bluetooth: Fix reason code used for rejecting SCO connections

The core specification defines valid values for the
HCI_Reject_Synchronous_Connection_Request command to be 0x0D-0x0F. So
far the code has been using HCI_ERROR_REMOTE_USER_TERM (0x13) which is
not a valid value and is therefore being rejected by some controllers:

 > HCI Event: Connect Request (0x04) plen 10
bdaddr 40:6F:2A:6A:E5:E0 class 0x000000 type eSCO
 < HCI Command: Reject Synchronous Connection (0x01|0x002a) plen 7
bdaddr 40:6F:2A:6A:E5:E0 reason 0x13
Reason: Remote User Terminated Connection
 > HCI Event: Command Status (0x0f) plen 4
Reject Synchronous Connection (0x01|0x002a) status 0x12 ncmd 1
Error: Invalid HCI Command Parameters

This patch introduces a new define for a value from the valid range
(0x0d == Connection Rejected Due To Limited Resources) and uses it
instead for rejecting incoming connections.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
9 years agoBluetooth: Convert bt_<level> logging functions to return void
Joe Perches [Mon, 22 Sep 2014 18:17:41 +0000 (11:17 -0700)]
Bluetooth: Convert bt_<level> logging functions to return void

No caller or macro uses the return value so make all
the functions return void.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
9 years agoNFC: st21nfca: Fix potential double kfree_skb error
Christophe Ricard [Sat, 13 Sep 2014 08:28:53 +0000 (10:28 +0200)]
NFC: st21nfca: Fix potential double kfree_skb error

skb is already freed in st21nfca_tx_work and was freed also in
st21nfca_im_send_psl_req.

Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>