]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/log
mirror_ubuntu-eoan-kernel.git
11 years agowil6210: do not set IE's for beacon
Vladimir Kondratiev [Wed, 13 Mar 2013 12:12:41 +0000 (14:12 +0200)]
wil6210: do not set IE's for beacon

On the DMG band, there is no 'normal' beacon frame.
Instead, transmitted is short 'DMG beacon' frame, that do not include IE's
So, beacon IE's are not relevant for the DMG band.

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agowil6210: handle WMI_BA_STATUS_EVENTID
Vladimir Kondratiev [Wed, 13 Mar 2013 12:12:40 +0000 (14:12 +0200)]
wil6210: handle WMI_BA_STATUS_EVENTID

Firmware indicated block ack agreement status change.
For now, just log it.

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agowil6210: handle linkup/linkdown WMI events
Vladimir Kondratiev [Wed, 13 Mar 2013 12:12:39 +0000 (14:12 +0200)]
wil6210: handle linkup/linkdown WMI events

Firmware indicates linkup/linkdown when data path becomes ready.

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agowil6210: Remove local implementation of dynamic hexdump
Vladimir Kondratiev [Wed, 13 Mar 2013 12:12:38 +0000 (14:12 +0200)]
wil6210: Remove local implementation of dynamic hexdump

This functionality now integrated in kernel, local hack not needed any more

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agowil6210: remove unused including <linux/version.h>
Wei Yongjun [Tue, 12 Mar 2013 03:09:34 +0000 (11:09 +0800)]
wil6210: remove unused including <linux/version.h>

Remove including <linux/version.h> that don't need it.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agossb: pci: Fix flipping of MAC address
Larry Finger [Mon, 11 Mar 2013 20:38:26 +0000 (15:38 -0500)]
ssb: pci: Fix flipping of MAC address

Since commit e565275 entitled "ssb: pci: Standardize a function to get mac
address", the SPROM readout of the MAC has had the values flipped so that
00:11:22:33:44:55 became 11:00:33:22:55:44. The fix has been tested on both
little- and big-endian architectures.

Reported-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agomwl8k: don't overwrite regulatory settings on fw reload
Jonas Gorski [Mon, 11 Mar 2013 16:44:21 +0000 (17:44 +0100)]
mwl8k: don't overwrite regulatory settings on fw reload

Currently the caps are parsed on every firmware reload, causing any
channel flags to be cleared.
When there is a firmware to interface mode mismatch, the triggered
firmware reload causes a reset of the regulatory settings, causing all
channels to become available:

root@openrouter:/# iw phy phy0 info
Wiphy phy0
        Band 1:
(...)
                Frequencies:
                        * 2412 MHz [1] (0.0 dBm)
                        * 2417 MHz [2] (0.0 dBm)
                        * 2422 MHz [3] (0.0 dBm)
                        * 2427 MHz [4] (0.0 dBm)
                        * 2432 MHz [5] (0.0 dBm)
                        * 2437 MHz [6] (0.0 dBm)
                        * 2442 MHz [7] (0.0 dBm)
                        * 2447 MHz [8] (0.0 dBm)
                        * 2452 MHz [9] (0.0 dBm)
                        * 2457 MHz [10] (0.0 dBm)
                        * 2462 MHz [11] (0.0 dBm)
                        * 2467 MHz [12] (0.0 dBm)
                        * 2472 MHz [13] (0.0 dBm)
                        * 2484 MHz [14] (0.0 dBm)
(...)

To prevent this, only parse the caps on the first firmware load during
hardware probe, and store them locally to know we have already parsed
them.

Signed-off-by: Jonas Gorski <jogo@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agowireless:rtlwifi: replaced kmalloc+memcpy with kmemdup
Andrei Epure [Sun, 10 Mar 2013 13:09:47 +0000 (15:09 +0200)]
wireless:rtlwifi: replaced kmalloc+memcpy with kmemdup

Signed-off-by: Andrei Epure <epure.andrei@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoiwlegacy: fix sparse warnings
Stephen Hemminger [Fri, 8 Mar 2013 19:12:56 +0000 (11:12 -0800)]
iwlegacy: fix sparse warnings

Make local functions and tables static. Make ops table
Mark 3945 ops as read_mostly.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoorinoco_usb: don't release nonexistent firmware
Michal Pecio [Fri, 8 Mar 2013 21:42:03 +0000 (22:42 +0100)]
orinoco_usb: don't release nonexistent firmware

Initialize fw_entry to NULL to prevent cleanup code from passing
bogus pointer to release_firmware() when priv allocation fails.

Signed-off-by: Michal Pecio <michal.pecio@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoMerge tag 'nfc-next-3.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo...
John W. Linville [Mon, 11 Mar 2013 18:59:46 +0000 (14:59 -0400)]
Merge tag 'nfc-next-3.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/nfc-next

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

This is the first NFC pull request for 3.10.

The 2 features we have with this one are:

- An LLCP Service Name Lookup (SNL) netlink interface for querying LLCP
  service availability from user space.
  Along the way, Thierry also improved the existing SNL interface for
  aggregating SNL responses.

- An initial LLCP socket options implementation, for setting the Receive
  Window (RW) and the Maximum Information Unit Extension (MIUX) per socket.
  This is need for the LLCP validation tests.

We also have a microread MEI build failure here: I am not sending this one to
3.9 because the MEI bus code is not there yet, so it won't break for anyone
else than me.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoNFC: llcp: Add cleanup support for unreplied SNL requests
Thierry Escande [Mon, 4 Mar 2013 14:43:32 +0000 (15:43 +0100)]
NFC: llcp: Add cleanup support for unreplied SNL requests

If the remote LLC doesn't reply in time to our SNL requests we remove
them from the list of pending requests. The timeout is fixed to an
arbitrary value of 3 times remote_lto.

When not replied, the local LLC broadcasts NFC_EVENT_LLC_SDRES nl events for
the concerned uris with sap values set to LLCP_SDP_UNBOUND (which is 65).

Signed-off-by: Thierry Escande <thierry.escande@linux.intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agoNFC: llcp: Service Name Lookup netlink interface
Thierry Escande [Fri, 15 Feb 2013 09:43:06 +0000 (10:43 +0100)]
NFC: llcp: Service Name Lookup netlink interface

This adds a netlink interface for service name lookup support.
Multiple URIs can be passed nested into the NFC_ATTR_LLC_SDP attribute
using the NFC_CMD_LLC_SDREQ netlink command.
When the SNL reply is received, a NFC_EVENT_LLC_SDRES event is sent to
the user space. URI and SAP tuples are passed back, nested into
NFC_ATTR_LLC_SDP attribute.

Signed-off-by: Thierry Escande <thierry.escande@linux.intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agoNFC: llcp: Service Name Lookup SDRES aggregation
Thierry Escande [Fri, 15 Feb 2013 09:43:05 +0000 (10:43 +0100)]
NFC: llcp: Service Name Lookup SDRES aggregation

This modifies the way SDRES PDUs are sent back. If multiple SDREQs are
received within a single SNL PDU, all SDRES replies are sent packed in
one SNL PDU too.

Signed-off-by: Thierry Escande <thierry.escande@linux.intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agoNFC: Add missing type policies for netlink attributes
Thierry Escande [Fri, 15 Feb 2013 09:42:52 +0000 (10:42 +0100)]
NFC: Add missing type policies for netlink attributes

Signed-off-by: Thierry Escande <thierry.escande@linux.intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agoNFC: llcp: Remove redundant printk
Samuel Ortiz [Fri, 22 Feb 2013 10:39:53 +0000 (11:39 +0100)]
NFC: llcp: Remove redundant printk

We already have a pr_debug for that.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agoNFC: llcp: Use socket specific link parameters before the local ones
Samuel Ortiz [Fri, 22 Feb 2013 10:38:05 +0000 (11:38 +0100)]
NFC: llcp: Use socket specific link parameters before the local ones

If the socket link options are set, use them before the local one.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agoNFC: llcp: Implement socket options
Samuel Ortiz [Fri, 22 Feb 2013 09:53:25 +0000 (10:53 +0100)]
NFC: llcp: Implement socket options

Some LLCP services (e.g. the validation ones) require some control over
the LLCP link parameters like the receive window (RW) or the MIU extension
(MIUX). This can only be done through socket options.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agoNFC: llcp: Rename socket rw and miu fields
Samuel Ortiz [Fri, 22 Feb 2013 00:12:28 +0000 (01:12 +0100)]
NFC: llcp: Rename socket rw and miu fields

They really are remote peer parameters, and we need to distinguish them
from the local ones as we'll modify the latter with socket options.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agoNFC: microread: Fix MEI build failure
Samuel Ortiz [Wed, 13 Feb 2013 09:45:46 +0000 (10:45 +0100)]
NFC: microread: Fix MEI build failure

The mei_device field should be called device, not mei_device.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
11 years agomwifiex: fix potential null dereference 'mef_entry'
Bing Zhao [Thu, 7 Mar 2013 00:44:26 +0000 (16:44 -0800)]
mwifiex: fix potential null dereference 'mef_entry'

drivers/net/wireless/mwifiex/cfg80211.c:2357 mwifiex_cfg80211_suspend()
  error: potential null dereference 'mef_entry'
  (kzalloc returns null)

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agomwifiex: Trigger a card reset on reaching tx_timeout threshold
Ashok Nagarajan [Fri, 8 Mar 2013 18:58:45 +0000 (10:58 -0800)]
mwifiex: Trigger a card reset on reaching tx_timeout threshold

tx_timeout doesn't always lead to a cmd_timeout. There are
occurrences where cmd_timeout never gets triggered for a long
time and we encounter a kernel crash. In this patch, we track
the consecutive timeouts (tx_timeout_cnt). When tx_timeout_cnt
exceeds the threshold, trigger a card reset thereby avoiding a
kernel crash.

Signed-off-by: Ashok Nagarajan <asnagarajan@chromium.org>
Signed-off-by: Paul Stewart <pstew@chromium.org>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agorndis_wlan: update email address
Jussi Kivilinna [Thu, 7 Mar 2013 20:33:38 +0000 (22:33 +0200)]
rndis_wlan: update email address

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoMerge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi...
John W. Linville [Fri, 8 Mar 2013 20:53:47 +0000 (15:53 -0500)]
Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next

11 years agoMerge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac802...
John W. Linville [Fri, 8 Mar 2013 20:52:21 +0000 (15:52 -0500)]
Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next

11 years agomwifiex: add WOWLAN support
Amitkumar Karwar [Tue, 5 Mar 2013 00:27:59 +0000 (16:27 -0800)]
mwifiex: add WOWLAN support

Currently 'magic-packet' and 'patterns' options in 'iw wowlan'
command are supported.

Appropriate packet filters for wowlan are configured in firmware
based on provided patterns and/or magic-packet option.

For examples,

wake-on ARP request for 192.168.0.100:
iw phy0 wowlan enable patterns ff:ff:ff:ff:ff:ff 20+08:06
  46+c0:a8:00:64

wake-on RX packets sent from IP address 192.168.0.88:
iw phy0 wowlan enable patterns 34+c0:a8:00:58

wake-on RX packets with TCP destination port 80
iw phy0 wowlan enable patterns 44+50

wake-on MagicPacket:
iw phy0 wowlan enable magic-packet

wake-on MagicPacket or patterns:
iw phy0 wowlan enable magic-packet patterns 12+00:11:22:33:44:55
  18+00:50:43:21

wake-on IPv4 multicast packets:
iw phy0 wowlan enable patterns 01:00:5e

wake-on IPv6 multicast packets:
iw phy0 wowlan enable patterns 33:33

disable all wowlan options
iw phy0 wowlan disable

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>
11 years agomwifiex: add "ethtool wol" command support
Amitkumar Karwar [Tue, 5 Mar 2013 00:27:58 +0000 (16:27 -0800)]
mwifiex: add "ethtool wol" command support

Host sleep wakeup condition is configured using this command.

Supports Wake-on: pumb

For examples:

wake-on any unicast packets:
ethtool -s mlan0 wol u

wake-on multicast/broadcast packet:
ethtool -s mlan0 wol mb

wake-on unicast packets and MAC events:
ethtool -s mlan0 wol pu

wake-on unicast/multicast/broadcast packets and MAC events:
ethtool -s mlan0 wol pmbu

disable all wake-on options:
ethtool -s mlan0 wol d

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>
11 years agomwifiex: shorten the host sleep configuration macro names
Amitkumar Karwar [Tue, 5 Mar 2013 00:27:57 +0000 (16:27 -0800)]
mwifiex: shorten the host sleep configuration macro names

As we are adding a few more macros in this category in next
patch, this cleanup work is required.

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>
11 years agomwifiex: modify skb->truesize for PCIE Rx
Avinash Patil [Tue, 5 Mar 2013 00:27:56 +0000 (16:27 -0800)]
mwifiex: modify skb->truesize for PCIE Rx

We allocate SKB buffers of 4K size to make sure that we process
RX AMSDU of 4K. So when skb->len is lesser than 4K; we should
modify skb->truesize. This resolves an issue where kernel has
allocated packets with 2K assumption and starts dropping packets
for large size data transfer.

This fix is already present for USB; extend it to PCIE.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agomwifiex: avoid [-Wmaybe-uninitialized] warnings in pcie.c
Bing Zhao [Tue, 5 Mar 2013 00:27:55 +0000 (16:27 -0800)]
mwifiex: avoid [-Wmaybe-uninitialized] warnings in pcie.c

drivers/net/wireless/mwifiex/pcie.c:1157:9: warning:
  'desc2' may be used uninitialized in this function
  [-Wmaybe-uninitialized]
drivers/net/wireless/mwifiex/pcie.c:1048:31: note:
  'desc2' was declared here

drivers/net/wireless/mwifiex/pcie.c:1159:9: warning:
  'desc' may be used uninitialized in this function
  [-Wmaybe-uninitialized]
drivers/net/wireless/mwifiex/pcie.c:1047:32: note:
  'desc' was declared here

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agomwifiex: fix [-Wunused-function] warnings on pcie suspend/resume
Bing Zhao [Tue, 5 Mar 2013 00:27:54 +0000 (16:27 -0800)]
mwifiex: fix [-Wunused-function] warnings on pcie suspend/resume

drivers/net/wireless/mwifiex/pcie.c:204:12: warning:
  'mwifiex_pcie_resume' defined but not used [-Wunused-function]
drivers/net/wireless/mwifiex/pcie.c:166:12: warning:
  'mwifiex_pcie_suspend' defined but not used [-Wunused-function]

The suspend/resume handlers ought to be under CONFIG_PM directive.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agomwifiex: remove static forward declarations in pcie.c
Bing Zhao [Tue, 5 Mar 2013 00:27:53 +0000 (16:27 -0800)]
mwifiex: remove static forward declarations in pcie.c

move functions up just to avoid static forward declaration for
mwifiex_pcie_resume.

Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k: Report rx-crc-errors in ethtool stats.
Ben Greear [Mon, 4 Mar 2013 23:31:17 +0000 (15:31 -0800)]
ath9k: Report rx-crc-errors in ethtool stats.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k: Report txerr-filtered errors in debugfs.
Ben Greear [Mon, 4 Mar 2013 23:31:16 +0000 (15:31 -0800)]
ath9k: Report txerr-filtered errors in debugfs.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agob43: HT-PHY: make it BCMA-only
Rafał Miłecki [Mon, 4 Mar 2013 15:39:10 +0000 (16:39 +0100)]
b43: HT-PHY: make it BCMA-only

HT-PHY was found only on BCM4331 which is a BCMA-based chipset. This is
reallly unlikely we will ever see HT-PHY on SSB thus make the whole code
BCMA specific. This will allow us to call various BCMA-specific
functions directly (without extra checks).

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k_hw: Fix fixed antenna for AR9462
Sujith Manoharan [Mon, 4 Mar 2013 07:12:55 +0000 (12:42 +0530)]
ath9k_hw: Fix fixed antenna for AR9462

When the RX chainmask is set to 0x2 for AR9462, certain values
from chain1 have to be programmed for chain0 also.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k_hw: Update initvals for AR9462
Sujith Manoharan [Mon, 4 Mar 2013 07:12:54 +0000 (12:42 +0530)]
ath9k_hw: Update initvals for AR9462

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k_hw: Use helper functions to simplify HW reset
Sujith Manoharan [Mon, 4 Mar 2013 07:12:53 +0000 (12:42 +0530)]
ath9k_hw: Use helper functions to simplify HW reset

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k_hw: Remove CHANNEL_CW_INT
Sujith Manoharan [Mon, 4 Mar 2013 07:12:52 +0000 (12:42 +0530)]
ath9k_hw: Remove CHANNEL_CW_INT

This flag is used for indicating channel interference and
we currently do nothing with it, so remove it.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmfmac: add parameter to brcmf_proto_hdrpush() for data offset
Arend van Spriel [Sun, 3 Mar 2013 11:45:32 +0000 (12:45 +0100)]
brcmfmac: add parameter to brcmf_proto_hdrpush() for data offset

The function brcmf_proto_hdrpush() increases the header space and
fills in the protocol header fields. One field is the data offset
which is currently fixed to zero meaning the data follows right
after the header. The parameter is added to determine the actual
start of data. This will be used for firmware signalling.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Piotr Haber <phaber@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmutil: add dequeue function with filtering
Arend van Spriel [Sun, 3 Mar 2013 11:45:31 +0000 (12:45 +0100)]
brcmutil: add dequeue function with filtering

Adding a packet dequeue function that will return packets that
pass the provided match function.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Piotr Haber <phaber@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmfmac: assure brcmf_txcomplete() is called in failure paths
Arend van Spriel [Sun, 3 Mar 2013 11:45:30 +0000 (12:45 +0100)]
brcmfmac: assure brcmf_txcomplete() is called in failure paths

For transmit packets the function brcmf_txcomplete() must be
called. This should be done as well when for some reason the
transmit fails to assure proper tx post processing. This patch
fixes the code paths in brcmf_usb_tx() that forgot to do so.

Reviewed-by: Piotr Haber <phaber@broadcom.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmfmac: release transmit packet in brcmf_txcomplete()
Arend van Spriel [Sun, 3 Mar 2013 11:45:29 +0000 (12:45 +0100)]
brcmfmac: release transmit packet in brcmf_txcomplete()

In the bus-specific driver code each call to brcmf_txcomplete() is
following by a free of that packet. This patch moves that free to
the brcmf_txcomplete() function.

Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Piotr Haber <phaber@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>
11 years agobrcmfmac: add support for TLV based firmware signalling
Arend van Spriel [Sun, 3 Mar 2013 11:45:28 +0000 (12:45 +0100)]
brcmfmac: add support for TLV based firmware signalling

The firmware and host can exchange signals which are carried within
the data packets. These are TLV based signals that are inserted
before the actual data, ie. ethernet frame.

This commit adds the new source module for this feature and enables
RSSI signals from firmware.

Reviewed-by: Hante Meuleman <meuleman@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>
11 years agobrcmutil: add macros for setting bitfields using mask/shift operations
Arend van Spriel [Sun, 3 Mar 2013 11:45:27 +0000 (12:45 +0100)]
brcmutil: add macros for setting bitfields using mask/shift operations

Added inline functions to set bitfields in an unsigned integer variable.

Reviewed-by: Hante Meuleman <meuleman@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>
11 years agobrcmfmac: increase required skbuff headroom for firmware signalling
Arend van Spriel [Sun, 3 Mar 2013 11:45:26 +0000 (12:45 +0100)]
brcmfmac: increase required skbuff headroom for firmware signalling

In preparation of firmware signalling feature additional headroom is
needed to accommodate signalling protocol data between host and
firmware.

Reviewed-by: Hante Meuleman <meuleman@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>
11 years agobrcmfmac: remove null-pointer check in .sched_scan_start() callback
Arend van Spriel [Sun, 3 Mar 2013 11:45:25 +0000 (12:45 +0100)]
brcmfmac: remove null-pointer check in .sched_scan_start() callback

In brcmf_cfg80211_sched_scan_start() the request parameter was checked
for being non-null. However, it never is so remove the check which gets
rid of following smatch warning:

drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c:2904
brcmf_cfg80211_sched_scan_start()
warn: variable dereferenced before check 'request' (see line 2897)

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Piotr Haber <phaber@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmfmac: cleanup module information macros
Arend van Spriel [Sun, 3 Mar 2013 11:45:23 +0000 (12:45 +0100)]
brcmfmac: cleanup module information macros

The output of modinfo shows a bit of strangeness because module
information macros are used in multiple source files:

license:        Dual BSD/GPL
description:    Broadcom 802.11 wireless LAN fullmac driver.
author:         Broadcom Corporation
firmware:       brcm/brcmfmac-sdio.txt
firmware:       brcm/brcmfmac-sdio.bin
firmware:       brcm/brcmfmac43236b.bin
license:        Dual BSD/GPL
description:    Broadcom 802.11n wireless LAN fullmac usb driver.
author:         Broadcom Corporation

This patch cleans it up.

Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmfmac: make debug module parameter more clear
Arend van Spriel [Sun, 3 Mar 2013 11:45:22 +0000 (12:45 +0100)]
brcmfmac: make debug module parameter more clear

The module parameter definition for brcmf_msg_level has been
reworked to a named module parameter with description so
modinfo is a bit more informative:

parm:           debug:level of debug output (int)

Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Piotr Haber <phaber@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmfmac: introduce tracepoints for message logging
Arend van Spriel [Sun, 3 Mar 2013 11:45:21 +0000 (12:45 +0100)]
brcmfmac: introduce tracepoints for message logging

Inspired by tracing functionality added by Seth Forshee in the
brcmsmac driver, this patch adds similar functionality to brcmfmac.

Reviewed-by: Piotr Haber <phaber@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmsmac: radio on led support
Piotr Haber [Sun, 3 Mar 2013 11:45:20 +0000 (12:45 +0100)]
brcmsmac: radio on led support

Add support for radio on led indicator.
Control led via BCMA gpio driver.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Piotr Haber <phaber@broadcom.com>
[arend@broadcom.com: modify Makefile for conditional compile led.c]
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agomwl8k: Load 8764 firmware image
Nishant Sarmukadam [Fri, 1 Mar 2013 11:43:01 +0000 (17:13 +0530)]
mwl8k: Load 8764 firmware image

This differs from legacy chips i.e.
a 8764 loads firmware image without a helper image
b Check interrupt status register for download
  complete indication.

Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agomwl8k: Adding support for 8764 4x4 AP
Nishant Sarmukadam [Fri, 1 Mar 2013 11:42:45 +0000 (17:12 +0530)]
mwl8k: Adding support for 8764 4x4 AP

The patch does the following:-

a Add entry in the PCIe table
b Add firmware support with API versioning
c Reuse most of the 8366 code
d Make 8764 specific changes where 8764 differs
  from 8366 e.g. structure definitions.

Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath6kl: small cleanup in ath6kl_htc_pipe_rx_complete()
Dan Carpenter [Thu, 28 Feb 2013 04:45:47 +0000 (07:45 +0300)]
ath6kl: small cleanup in ath6kl_htc_pipe_rx_complete()

It's harmless, but Smatch complains if we use "htc_hdr->eid" before
doing the bounds check.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agodrivers/net/wireless/ath/wil6210: Makefile, only -Werror when no -W* in EXTRA_CFLAGS
Chen Gang [Wed, 27 Feb 2013 06:55:06 +0000 (14:55 +0800)]
drivers/net/wireless/ath/wil6210: Makefile, only -Werror when no -W* in EXTRA_CFLAGS

  When make with EXTRA_CFLAGS=-W, it will report error.
  so give a check in Makefile.

Signed-off-by: Chen Gang <gang.chen@asianux.com>
Acked-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k: simplify ATH_EP_RND
Bob Copeland [Tue, 26 Feb 2013 18:41:52 +0000 (13:41 -0500)]
ath9k: simplify ATH_EP_RND

Remove the embedded branch to make the ATH_EP_RND macro a little
clearer.  The new version also generates better code, saving 24
bytes of text:

   text    data     bss     dec     hex filename
  87858    1641      24   89523   15db3 ath9k_orig.ko
  87834    1641      24   89499   15d9b ath9k_new.ko

Although neither version handles negative values particularly well,
the lone caller clamps all negative values to zero anyway.  I have
verified that the results are the same for the range of possible
positive rssi values.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoray_cs: read past the end of the array
Dan Carpenter [Tue, 26 Feb 2013 10:04:51 +0000 (13:04 +0300)]
ray_cs: read past the end of the array

"translate" should either be set or disabled.  We also use it an
offset into the framing[] array when we're generating the proc
file.  Framing looks like this:

static const char *framing[] = { "Encapsulation", "Translation" }

So when we're setting translate we need to restrict the values to
either 1 or 0 or it can an out of bounds read.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agob43: define BCMA wireless specific PLLs
Rafał Miłecki [Tue, 26 Feb 2013 09:07:57 +0000 (10:07 +0100)]
b43: define BCMA wireless specific PLLs

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobcma: implement disabling PLLs
Rafał Miłecki [Tue, 26 Feb 2013 09:02:23 +0000 (10:02 +0100)]
bcma: implement disabling PLLs

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agowil6210: convert to use simple_open()
Wei Yongjun [Tue, 26 Feb 2013 02:29:34 +0000 (10:29 +0800)]
wil6210: convert to use simple_open()

This removes an open coded simple_open() function and
replaces file operations references to the function
with simple_open() instead.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath5k: cleanup channel to eprom_mode function
Jiri Slaby [Mon, 25 Feb 2013 14:36:48 +0000 (15:36 +0100)]
ath5k: cleanup channel to eprom_mode function

Stop returning negative values from ath5k_eeprom_mode_from_channel.
Yell loudly about that case in that function instead and return the
default/zero/mode A. This cleans up the callers, but needs to pass ah
down to ath5k_eeprom_mode_from_channel for ATH5K_WARN. For that
purpose we also need the declaration to be moved to ath5k.h.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agorndis_wlan: Remove redundant NULL check before kfree
Syam Sidhardhan [Sun, 24 Feb 2013 22:05:43 +0000 (03:35 +0530)]
rndis_wlan: Remove redundant NULL check before kfree

kfree on a NULL pointer is a no-op.

Signed-off-by: Syam Sidhardhan <s.syam@samsung.com>
Acked-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmsmac: export firmware version to ethtool
Hauke Mehrtens [Sun, 24 Feb 2013 15:41:34 +0000 (16:41 +0100)]
brcmsmac: export firmware version to ethtool

This exports the firmware version in use to userspace through ethtool.

root@OpenWrt:/# ethtool -i wlan0
firmware-version: 610.812

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agocarl9170: fix frame drop and WARN due to minstrel_ht change
Christian Lamparter [Fri, 22 Feb 2013 00:30:44 +0000 (01:30 +0100)]
carl9170: fix frame drop and WARN due to minstrel_ht change

With "mac80211/minstrel_ht: add support for using CCK rates"
minstrel_ht selects legacy CCK rates as viable rates for
outgoing frames which might be sent as part of an A-MPDU
[IEEE80211_TX_CTL_AMPDU is set].

This behavior triggered the following WARN_ON in the driver:
> WARNING: at carl9170/tx.c:995 carl9170_op_tx+0x1dd/0x6fd
The driver assumed that the rate control algorithm made a
mistake and dropped the frame.

This patch removes the noisy warning altogether and allows
said A-MPDU frames with CCK sample and/or fallback rates to
be transmitted seamlessly.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agob43: Fix 'me' -> 'be' typo in Kconfig
W. Trevor King [Thu, 21 Feb 2013 12:34:42 +0000 (07:34 -0500)]
b43: Fix 'me' -> 'be' typo in Kconfig

Also add a missing 'the' before 'runtime performance'.

Signed-off-by: W. Trevor King <wking@tremily.us>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobcma: ignore extra GMAC cores on BCM4706
Rafał Miłecki [Tue, 19 Feb 2013 18:41:42 +0000 (19:41 +0100)]
bcma: ignore extra GMAC cores on BCM4706

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2x00: rt2x00pci_regbusy_read() - only print register access failure once
Tim Gardner [Mon, 18 Feb 2013 19:56:28 +0000 (12:56 -0700)]
rt2x00: rt2x00pci_regbusy_read() - only print register access failure once

BugLink: http://bugs.launchpad.net/bugs/1128840
It appears that when this register read fails it never recovers, so
I think there is no need to repeat the same error message ad infinitum.

Cc: Ivo van Doorn <IvDoorn@gmail.com>
Cc: Gertjan van Wingerde <gwingerde@gmail.com>
Cc: Helmut Schaa <helmut.schaa@googlemail.com>
Cc: "John W. Linville" <linville@tuxdriver.com>
Cc: linux-wireless@vger.kernel.org
Cc: users@rt2x00.serialmonkey.com
Cc: netdev@vger.kernel.org
Cc: stable@vger.kernel.org
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agossb: Convert ssb_printk to ssb_<level>
Joe Perches [Wed, 20 Feb 2013 20:16:13 +0000 (12:16 -0800)]
ssb: Convert ssb_printk to ssb_<level>

Use a more current logging style.

Convert ssb_dbprint to ssb_dbg too.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agossb: pci: Standardize a function to get mac address
Joe Perches [Wed, 20 Feb 2013 20:11:05 +0000 (12:11 -0800)]
ssb: pci: Standardize a function to get mac address

Don't require alignment of mac addresses to u16.

Signed-off-by: Joe Perches <joe@perches.com>
Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agossb: fix unaligned access to mac address
Hauke Mehrtens [Mon, 18 Feb 2013 20:47:45 +0000 (21:47 +0100)]
ssb: fix unaligned access to mac address

The mac address should be aligned to u16 to prevent an unaligned access
in drivers/ssb/pci.c where it is casted to __be16.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoiwlwifi: mvm: the SCD byte count is a TLV flag
Emmanuel Grumbach [Wed, 6 Mar 2013 09:53:38 +0000 (11:53 +0200)]
iwlwifi: mvm: the SCD byte count is a TLV flag

The SCD byte count layout is decided by the configuration
done in fw, it is then logical to export it as a TLV flag
and not per HW SKU.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: fix indirect write bug
Amnon Paz [Wed, 27 Feb 2013 09:28:16 +0000 (11:28 +0200)]
iwlwifi: fix indirect write bug

Fix a bug in writing to indirect (periphery) registers; although
writes seem successful the data is not written to the desired
address). Also fix address mask for HBUS_TARG_PRPH_RADDR and
HBUS_TARG_PRPH_WADDR registers.

Signed-off-by: Amnon Paz <amnonX.paz@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: move firmware restart debugfs hook to op_mode
Emmanuel Grumbach [Mon, 4 Mar 2013 06:53:07 +0000 (08:53 +0200)]
iwlwifi: move firmware restart debugfs hook to op_mode

This allows to test fw restart flow. The hook in transport
layer doesn't really make the fw assert. Moving this hook
to the op_mode allows to use the fw API to actually send a
host command that will make the fw assert.

Change the restart_fw module parameter to be a boolean on
the way.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: mvm: update firmware API - MAC ID in RX
Emmanuel Grumbach [Sun, 3 Mar 2013 08:19:45 +0000 (10:19 +0200)]
iwlwifi: mvm: update firmware API - MAC ID in RX

The firmware tells the driver to what MACs the received frame
belongs (based on the time slot in which it was received).

Note that there can be several MACs if they share the same
binding.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: mvm: export last bt_notif through debugfs
Emmanuel Grumbach [Tue, 19 Feb 2013 09:02:36 +0000 (11:02 +0200)]
iwlwifi: mvm: export last bt_notif through debugfs

This will allow to track how BT core updates the driver.
This is required to debug the BT Coexistence mechanism.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: mvm: update SMPS when BT gets active
Emmanuel Grumbach [Sun, 10 Feb 2013 15:06:17 +0000 (17:06 +0200)]
iwlwifi: mvm: update SMPS when BT gets active

When BT traffic load gets higher, we want to avoid using the
shared antenna. In order to do so, we need to tell the AP
that we don't support MIMO any more, or at least not all
the time: in short, use the SMPS to achieve this.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: mvm: handle BT-coex notification
Emmanuel Grumbach [Thu, 17 Jan 2013 12:20:29 +0000 (14:20 +0200)]
iwlwifi: mvm: handle BT-coex notification

The BT-Coex notification is sent by the fw when there are
updates wrt. BT activity. Driver action might be taken
based on the info in this notification.

For now, update the Ack/Cts_kill_msk if HID / SCO / A2DP
profiles are active.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: mvm: begin basic BT-Coex implementation
Emmanuel Grumbach [Thu, 17 Jan 2013 07:42:25 +0000 (09:42 +0200)]
iwlwifi: mvm: begin basic BT-Coex implementation

Send the PRIO table before the calibrations. This table
tells the fw what priority to give to what (WiFi / BT)
according to events.

Send a hardcoded BT_COEX command to the fw to enable basic
BT coexistence.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: mvm: add BT Coex FW API
Emmanuel Grumbach [Mon, 14 Jan 2013 13:04:01 +0000 (15:04 +0200)]
iwlwifi: mvm: add BT Coex FW API

This is the API to tell the fw to handle the BT Coexistence.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: mvm: add CARD_STATE_NOTIFICATION to the cmd strings
Emmanuel Grumbach [Sun, 3 Mar 2013 07:14:51 +0000 (09:14 +0200)]
iwlwifi: mvm: add CARD_STATE_NOTIFICATION to the cmd strings

Then the transport can print it nicely in its debug prints.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: export symbols only conditionally
Johannes Berg [Thu, 28 Feb 2013 23:13:33 +0000 (00:13 +0100)]
iwlwifi: export symbols only conditionally

If all the pieces of iwlwifi are built into the kernel
then there's no need for it to export its symbols to
other modules, so prevent that.

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: allow selecting only MVM driver
Johannes Berg [Thu, 28 Feb 2013 23:05:26 +0000 (00:05 +0100)]
iwlwifi: allow selecting only MVM driver

Now that we have two drivers (DVM and MVM) stop selecting
the DVM one (but make it default) and allow enabling only
the MVM driver if so desired. Add a warning for the case
of having neither DVM nor MVM enabled -- that's useless.

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: mvm: Change NVM default section read size
Dor Shaish [Wed, 27 Feb 2013 08:18:07 +0000 (10:18 +0200)]
iwlwifi: mvm: Change NVM default section read size

Signed-off-by: Dor Shaish <dor.shaish@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: mvm: don't read system time when modifying AP/GO MAC
Johannes Berg [Thu, 28 Feb 2013 13:05:14 +0000 (14:05 +0100)]
iwlwifi: mvm: don't read system time when modifying AP/GO MAC

When modifying a MAC, we update its beacon system time which
is taken as a base to calculate TBTT. The firmware doesn't use
the new timestamp because the time is never used after the MAC
and broadcast station were added, but it is safer to not rely
on this and avoids the overhead of reading the register every
time the MAC is updated.

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Reviewed-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: make device configuration bus agnostic
Emmanuel Grumbach [Wed, 20 Feb 2013 10:41:58 +0000 (12:41 +0200)]
iwlwifi: make device configuration bus agnostic

Newer devices can work on different buses. This means that
their configuration can be shared between different buses.
Hence the configuration structures should exported to all
the buses and not only to PCIE. Change this.

Note that this requires all the fields to be the same
amongst the buses. If differences will appear, we can always
define a part that is bus dependent. Today, this is not
needed.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: dvm: pad iwl_compressed_ba_resp
Emmanuel Grumbach [Wed, 27 Feb 2013 09:21:07 +0000 (11:21 +0200)]
iwlwifi: dvm: pad iwl_compressed_ba_resp

All the data coming from the fw must have a length that is
multiple of 4.
This doesn't change anything to the way we handle the
notification.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: mvm: advertise VHT capabilities
Eytan Lifshitz [Wed, 20 Feb 2013 09:01:13 +0000 (11:01 +0200)]
iwlwifi: mvm: advertise VHT capabilities

Update the NVM parsing functions to add VHT capabilities;
they are only added for 5 GHz, of course. This assumes
that all devices with NVM reading (rather than EEPROM)
that support 5 GHz have VHT, which is true right now.

Signed-off-by: Eytan Lifshitz <eytan.lifshitz@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: mvm: set up initial SMPS/NSS station info
Johannes Berg [Tue, 12 Feb 2013 13:35:36 +0000 (14:35 +0100)]
iwlwifi: mvm: set up initial SMPS/NSS station info

When a station is added, we need to tell the firmware what
the SMPS settings and number of streams are. After having
the initial data, the firmware will track future changes
by itself.

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: mvm: implement remote wake
Johannes Berg [Tue, 22 Jan 2013 19:41:58 +0000 (20:41 +0100)]
iwlwifi: mvm: implement remote wake

With remote wake, the firmware creates a TCP connection
and sends some configurable data on it, until a special
TCP data packet from the server is received that triggers
a wakeup. The configuration is a bit tricky because it is
based on packet pattern matching but this is hidden in
the driver and the exposed API in cfg80211 is just based
on the required TCP connection parameters.

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: convert to use simple_open()
Wei Yongjun [Mon, 25 Feb 2013 13:24:11 +0000 (21:24 +0800)]
iwlwifi: convert to use simple_open()

This removes an open coded simple_open() function and
replaces file operations references to the function
with simple_open() instead.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: use __get_str in tracing
Johannes Berg [Wed, 20 Feb 2013 15:29:37 +0000 (16:29 +0100)]
iwlwifi: use __get_str in tracing

Instead of using (char *)__get_dynamic_array use
__get_str. The latter is actually a macro that
expands to the former in the code, but trace-cmd
in userspace can parse __get_str only.

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: support DSSS/CCK mode in 40 MHz
Johannes Berg [Mon, 11 Feb 2013 17:55:58 +0000 (18:55 +0100)]
iwlwifi: support DSSS/CCK mode in 40 MHz

All hardware after 4965 supports this. It's likely that
it wasn't set because for 4965 it was irrelevant (HT is
only supported on 5 GHz there) and then never updated.

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: mvm: support IEEE80211_AMPDU_TX_STOP_FLUSH
Emmanuel Grumbach [Tue, 19 Feb 2013 14:13:53 +0000 (16:13 +0200)]
iwlwifi: mvm: support IEEE80211_AMPDU_TX_STOP_FLUSH

mac80211 tells us when we need to dump the frames from the
AGG queue instead of releasing them as single MPDUs.
Being able to differentiate between the different cases
(IEEE80211_AMPDU_TX_STOP_*) allows us to handle races better.

When the station is removed, mac80211 asks to flush and
removes the station right away.
This allows to avoid a case where we still have frames in
AGG queues, but the station has been remove already.

Note that we can have frames on the shared queues, but this
is not a problem: the station in the fw will be kept until
all the frames on the shared queues have been drained.
AGG queues are a special case since they are dynamically
allocated.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: mvm: Add support for additional addresses
Ilan Peer [Thu, 7 Feb 2013 15:09:09 +0000 (17:09 +0200)]
iwlwifi: mvm: Add support for additional addresses

Use the number of addresses (max 5) from the NVM
instead of limiting to 2 artificially.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: disable greenfield transmissions as a workaround
Beni Lev [Tue, 19 Feb 2013 12:40:11 +0000 (14:40 +0200)]
iwlwifi: disable greenfield transmissions as a workaround

There's a bug that causes the rate scaling to get stuck
when it has to use single-stream rates with a peer that
can do GF and SGI; the two are incompatible so we can't
use them together, but that causes the algorithm to not
work at all, it always rejects updates.

Disable greenfield for now to prevent that problem. The
MVM driver currently only works on devices that don't
support greenfield anyway, but better be safe and not
allow us to forget about this.

Signed-off-by: Beni Lev <beni.lev@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: 7000: disable HT greenfield support
Beni Lev [Tue, 19 Feb 2013 12:30:16 +0000 (14:30 +0200)]
iwlwifi: 7000: disable HT greenfield support

The 7000 series devices don't support HT greenfield mode
so don't advertise or use it.

Signed-off-by: Beni Lev <beni.lev@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: mvm: Update MAC context filter flags
Ilan Peer [Thu, 14 Feb 2013 12:25:24 +0000 (14:25 +0200)]
iwlwifi: mvm: Update MAC context filter flags

1. For P2P Device filter in only probe requests.
2. For station mode filter in all group cast frames,
   and in addition beacons as long as we are not associated.
3. For AP/GO filter in all group cast and in addition probe
   requests.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: mvm: don't use cts to self
Dor Shaish [Mon, 18 Feb 2013 11:51:36 +0000 (13:51 +0200)]
iwlwifi: mvm: don't use cts to self

The current fw doesn't currently support cts to self. There
is a bug in the fw that prevents us from using cts to self.
Use full protection (including RTS) for now.

Signed-off-by: Dor Shaish <dor.shaish@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: mvm: free AGG queue when we STA is removed
Emmanuel Grumbach [Tue, 19 Feb 2013 13:32:42 +0000 (15:32 +0200)]
iwlwifi: mvm: free AGG queue when we STA is removed

When we stop an AGG session, we need to look at the sequence
numbers in in the private area of the ieee80211_sta struct.
This allows us to know is the queue is empty. To get access
to this private area, we use fw_id_to_mac_id that maps
sta_id (index of the STA in fw table) to ieee80211_sta.

When the STA exists in fw, but not in mac80211, we set
an ERR ptr in fw_id_to_mac_id.

But if we first set an ERR ptr to fw_id_to_mac_id, and only
then flush the queues, then we won't be able to access the
sequence numbers in ieee80211_sta from the reclaim flow.
This means that we will never be able to release an AGG
queue when a station is deleted.

So first, flush the queue. That will let the reclaim flow
call iwl_mvm_check_ratid_empty which will disable the AGG
queue as needed, and only then, remove the mapping in
fw_id_to_mac_id.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: mvm: respect disable Tx AGG parameter
Emmanuel Grumbach [Tue, 19 Feb 2013 12:39:58 +0000 (14:39 +0200)]
iwlwifi: mvm: respect disable Tx AGG parameter

We didn't check that we allowed to start Tx AGG. This can
possibly be avoided by a module parameter. Fix that.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>