deliverable/linux.git
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./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./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>
11 years agoiwlwifi: a few fixes in license
Emmanuel Grumbach [Mon, 18 Feb 2013 07:22:28 +0000 (09:22 +0200)] 
iwlwifi: a few fixes in license

7000.c was released as GPL only by mistake: it should be
dual licensed - GPL / BSD.
The file that contains the license in the kernel is COPYING
and not LICENSE.GPL.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoMerge remote-tracking branch 'iwlwifi-fixes/master' into HEAD
Johannes Berg [Wed, 6 Mar 2013 15:46:25 +0000 (16:46 +0100)] 
Merge remote-tracking branch 'iwlwifi-fixes/master' into HEAD

This is needed to resolve some conflicts that would otherwise
happen between wireless-next and the code here.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agomac80211: init mesh timer for user authed STAs
Thomas Pedersen [Sat, 2 Mar 2013 06:02:52 +0000 (22:02 -0800)] 
mac80211: init mesh timer for user authed STAs

There is a corner case which wasn't being covered:
userspace may authenticate and allocate stations,
but still leave the peering up to the kernel.

Initialize the peering timer if the MPM is not in
userspace, in a path which is taken by both the kernel and
userspace when allocating stations.

Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agomac80211: disallow changing auto_open_plinks
Thomas Pedersen [Mon, 4 Mar 2013 21:06:14 +0000 (13:06 -0800)] 
mac80211: disallow changing auto_open_plinks

while user MPM is running.

Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agonl80211: user_mpm overrides auto_open_plinks
Thomas Pedersen [Mon, 4 Mar 2013 21:06:13 +0000 (13:06 -0800)] 
nl80211: user_mpm overrides auto_open_plinks

If the user requested a userspace MPM, automatically
disable auto_open_plinks to fully disable the kernel MPM.

Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agomac80211: support userspace MPM
Thomas Pedersen [Mon, 4 Mar 2013 21:06:12 +0000 (13:06 -0800)] 
mac80211: support userspace MPM

Earlier mac80211 would check whether some kind of mesh
security was enabled, when the real question was "is the
MPM in userspace"?

Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agocfg80211: rename mesh station types
Thomas Pedersen [Mon, 4 Mar 2013 21:06:11 +0000 (13:06 -0800)] 
cfg80211: rename mesh station types

The mesh station types used to refer to whether the
station was secure or nonsecure. Really the salient
information is whether it is managed by the kernel or
userspace

Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agonl80211: explicit userspace MPM
Thomas Pedersen [Mon, 4 Mar 2013 21:06:10 +0000 (13:06 -0800)] 
nl80211: explicit userspace MPM

Secure mesh had the implicit requirement that the Mesh
Peering Management entity be in userspace.  However
userspace might want to implement an open MPM as well, so
specify a mesh setup parameter to indicate this.

Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agomac80211: improve minstrels rate sorting by means of throughput & probability
Thomas Huehn [Mon, 4 Mar 2013 22:30:07 +0000 (23:30 +0100)] 
mac80211: improve minstrels rate sorting by means of throughput & probability

This patch improves the way minstrel sorts rates according to throughput
and success probability. 3 FOR-loops across the entire rate set in function
minstrel_update_stats() which where used to determine the fastest, second
fastest and most robust rate are reduced to 1 FOR-loop.

The sorted list of rates according throughput is extended to the best four
rates as we need them in upcoming joint rate and power control. The sorting
is done via the new function minstrel_sort_best_tp_rates().

The most robust rate selection is aligned with minstrel_ht's approach.
Once any success probability is above 95% the one with the highest
throughput is chosen as most robust rate. If success probabilities of all
rates are below 95%, the rate with the highest succ. prob. is elected as
most robust one

Acked-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Thomas Huehn <thomas@net.t-labs.tu-berlin.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agomac80211: treat minstrel success probabilities below 10% as implausible
Thomas Huehn [Mon, 4 Mar 2013 22:30:06 +0000 (23:30 +0100)] 
mac80211: treat minstrel success probabilities below 10% as implausible

Based on minstrel_ht this patch treats success probabilities below 10% as
implausible values for throughput calculation in minstrel's statistics.
Current throughput per rate with such a low success probability is reset
to 0 MBit/s.

Acked-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Thomas Huehn <thomas@net.t-labs.tu-berlin.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agomac80211: add lowest rate into minstrel's random rate sampling table
Thomas Huehn [Mon, 4 Mar 2013 22:30:05 +0000 (23:30 +0100)] 
mac80211: add lowest rate into minstrel's random rate sampling table

While minstrel bootstraps and fills the success probabilities of each
rate the lowest rate has typically a very high success probability
(often 100% in our tests).
Its statistics are never updated but considered to setup the mrr chain.
In our tests we see that especially the 3rd mrr stage (which is that
rate providing highest success probability) is filled with the lowest rate
because its initial high sucess probability is never updated. By design
the 4th mrr stage is filled with the lowest rate so often 3rd and 4th
mrr stage are equal.

This patch follows minstrels general approach of assuming as little
as possible about rate dependencies. Consequently we include the
lowest rate into the random sampling table to get balanced up-to-date
statistics of all rates and therefore balanced decisions.

Acked-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Thomas Huehn <thomas@net.t-labs.tu-berlin.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agomac80211: extend minstrel's rate sampling to avoid unsampled rates
Thomas Huehn [Mon, 4 Mar 2013 22:30:04 +0000 (23:30 +0100)] 
mac80211: extend minstrel's rate sampling to avoid unsampled rates

Minstrel's decision which rate should be directly sampled within the
1st mrr stage is limited to such rates faster than the current max
throughput rate. All rates below the current max. throughput rate
are indirectly sampled via the 2nd mrr stage.
This approach leads to deprecated per rate statistics and therfore
a deprecated mrr chain setup.

This patch uses the sampling approach from minstrel_ht. A counter is
added to sum all indirect sample attempts per rate. After 20 indirect
sampling attempts the rate is directly sampled within the 1st mrr stage.
Therefore more up-to-date statistics for all rates are maintained and
used to setup the mrr chain.

Acked-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Thomas Huehn <thomas@net.t-labs.tu-berlin.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agomac80211: add documentation and verbose variable names in
Thomas Huehn [Mon, 4 Mar 2013 22:30:03 +0000 (23:30 +0100)] 
mac80211: add documentation and verbose variable names in

Add documentation and more verbose variable names to minstrel's
multi-rate-retry setup within function minstrel_get_rate() to
increase the readability of the algorithm.

Acked-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Thomas Huehn <thomas@net.t-labs.tu-berlin.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agomac80211: merge value scaling macros of minstrel_ht and minstrel
Thomas Huehn [Mon, 4 Mar 2013 22:30:02 +0000 (23:30 +0100)] 
mac80211: merge value scaling macros of minstrel_ht and minstrel

Both minstrel versions use individual ways to scale up integer values
to perform calculations. Merge minstrel_ht's scaling macros into
minstrels header file and use them in both minstrel versions.

Acked-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Thomas Huehn <thomas@net.t-labs.tu-berlin.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agomac80211: merge EWMA calculation of minstrel_ht and minstrel
Thomas Huehn [Mon, 4 Mar 2013 22:30:01 +0000 (23:30 +0100)] 
mac80211: merge EWMA calculation of minstrel_ht and minstrel

Both rate control algorithms (minstrel and minstrel_ht) calculate
averages based on EWMA. Shift function minstrel_ewma() into
rc80211_minstrel.h and make use of it in both minstrel version.
Also shift the default EWMA level (75%) definition to the header file
and clean up variable usage.

Acked-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Thomas Huehn <thomas@net.t-labs.tu-berlin.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agomac80211/minstrel_ht: disable multiple consecutive sample attempts
Felix Fietkau [Tue, 5 Mar 2013 13:20:19 +0000 (14:20 +0100)] 
mac80211/minstrel_ht: disable multiple consecutive sample attempts

The last minstrel_ht changes increased the sampling frequency for
potentially useful rates to decrease the response time to rate
fluctuations. This caused an increase in sampling frequency that can
slightly reduce throughput, so this patch limits the sampling attempts
to one per rate instead of two.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoregulatory: allow VHT channels in world roaming
Johannes Berg [Mon, 3 Dec 2012 21:09:22 +0000 (22:09 +0100)] 
regulatory: allow VHT channels in world roaming

For VHT, the wider bandwidths (up to 160 MHz) need
to be allowed. Since world roaming only covers the
case of connecting to an AP, it can be opened up
there, we will rely on the AP to know the local
regulations.

Acked-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This page took 0.073696 seconds and 5 git commands to generate.