pandora-kernel.git
14 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
David S. Miller [Tue, 19 Jan 2010 19:43:42 +0000 (11:43 -0800)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-next-2.6

Conflicts:
drivers/net/wireless/iwlwifi/iwl-core.h

14 years agoipv4: allow warming up the ARP cache with request type gratuitous ARP
Octavian Purdila [Mon, 18 Jan 2010 12:58:44 +0000 (12:58 +0000)]
ipv4: allow warming up the ARP cache with request type gratuitous ARP

If the per device ARP_ACCEPT option is enable, currently we only allow
creating new ARP cache entries for response type gratuitous ARP.

Allowing gratuitous ARP to create new ARP entries (not only to update
existing ones) is useful when we want to avoid unnecessary delays for
the first packet of a stream.

This patch allows request type gratuitous ARP to create new ARP cache
entries as well. This is useful when we want to populate the ARP cache
entries for a large number of hosts on the same LAN.

Signed-off-by: Octavian Purdila <opurdila@ixiacom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoppp_generic.c severly whitespace damanged by 9c705260feea6ae329bc6b6d5f6d2ef0227eda0a
Lennart Sorensen [Mon, 18 Jan 2010 12:59:55 +0000 (12:59 +0000)]
ppp_generic.c severly whitespace damanged by 9c705260feea6ae329bc6b6d5f6d2ef0227eda0a

I was just looking at ppp_generic, and noticed that it fairly recently
(as in the last year) got rather mangled with many spaces turned into tabs
in places they very much shouldn't have been.  I tracked it down to commit
9c705260feea6ae329bc6b6d5f6d2ef0227eda0a (ppp: ppp_mp_explode() redesign).

I am amazed if that patch passed the patch checking script.  I have no
idea what kind of weird editor setting did this, but it has to have been a
weird editor setting or a very unfortunate search and replace gone wrong.
I only found it trying to apply a patch I was playing with and wondering
why it wouldn't apply.  Then I found there were tabs in the middle of
comments that used to be spaces.

Well here is a patch that should fix it up as far as I can tell.

Purely whitespace repair.  No actual code changes.

Signed-off-by: Len Sorensen <lsorense@csclub.uwaterloo.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net: Eliminate useless code
Julia Lawall [Mon, 18 Jan 2010 08:29:19 +0000 (00:29 -0800)]
drivers/net: Eliminate useless code

The variable qdev is initialized twice to the same (side effect-free)
expression.  Drop one initialization.

A simplified version of the semantic match that finds this problem is:
(http://coccinelle.lip6.fr/)

// <smpl>
@forall@
idexpression *x;
identifier f!=ERR_PTR;
@@

x = f(...)
... when != x
(
x = f(...,<+...x...+>,...)
|
* x = f(...)
)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobnx2: Save statistics during reset.
Michael Chan [Sun, 17 Jan 2010 07:30:44 +0000 (07:30 +0000)]
bnx2: Save statistics during reset.

MTU changes, ring size changes, etc cause the chip to be reset and the
statisctics flushed.  To keep track of the accumulated statistics, we
add code to save the whole statistics block before reset.  We also
modify the macros and statistics functions to return the sum of the
saved and current counters.

Based on original patch by Breno Leitao <leitao@linux.vnet.ibm.com>

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobnx2: Refine statistics code.
Michael Chan [Sun, 17 Jan 2010 07:30:43 +0000 (07:30 +0000)]
bnx2: Refine statistics code.

Refine the statistics macros by passing in just the name of the
counter field.  This makes it a lot easier and cleaner to add
counters saved before the last reset in the next patch.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: spread __net_init, __net_exit
Alexey Dobriyan [Sun, 17 Jan 2010 03:35:32 +0000 (03:35 +0000)]
net: spread __net_init, __net_exit

__net_init/__net_exit are apparently not going away, so use them
to full extent.

In some cases __net_init was removed, because it was called from
__net_exit code.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotcp: account SYN-ACK timeouts & retransmissions
Octavian Purdila [Mon, 18 Jan 2010 03:09:39 +0000 (19:09 -0800)]
tcp: account SYN-ACK timeouts & retransmissions

Currently we don't increment SYN-ACK timeouts & retransmissions
although we do increment the same stats for SYN. We seem to have lost
the SYN-ACK accounting with the introduction of tcp_syn_recv_timer
(commit 2248761e in the netdev-vger-cvs tree).

This patch fixes this issue. In the process we also rename the v4/v6
syn/ack retransmit functions for clarity. We also add a new
request_socket operations (syn_ack_timeout) so we can keep code in
inet_connection_sock.c protocol agnostic.

Signed-off-by: Octavian Purdila <opurdila@ixiacom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoNET: Add Qlogic ethernet driver for CNA devices
Amit Kumar Salecha [Wed, 13 Jan 2010 00:37:26 +0000 (00:37 +0000)]
NET: Add Qlogic ethernet driver for CNA devices

o Separate Ethernet driver for Qlogic CNA devices

Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqlcnic: Qlogic ethernet driver for CNA devices
Amit Kumar Salecha [Wed, 13 Jan 2010 00:37:25 +0000 (00:37 +0000)]
qlcnic: Qlogic ethernet driver for CNA devices

o 1G/10G Ethernet Driver for Qlgic QLE8240 and QLE8242 CNA devices.

Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agomacvlan: add GRO bit to features mask
Patrick Mullaney [Sat, 16 Jan 2010 09:05:38 +0000 (01:05 -0800)]
macvlan: add GRO bit to features mask

Allow macvlan devices to support GRO.

Signed-off-by: Patrick Mullaney <pmullaney@novell.com>
Acked-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqlge: Add module param to force firmware core dump.
Ron Mercer [Fri, 15 Jan 2010 13:31:34 +0000 (13:31 +0000)]
qlge: Add module param to force firmware core dump.

Default setting is 'off', don't allow force firmware dump.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqlge: Add xgmac reg blocks to firwmare dump.
Ron Mercer [Fri, 15 Jan 2010 13:31:33 +0000 (13:31 +0000)]
qlge: Add xgmac reg blocks to firwmare dump.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqlge: Add serdes reg blocks dump to firmware dump.
Ron Mercer [Fri, 15 Jan 2010 13:31:32 +0000 (13:31 +0000)]
qlge: Add serdes reg blocks dump to firmware dump.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqlge: Add alternate function's reg dump to fw dump.
Ron Mercer [Fri, 15 Jan 2010 13:31:31 +0000 (13:31 +0000)]
qlge: Add alternate function's reg dump to fw dump.

Get the 2nd (other) nic function register values.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqlge: Add RAM dump to firmware dump.
Ron Mercer [Fri, 15 Jan 2010 13:31:30 +0000 (13:31 +0000)]
qlge: Add RAM dump to firmware dump.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqlge: Add probe regs to firmware dump.
Ron Mercer [Fri, 15 Jan 2010 13:31:29 +0000 (13:31 +0000)]
qlge: Add probe regs to firmware dump.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqlge: Add basic firmware dump.
Ron Mercer [Fri, 15 Jan 2010 13:31:28 +0000 (13:31 +0000)]
qlge: Add basic firmware dump.

Adding the infrstructure and basic data for the firmware
core dump.
The firmware coredump is turned OFF by default.  There will be no
memory allocations for data dumps to the log.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqlge: Add data for firmware dump.
Ron Mercer [Fri, 15 Jan 2010 13:31:27 +0000 (13:31 +0000)]
qlge: Add data for firmware dump.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agob43: N-PHY: drop unused definition, uncomment needed call
Rafał Miłecki [Fri, 15 Jan 2010 15:38:07 +0000 (16:38 +0100)]
b43: N-PHY: drop unused definition, uncomment needed call

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43: N-PHY: implement TX power control coef setup
Rafał Miłecki [Fri, 15 Jan 2010 15:24:57 +0000 (16:24 +0100)]
b43: N-PHY: implement TX power control coef setup

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43: N-PHY: add RX IQ calibrationi for rev < 3
Rafał Miłecki [Fri, 15 Jan 2010 15:20:56 +0000 (16:20 +0100)]
b43: N-PHY: add RX IQ calibrationi for rev < 3

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43: N-PHY: add huge calculating TX IQ LO
Rafał Miłecki [Fri, 15 Jan 2010 15:10:48 +0000 (16:10 +0100)]
b43: N-PHY: add huge calculating TX IQ LO

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43: N-PHY: implement calculating IQ gain params
Rafał Miłecki [Fri, 15 Jan 2010 15:08:25 +0000 (16:08 +0100)]
b43: N-PHY: implement calculating IQ gain params

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43: N-PHY: update TX calibration ladder
Rafał Miłecki [Fri, 15 Jan 2010 15:06:35 +0000 (16:06 +0100)]
b43: N-PHY: update TX calibration ladder

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43: N-PHY: add RX radio cores calibration
Rafał Miłecki [Fri, 15 Jan 2010 14:55:18 +0000 (15:55 +0100)]
b43: N-PHY: add RX radio cores calibration

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43: N-PHY: add TX LP FBW (TX filter 40 related)
Rafał Miłecki [Fri, 15 Jan 2010 14:51:55 +0000 (15:51 +0100)]
b43: N-PHY: add TX LP FBW (TX filter 40 related)

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43: N-PHY: implement getting TX gains
Rafał Miłecki [Fri, 15 Jan 2010 14:40:50 +0000 (15:40 +0100)]
b43: N-PHY: implement getting TX gains

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43: N-PHY: implement calculating RX IQ comp
Rafał Miłecki [Fri, 15 Jan 2010 14:29:05 +0000 (15:29 +0100)]
b43: N-PHY: implement calculating RX IQ comp

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43: N-PHY: implement RX IQ estimation
Rafał Miłecki [Fri, 15 Jan 2010 14:26:12 +0000 (15:26 +0100)]
b43: N-PHY: implement RX IQ estimation

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43: N-PHY: implement restoring general configuration
Rafał Miłecki [Fri, 15 Jan 2010 14:18:35 +0000 (15:18 +0100)]
b43: N-PHY: implement restoring general configuration

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>a
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43: N-PHY: implement workaround for TX IQ
Rafał Miłecki [Fri, 15 Jan 2010 14:17:10 +0000 (15:17 +0100)]
b43: N-PHY: implement workaround for TX IQ

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43: N-PHY: implement RX IQ coeffs
Rafał Miłecki [Fri, 15 Jan 2010 14:16:25 +0000 (15:16 +0100)]
b43: N-PHY: implement RX IQ coeffs

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43: N-PHY: add function than forces (not) staying in carrier search
Rafał Miłecki [Fri, 15 Jan 2010 14:10:54 +0000 (15:10 +0100)]
b43: N-PHY: add function than forces (not) staying in carrier search

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43: N-PHY: add RSSI calibration restore
Rafał Miłecki [Fri, 15 Jan 2010 14:06:47 +0000 (15:06 +0100)]
b43: N-PHY: add RSSI calibration restore

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>`
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43: N-PHY: implement PA overriding (RF control related)
Rafał Miłecki [Fri, 15 Jan 2010 14:02:38 +0000 (15:02 +0100)]
b43: N-PHY: implement PA overriding (RF control related)

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43: N-PHY: RSSI calibration for rev < 3
Rafał Miłecki [Fri, 15 Jan 2010 13:48:21 +0000 (14:48 +0100)]
b43: N-PHY: RSSI calibration for rev < 3

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43: N-PHY: add RSSI polling and setting 2055 (radio) VCM
Rafał Miłecki [Fri, 15 Jan 2010 13:45:13 +0000 (14:45 +0100)]
b43: N-PHY: add RSSI polling and setting 2055 (radio) VCM

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43: N-PHY: implement RSSI selection and offset scaling
Rafał Miłecki [Fri, 15 Jan 2010 13:38:32 +0000 (14:38 +0100)]
b43: N-PHY: implement RSSI selection and offset scaling

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43: N-PHY: add clip detection reading/writing and some classifier function
Rafał Miłecki [Fri, 15 Jan 2010 13:31:39 +0000 (14:31 +0100)]
b43: N-PHY: add clip detection reading/writing and some classifier function

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43: N-PHY: split RSSI calibration into 2 functions (rev2, rev3)
Rafał Miłecki [Fri, 15 Jan 2010 12:40:58 +0000 (13:40 +0100)]
b43: N-PHY: split RSSI calibration into 2 functions (rev2, rev3)

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43: N-PHY: update CCA reset
Rafał Miłecki [Fri, 15 Jan 2010 12:36:43 +0000 (13:36 +0100)]
b43: N-PHY: update CCA reset

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43: N-PHY: update init code to match current specs
Rafał Miłecki [Fri, 15 Jan 2010 12:27:29 +0000 (13:27 +0100)]
b43: N-PHY: update init code to match current specs

Previous init path was based on old specs from old driver. Update it
as much as possible leaving some TODOs for not implemented functions.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43: N-PHY: add various tables
Rafał Miłecki [Fri, 15 Jan 2010 12:02:45 +0000 (13:02 +0100)]
b43: N-PHY: add various tables

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43: N-PHY: add global variables to b43_phy_n struct
Rafał Miłecki [Fri, 15 Jan 2010 11:54:30 +0000 (12:54 +0100)]
b43: N-PHY: add global variables to b43_phy_n struct

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43: N-PHY: add missing register definitions
Rafał Miłecki [Fri, 15 Jan 2010 11:40:03 +0000 (12:40 +0100)]
b43: N-PHY: add missing register definitions

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43: N-PHY: add needed struct definitions
Rafał Miłecki [Fri, 15 Jan 2010 11:34:21 +0000 (12:34 +0100)]
b43: N-PHY: add needed struct definitions

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43: N-PHY: add shared memory offsets definitions
Rafał Miłecki [Fri, 15 Jan 2010 11:27:46 +0000 (12:27 +0100)]
b43: N-PHY: add shared memory offsets definitions

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43: N-PHY: clean table init, check PHY rev
Rafał Miłecki [Fri, 15 Jan 2010 11:18:21 +0000 (12:18 +0100)]
b43: N-PHY: clean table init, check PHY rev

Move table init to tables_nphy.c, detect newer PHY which use different init.
We don't init newer PHYs yet but this at least shows what more is needed.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43: add new SSB's core id for BCM4328
Rafał Miłecki [Fri, 15 Jan 2010 11:10:53 +0000 (12:10 +0100)]
b43: add new SSB's core id for BCM4328

Following line shows my BCM4328 detected on SSB. We didn't include 0x0C rev.
ssb: Core 1 found: IEEE 802.11 (cc 0x812, rev 0x0C, vendor 0x4243)

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43: use standard fls for finding the most significant bit
Rafał Miłecki [Fri, 15 Jan 2010 11:01:49 +0000 (12:01 +0100)]
b43: use standard fls for finding the most significant bit

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: implement coverage class support
Felix Fietkau [Fri, 15 Jan 2010 01:34:58 +0000 (02:34 +0100)]
ath9k: implement coverage class support

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: cleanup slot time and ack/cts timeout handling
Felix Fietkau [Fri, 15 Jan 2010 01:33:40 +0000 (02:33 +0100)]
ath9k: cleanup slot time and ack/cts timeout handling

Previously ath9k left the initialization of slot timing and ACK/CTS
timeout to the mode specific initvals. This does not handle short vs
long slot in 2.4 GHz and uses a rather strange value for the 2.4 GHz
ACK timeout (64 usec).
This patch uses the proper ath9k_hw functions for setting slot time and
timeouts and also implements the switch between short and long slot
time in 2.4 GHz

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: fix memory leak in ieee80211_send_probe_req
Ming Lei [Fri, 15 Jan 2010 13:44:21 +0000 (21:44 +0800)]
mac80211: fix memory leak in ieee80211_send_probe_req

This patch fixes memory leak in ieee80211_send_probe_req, which
is introduced in 7c12ce8b854df346388ea56d684784e3484012cf:

mac80211: use Probe Request template when sending a direct scan

The patch is against the latest wireless-test tree.

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Reviewed-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: force use_short_slot=true for 5GHz
Felix Fietkau [Fri, 15 Jan 2010 02:00:48 +0000 (03:00 +0100)]
mac80211: force use_short_slot=true for 5GHz

Normally 5GHz does not have a concept of long vs short slot time,
however the slot time that it ends up using is the same as for 2.4 GHZ
and use_short_slot == true
Because of that, it makes more sense to force use_short_slot = true
whenever 5 GHz is being used, so that this particular check does not
have to be in every single driver that uses this flag.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agocfg80211: make regulatory_hint_11d() band specific
Luis R. Rodriguez [Fri, 15 Jan 2010 01:08:20 +0000 (20:08 -0500)]
cfg80211: make regulatory_hint_11d() band specific

In practice APs do not send country IE channel triplets for channels
the AP is not operating on and if they were to do so they would have
to use the regulatory extension which we currently do not process.
No AP has been seen in practice that does this though so just drop
those country IEs.

Additionally it has been noted the first series of country IE
channels triplets are specific to the band the AP sends. Propagate
the band on which the country IE was found on reject the country
IE then if the triplets are ever oustide of the band.

Although we now won't process country IE information with multiple
band information we leave the intersection work as is as it is
technically possible for someone to want to eventually process these
type of country IEs with regulatory extensions.

Cc: Jouni Malinen <jouni.malinen@atheros.com>
Cc: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: Fixed netif_tx_wake_all_queues in IBSS mode
Benoit Papillault [Thu, 14 Jan 2010 22:20:31 +0000 (23:20 +0100)]
mac80211: Fixed netif_tx_wake_all_queues in IBSS mode

When ieee80211_offchannel_return is called, it needs to re-enabled TX
queues that have been stopped in ieee80211_offchannel_stop_beaconing or
ieee80211_offchannel_stop_station. It happens if we are doing a scan with an
IBSS interface. In this case, the interface stopped transmitting.

Signed-off-by: Benoit Papillault <benoit.papillault@free.fr>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoethoc: Use resource_size
Tobias Klauser [Fri, 15 Jan 2010 09:48:22 +0000 (01:48 -0800)]
ethoc: Use resource_size

Use the resource_size function instead of manually calculating the
resource size.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agocan: mscan-mpc5xxx: fix broken support for the MPC5200
Wolfgang Grandegger [Thu, 14 Jan 2010 01:05:48 +0000 (01:05 +0000)]
can: mscan-mpc5xxx: fix broken support for the MPC5200

Due to an invalid "#ifdef CONFIG_PPC_MPC5200", the real clock setup
function was not called for the MPC5200.

Signed-off-by: Wolfgang Grandegger <wg@denx.de>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agovhost_net: a kernel-level virtio server
Michael S. Tsirkin [Thu, 14 Jan 2010 06:17:27 +0000 (06:17 +0000)]
vhost_net: a kernel-level virtio server

What it is: vhost net is a character device that can be used to reduce
the number of system calls involved in virtio networking.
Existing virtio net code is used in the guest without modification.

There's similarity with vringfd, with some differences and reduced scope
- uses eventfd for signalling
- structures can be moved around in memory at any time (good for
  migration, bug work-arounds in userspace)
- write logging is supported (good for migration)
- support memory table and not just an offset (needed for kvm)

common virtio related code has been put in a separate file vhost.c and
can be made into a separate module if/when more backends appear.  I used
Rusty's lguest.c as the source for developing this part : this supplied
me with witty comments I wouldn't be able to write myself.

What it is not: vhost net is not a bus, and not a generic new system
call. No assumptions are made on how guest performs hypercalls.
Userspace hypervisors are supported as well as kvm.

How it works: Basically, we connect virtio frontend (configured by
userspace) to a backend. The backend could be a network device, or a tap
device.  Backend is also configured by userspace, including vlan/mac
etc.

Status: This works for me, and I haven't see any crashes.
Compared to userspace, people reported improved latency (as I save up to
4 system calls per packet), as well as better bandwidth and CPU
utilization.

Features that I plan to look at in the future:
- mergeable buffers
- zero copy
- scalability tuning: figure out the best threading model to use

Note on RCU usage (this is also documented in vhost.h, near
private_pointer which is the value protected by this variant of RCU):
what is happening is that the rcu_dereference() is being used in a
workqueue item.  The role of rcu_read_lock() is taken on by the start of
execution of the workqueue item, of rcu_read_unlock() by the end of
execution of the workqueue item, and of synchronize_rcu() by
flush_workqueue()/flush_work(). In the future we might need to apply
some gcc attribute or sparse annotation to the function passed to
INIT_WORK(). Paul's ack below is for this RCU usage.

(Includes fixes by Alan Cox <alan@linux.intel.com>,
David L Stevens <dlstevens@us.ibm.com>,
Chris Wright <chrisw@redhat.com>)

Acked-by: Rusty Russell <rusty@rustcorp.com.au>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agomm: export use_mm/unuse_mm to modules
Michael S. Tsirkin [Thu, 14 Jan 2010 06:17:18 +0000 (06:17 +0000)]
mm: export use_mm/unuse_mm to modules

vhost net module wants to do copy to/from user from a kernel thread,
which needs use_mm. Export it to modules.

Acked-by: Andrea Arcangeli <aarcange@redhat.com>
Acked-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotun: export underlying socket
Michael S. Tsirkin [Thu, 14 Jan 2010 06:17:09 +0000 (06:17 +0000)]
tun: export underlying socket

Tun device looks similar to a packet socket
in that both pass complete frames from/to userspace.

This patch fills in enough fields in the socket underlying tun driver
to support sendmsg/recvmsg operations, and message flags
MSG_TRUNC and MSG_DONTWAIT, and exports access to this socket
to modules.  Regular read/write behaviour is unchanged.

This way, code using raw sockets to inject packets
into a physical device, can support injecting
packets into host network stack almost without modification.

First user of this interface will be vhost virtualization
accelerator.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agocan: Proper ctrlmode handling for CAN devices
Christian Pellegrin [Thu, 14 Jan 2010 07:08:34 +0000 (07:08 +0000)]
can: Proper ctrlmode handling for CAN devices

This patch adds error checking of ctrlmode values for CAN devices. As
an example all availabe bits are implemented in the mcp251x driver.

Signed-off-by: Christian Pellegrin <chripell@fsfe.org>
Acked-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonetxen: fix sparse warning
Amit Kumar Salecha [Thu, 14 Jan 2010 01:53:24 +0000 (01:53 +0000)]
netxen: fix sparse warning

Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonetxen: fix license header
Amit Kumar Salecha [Thu, 14 Jan 2010 01:53:23 +0000 (01:53 +0000)]
netxen: fix license header

GNU General Public License is in file "COPYING".

Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonetxen: fix endianness intr coalesce
Amit Kumar Salecha [Thu, 14 Jan 2010 01:53:22 +0000 (01:53 +0000)]
netxen: fix endianness intr coalesce

Before sending Interrupt coalesce parameters to device,
convert them in little endian.

Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonetxen: fix endianness read mac address
Amit Kumar Salecha [Thu, 14 Jan 2010 01:53:21 +0000 (01:53 +0000)]
netxen: fix endianness read mac address

In netxen_read_mac_addr, mac_addr should be declared
u64 instead of __le64, used by host only.

Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoipv4: Use less conflicting local var name in change_nexthops() loop macro.
David S. Miller [Fri, 15 Jan 2010 09:16:40 +0000 (01:16 -0800)]
ipv4: Use less conflicting local var name in change_nexthops() loop macro.

As noticed by H Hartley Sweeten, since change_nexthops() uses 'nh'
as it's iterator variable, it can conflict with other existing
local vars.

Use "nexthop_nh" to avoid the conflict and make it easier to figure
out where this magic variable comes from.

Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet/core/sock.c: quiet sparse noise
H Hartley Sweeten [Fri, 15 Jan 2010 09:08:58 +0000 (01:08 -0800)]
net/core/sock.c: quiet sparse noise

In sock_getsockopt the symbol 'lv' is declared as an
unsigned int type, probably due to sizeof returning a
size_t which is really an unsigned int.

This produces a sparse warning for SO_PEERNAME due to
the sock->ops->getname() call:

warning: incorrect type in argument 3 (different signedness)
   expected int *sockaddr_len
   got unsigned int *<noident>

Quiet the warning by changing the type of 'lv' to an int.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoStaging: r8187se: Fix compile error from wireless-testing commit 7044cc56
Larry Finger [Thu, 14 Jan 2010 19:13:47 +0000 (13:13 -0600)]
Staging: r8187se: Fix compile error from wireless-testing commit 7044cc56

In wireless-testing, commit 7044cc56 added struct ieee80211_hdr_3addr
to include/linux/ieee80211.h. This definition collides with one that is
in the r8187se driver in staging.

The conflict is resolved by changing r8187se to use the definition from
include/linuc/ieee80211.h.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agocfg80211: Ingore country IEs with a zero set of number of channels
Luis R. Rodriguez [Thu, 14 Jan 2010 18:27:46 +0000 (13:27 -0500)]
cfg80211: Ingore country IEs with a zero set of number of channels

Previous to this and the last patch, titled,

"cfg80211: Fix 2 GHz subband calculation for country IEs"

we would end up treating these IEs as single channel units. These are in
fact just bogus IE triplets so ignore the entire IE if these are found.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: improve powersave documentation
Kalle Valo [Thu, 14 Jan 2010 11:09:21 +0000 (13:09 +0200)]
mac80211: improve powersave documentation

There has been some confusion how drivers should implement powersave
support. Improve the documentation a bit to make it more clear what
drivers need to do. Also mention about U-APSD.

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: fix mac80211.h documentation warnings
Kalle Valo [Thu, 14 Jan 2010 11:09:14 +0000 (13:09 +0200)]
mac80211: fix mac80211.h documentation warnings

There were some warnings about missing documentation and a missing reference.

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: Fix panic on driver load
Sujith [Thu, 14 Jan 2010 04:50:57 +0000 (10:20 +0530)]
ath9k: Fix panic on driver load

The device has to be marked as invalid before
registering the ISR. HW initialization takes place
after the ISR has been registered, and the invalid
flag is eventually cleared in the ->stop() callback.

Reported-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoRemove config option B43_LEGACY_RFKILL completely
Christoph Egger [Wed, 13 Jan 2010 13:36:24 +0000 (14:36 +0100)]
Remove config option B43_LEGACY_RFKILL completely

In f41f3f373dd72344c65d801d6381fe83ef3a2c54 the B43 driver was ported
to use the cfg80211 API for rfkill and consequently the config option
was dropped (RFKILL is now unconditionally enabled).

However in the Kernel Info the feature is still checked and reported
missing. This patch just removes the conditional and the relevant code
blocks while still reporting that feature unconditionally would be
another option (it's always there).

Signed-off-by: Christoph Egger <siccegge@stud.informatik.uni-erlangen.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1271: remove unused flags
Luis R. Rodriguez [Tue, 12 Jan 2010 23:23:04 +0000 (18:23 -0500)]
wl1271: remove unused flags

These are unused and as with a previous patch 5ef5da for wl1251
this removes some other unused flags. the IRQ_MASK specifically
conflicts with include/pcmcia/cs.h when using compat-wireless.

Cc: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43legacy: Declare all possible ucodeX.fw files
Tim Gardner [Tue, 12 Jan 2010 18:58:17 +0000 (12:58 -0600)]
b43legacy: Declare all possible ucodeX.fw files

Enhance module information with the names of the firmware files
that could be used by this driver. This helps tools like Jockey to
correctly detect and/or install the firmware files relevant to
this driver.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agocfg80211: fix 2 GHz subband calculation for country IEs
Luis R. Rodriguez [Thu, 7 Jan 2010 22:24:55 +0000 (17:24 -0500)]
cfg80211: fix 2 GHz subband calculation for country IEs

Country IEs triplets are getting an extra channel with
the current count. This does not affect regulatory because
we always took the intersection between what the AP gave
and what CRDA believed is correct.

This however does fix processing some Country IEs with multiple
sequential 2 GHz triplets. Since our parser and the spec mandates
all channels be monitonically increasing we would drop the IE after
noticing the second triplet begins on a channel already processed.
APs that send these type of country IEs seems rare though.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43: Declare at least one real firmware file using MODULE_FIRMWARE.
Tim Gardner [Thu, 7 Jan 2010 18:10:38 +0000 (11:10 -0700)]
b43: Declare at least one real firmware file using MODULE_FIRMWARE.

BugLink: http://bugs.launchpad.net/bugs/488636
Enhances module information with the names of the firmware files
that could be used by this driver. This helps tools like Jockey to
correctly detect and/or install the firmware files relevant to
this driver.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoRevert "iwmc3200wifi: fix array out-of-boundary access"
John W. Linville [Thu, 14 Jan 2010 22:00:54 +0000 (17:00 -0500)]
Revert "iwmc3200wifi: fix array out-of-boundary access"

This reverts commit 6c853da3f30c93eae847ecbcd9fdf10ba0da04c2.

From Message-ID: <1262663293.551.117.camel@debian>
On Sat, 2010-01-02 at 22:09 +0800, Dan Carpenter wrote:
> It don't think 6c853da3f30c93 is right.  That's the patch
> titled "iwmc3200wifi: fix array out-of-boundary access"
>
>       Allocate priv->rx_packets[IWM_RX_ID_HASH + 1] because the max array
>       index is IWM_RX_ID_HASH according to IWM_RX_ID_GET_HASH().
>
> In 2.6.33-rc2 IWM_RX_ID_GET_HASH() doesn't go as high as IWM_RX_ID_HASH
> and I don't see any array out-of-bounds.
>
> #define IWM_RX_ID_GET_HASH(id) ((id) % IWM_RX_ID_HASH)

Ah, you are right. I took '%' for '&'. John, would you revert it? Sorry
for the false alarm.

Thanks,
-yi

Reported-by: Dan Carpenter <error27@gmail.com>
Reviewed-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoproc_fops: convert drivers/isdn/ to seq_file
Alexey Dobriyan [Thu, 14 Jan 2010 11:10:54 +0000 (03:10 -0800)]
proc_fops: convert drivers/isdn/ to seq_file

Convert code away from ->read_proc/->write_proc interfaces.  Switch to
proc_create()/proc_create_data() which make addition of proc entries
reliable wrt NULL ->proc_fops, NULL ->data and so on.

Problem with ->read_proc et al is described here commit
786d7e1612f0b0adb6046f19b906609e4fe8b1ba "Fix rmmod/read/write races in
/proc entries"

[akpm@linux-foundation.org: CONFIG_PROC_FS=n build fix]
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: Karsten Keil <keil@b1-systems.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonetpoll: allow execution of multiple rx_hooks per interface
Daniel Borkmann [Tue, 12 Jan 2010 14:27:30 +0000 (14:27 +0000)]
netpoll: allow execution of multiple rx_hooks per interface

Signed-off-by: Daniel Borkmann <danborkmann@googlemail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agogenetlink: optimize ctrl_dumpfamily()
Samir Bellabes [Thu, 7 Jan 2010 22:10:56 +0000 (22:10 +0000)]
genetlink: optimize ctrl_dumpfamily()

there is a unnecessary test which can be replaced by a good initialization in
the 'for' statement

Noticed by Serge E. Hallyn <serue@us.ibm.com>

Signed-off-by: Samir Bellabes <sam@synack.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/tlan: Remove TRUE/FALSE defines, use bool
Joe Perches [Tue, 12 Jan 2010 20:59:13 +0000 (20:59 +0000)]
drivers/net/tlan: Remove TRUE/FALSE defines, use bool

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqeth: default BLKT values for new OSA/3 hardware
Einar Lueck [Mon, 11 Jan 2010 02:50:52 +0000 (02:50 +0000)]
qeth: default BLKT values for new OSA/3 hardware

Set default BLKT values for new OSA/3 hardware.

Signed-off-by: Einar Lueck <elelueck@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqeth: avoid recovery during device online setting
Ursula Braun [Mon, 11 Jan 2010 02:50:51 +0000 (02:50 +0000)]
qeth: avoid recovery during device online setting

If a qeth device is set online, several initialisation steps are
performed. If a failure in one of these steps occurs, the qeth
device is reset into DOWN state. If due to the failure a qeth recovery
is scheduled and started in another thread, this might cause all kinds
of conflicts, even a kernel panic. The patch forbids scheduling of a
qeth recovery while online processing is performed till the card is in
state SOFTSETUP.

Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqeth: HiperSockets Network Traffic Analyzer
Ursula Braun [Mon, 11 Jan 2010 02:50:50 +0000 (02:50 +0000)]
qeth: HiperSockets Network Traffic Analyzer

New feature to trace HiperSockets network traffic for debugging
purposes.

Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoe1000e: genericize the update multicast address list
Bruce Allan [Wed, 13 Jan 2010 02:05:38 +0000 (02:05 +0000)]
e1000e: genericize the update multicast address list

Make updating the multicast address list generic for all families and
enforce the requirement to update the entire multicast table array all at
once instead of piecemeal which causes problems on some parts.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoe1000e: provide MAC-family-specific function to set LAN ID
Bruce Allan [Wed, 13 Jan 2010 02:05:18 +0000 (02:05 +0000)]
e1000e: provide MAC-family-specific function to set LAN ID

Provide MAC-specific function pointer to determine the LAN ID (PCI func).
The LAN ID is used internally by the driver to determine which h/w lock
to use to protect accessing the PHY on ESB2 as well as help to determine
the alternate MAC address on some parts.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoe1000e: use alternate MAC address on ESB2 if available
Bruce Allan [Wed, 13 Jan 2010 02:04:58 +0000 (02:04 +0000)]
e1000e: use alternate MAC address on ESB2 if available

Similar to 82571/2/3 parts that already do this, if ESB2/80003es2lan parts
have an alternate MAC address provided in the EEPROM use it instead of the
default MAC address.  This patch makes the the actual code that does this
generic so that it can be better used by both MAC families.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agolib/vsprintf.c: Add IPV4 options %pI4[hnbl] for host, network, big and little endian
Joe Perches [Thu, 14 Jan 2010 04:23:30 +0000 (20:23 -0800)]
lib/vsprintf.c: Add IPV4 options %pI4[hnbl] for host, network, big and little endian

This should allow the removal of the #defines and uses
of NIPQUAD and NIPQUAD_FMT

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agomwl8k: update version number (to 0.12) and copyright
Lennert Buytenhek [Tue, 12 Jan 2010 12:51:38 +0000 (13:51 +0100)]
mwl8k: update version number (to 0.12) and copyright

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomwl8k: enable multi-BSS AP operation
Lennert Buytenhek [Tue, 12 Jan 2010 12:51:30 +0000 (13:51 +0100)]
mwl8k: enable multi-BSS AP operation

As follows:
- GET_HW_SPEC is now responsible for setting
  priv->{ap,sta}_macids_supported, which are bitmasks of supported
  macids for AP and STA mode.  (Typically, STA firmware images will
  support only one macid, #0, in STA mode, and AP firmware images
  will support macids #0-7, in AP mode.)
- Our wiphy ->interfaces_modes is now set based on the non-zero-ness
  of these two bitmasks.
- We main priv->macids_used, a bitmask of which macids are currently
  in use.  ->add_interface() will assign the lowest free macid for
  this interface type as it is created, or bail out if there are no
  more free macids to assign.  ->delete_interface() will mark the
  macid as being free again.

This enables the multi-BSS code added in the previous commits.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomwl8k: post per-vif firmware commands as per-vif commands
Lennert Buytenhek [Tue, 12 Jan 2010 12:50:36 +0000 (13:50 +0100)]
mwl8k: post per-vif firmware commands as per-vif commands

SET_BEACON, SET_MAC_ADDR, BSS_START and SET_NEW_STN are the currently
supported firmware commands that are actually per-vif commands.  Use
mwl8k_post_pervif_cmd() for these commands, so that the macid of the
vif they operate on gets passed down into the firmware.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomwl8k: prepare for posting per-vif firmware commands
Lennert Buytenhek [Tue, 12 Jan 2010 12:50:14 +0000 (13:50 +0100)]
mwl8k: prepare for posting per-vif firmware commands

One of the bytes in the mwl8k firmware command header is the 'macid'
byte, which for per-vif commands indicates which of the BSSes this
command is intended for.  (For commands that are not per-vif commands,
this byte can just be 0.)

This patch adds mwl8k_post_pervif_cmd(), which will take the macid
assigned to this interface (to be done in ->add_interface()), copy it
into the command packet macid field, and post the command as usual.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomwl8k: convert the priv->vif pointer to a list of vifs
Lennert Buytenhek [Tue, 12 Jan 2010 12:49:51 +0000 (13:49 +0100)]
mwl8k: convert the priv->vif pointer to a list of vifs

To prepare for adding multi-BSS support.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomwl8k: use firmware capability field to decide which bands to register
Lennert Buytenhek [Tue, 12 Jan 2010 12:49:41 +0000 (13:49 +0100)]
mwl8k: use firmware capability field to decide which bands to register

Make the decision about whether to register the 2.4 and 5 GHz bands
with mac80211 by looking at the capability field in GET_HW_SPEC (STA
firmware only for now).  This enables 5 GHz STA operation.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomwl8k: allow selecting 5 GHz channels
Lennert Buytenhek [Tue, 12 Jan 2010 12:49:18 +0000 (13:49 +0100)]
mwl8k: allow selecting 5 GHz channels

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomwl8k: handle 5 GHz legacy rate bitmaps in firmware commands
Lennert Buytenhek [Tue, 12 Jan 2010 12:49:15 +0000 (13:49 +0100)]
mwl8k: handle 5 GHz legacy rate bitmaps in firmware commands

Whenever mac80211 gives us a legacy rate bitmap in the context of the
5 GHz band, we need to remember to shift the bitmap left by 5 positions
before giving it to the firmware, as the firmware follows the bitmap
bit assignment of the 2.4 GHz rate table even if we're on the 5 GHz
band, and the 2.4 GHz rate table includes five non-OFDM rates at the
start that are not valid in the 5 GHz band.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomwl8k: properly set receive status rate index on 5 GHz receive
Lennert Buytenhek [Tue, 12 Jan 2010 12:48:56 +0000 (13:48 +0100)]
mwl8k: properly set receive status rate index on 5 GHz receive

The mwl8k firmware uses indices into the 2.4 GHz band rate table for
the receive descriptor channel field even if the packet was received
on a 5 GHz channel, while mac80211 expects an index into the 5 GHz
band rate table when packets are received on the 5 GHz band, which
presents a mismatch as the 5 GHz band rate table lacks the five
non-OFDM rates that the 2.4 GHz rate table starts with.

To handle this properly, we need to substract 5 from the rate index
field if the packet was received on a 5 GHz channel (and was not
received at an MCS rate).

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>