pandora-kernel.git
12 years agortlwifi: rtl8192se: Updates from latest Realtek driver version - Part II
Chaoming Li [Wed, 12 Oct 2011 20:59:09 +0000 (15:59 -0500)]
rtlwifi: rtl8192se: Updates from latest Realtek driver version - Part II

This patch incorporate the differences between the 06/20/2011 and
08/16/2011 Realtek releases of the rtl8192se driver.

The changes include:

1. Fixing some typos in register usage.
2. A change in the handling of decryption status for 802.11w packets.

Signed-off-by: Chaoming Li <chaoming_li@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agortlwifi: rtl8192ce: Add new chip revisions
Chaoming Li [Wed, 12 Oct 2011 02:28:49 +0000 (21:28 -0500)]
rtlwifi: rtl8192ce: Add new chip revisions

This patch incorporate the differences between the 06/20/2011 and
08/16/2011 Realtek releases of the rtlwifi driver.

The changes include:

1. Adding new chip revisions including new firmware.

Signed-off-by: Chaoming Li <chaoming_li@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agortlwifi: Update to new Realtek version - Part I
Chaoming Li [Wed, 12 Oct 2011 02:28:48 +0000 (21:28 -0500)]
rtlwifi: Update to new Realtek version - Part I

This patch incorporate the differences between the 06/20/2011 and
08/16/2011 Realtek releases of the rtlwifi driver.

The changes include:

1. Handling of IEEE80211_HW_CONNECTION_MONITOR.
2. Fix typo to get proper response to nullfunc frames.

Signed-off-by: Chaoming Li <chaoming_li@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agortlwifi: Change PCI drivers to use the new PM framework
Larry Finger [Wed, 12 Oct 2011 02:28:47 +0000 (21:28 -0500)]
rtlwifi: Change PCI drivers to use the new PM framework

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: Populate radiotap header with MCS info for TX frames
Helmut Schaa [Tue, 11 Oct 2011 16:08:55 +0000 (18:08 +0200)]
mac80211: Populate radiotap header with MCS info for TX frames

mac80211 already filled in the MCS rate info for rx'ed frames but tx'ed
frames that are sent to a monitor interface during the status callback
lack this information.

Add the radiotap fields for MCS info to ieee80211_tx_status_rtap_hdr
and populate them when sending tx'ed frames to the monitors.

The needed headroom is only extended by one byte since we don't include
legacy rate information in the rtap header for HT frames.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: Build TX radiotap header dynamically
Helmut Schaa [Tue, 11 Oct 2011 16:08:54 +0000 (18:08 +0200)]
mac80211: Build TX radiotap header dynamically

Get rid of the ieee80211_tx_status_rtap_hdr struct and instead build the
rtap header dynamically. This makes it easier to extend the rtap header
generation in the future.

Add ieee80211_tx_radiotap_len to calculate the expected size of the
rtap header before generating it. Since we can't check if the rtap
header fits into the requested headroom during compile time anymore
add a WARN_ON_ONCE.

Also move the actual rtap header generation into its own function.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: add missing include to iwl-agn-rs.h
Emmanuel Grumbach [Mon, 10 Oct 2011 14:27:19 +0000 (07:27 -0700)]
iwlagn: add missing include to iwl-agn-rs.h

A few were missing

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: remove uneeded include to iwl-dev.h
Emmanuel Grumbach [Mon, 10 Oct 2011 14:27:18 +0000 (07:27 -0700)]
iwlagn: remove uneeded include to iwl-dev.h

iwl-core.c and iwl-trans-pcie-tx.c don't need to include iwl-dev.h

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: move iwl_enable_rfkill_int and kill iwl-helpers.h
Emmanuel Grumbach [Mon, 10 Oct 2011 14:27:17 +0000 (07:27 -0700)]
iwlagn: move iwl_enable_rfkill_int and kill iwl-helpers.h

Move iwl_enable_rfkill_int to iwl-core.h, and remove the empty
iwl-helpers.h

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: move iwl_beacon_time_mask_XXX near to usage
Emmanuel Grumbach [Mon, 10 Oct 2011 14:27:16 +0000 (07:27 -0700)]
iwlagn: move iwl_beacon_time_mask_XXX near to usage

Since iwl_beacon_time_mask_[high,low] are used in iwl-core.c only,
move them to there.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: remove 6000 hw header
Johannes Berg [Mon, 10 Oct 2011 14:27:15 +0000 (07:27 -0700)]
iwlagn: remove 6000 hw header

The constants can be moved together with
the similar ones for other devices and we
can then remove the file.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: remove 5000 hw header
Johannes Berg [Mon, 10 Oct 2011 14:27:14 +0000 (07:27 -0700)]
iwlagn: remove 5000 hw header

The inline function in this header is only used
in a single file, so we can move it there.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: rename iwl-rx.c to iwl-agn-rx.c
Wey-Yi Guy [Mon, 10 Oct 2011 14:27:13 +0000 (07:27 -0700)]
iwlagn: rename iwl-rx.c to iwl-agn-rx.c

After driver split, there were no shared functions between agn and legacy;
rename iwl-rx.c to iwl-agn-rx.c

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: merge station management functions
Wey-Yi Guy [Mon, 10 Oct 2011 14:27:12 +0000 (07:27 -0700)]
iwlagn: merge station management functions

After driver split, no need to separate station management functions
in two files, merge it

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: rename all the mac80211 callback functions
Wey-Yi Guy [Mon, 10 Oct 2011 14:27:11 +0000 (07:27 -0700)]
iwlagn: rename all the mac80211 callback functions

Use the same calling style for all the mac80211 callback functions

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: add debug for mac80211 callback
Wey-Yi Guy [Mon, 10 Oct 2011 14:27:10 +0000 (07:27 -0700)]
iwlagn: add debug for mac80211 callback

Add IWL_DEBUG_MAC80211 debug for all mac80211 callback function

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: don't stop rts/cts until last aggregation queue close
Wey-Yi Guy [Mon, 10 Oct 2011 14:27:09 +0000 (07:27 -0700)]
iwlagn: don't stop rts/cts until last aggregation queue close

Once enable rts/cts for aggregation queue, do not disable until the
last aggregation queue closed.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: more info on warning for shutdown agg queue
Wey-Yi Guy [Mon, 10 Oct 2011 14:27:08 +0000 (07:27 -0700)]
iwlagn: more info on warning for shutdown agg queue

When detect wrong state on shutdown aggregation queue, show more
information for debugging

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlwifi: update comments on how to enable debug flag
Wey-Yi Guy [Mon, 10 Oct 2011 14:27:07 +0000 (07:27 -0700)]
iwlwifi: update comments on how to enable debug flag

Modify comments on how to enable and change debug_level

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: use low retry limit for WoWLAN
Wey-Yi Guy [Mon, 10 Oct 2011 14:27:06 +0000 (07:27 -0700)]
iwlagn: use low retry limit for WoWLAN

When in D3 state, use low retry limit for both data and rts

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: do nothing when disable agg in wrong state
Wey-Yi Guy [Mon, 10 Oct 2011 14:27:05 +0000 (07:27 -0700)]
iwlagn: do nothing when disable agg in wrong state

When disable aggregation request come in on wrong agg state. ignore it

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: warn only once if AGG state is wrong
Emmanuel Grumbach [Mon, 10 Oct 2011 14:27:03 +0000 (07:27 -0700)]
iwlagn: warn only once if AGG state is wrong

This one can be _very_ noisy.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: fix a race in the unmapping of the TFDs
Emmanuel Grumbach [Mon, 10 Oct 2011 14:27:02 +0000 (07:27 -0700)]
iwlagn: fix a race in the unmapping of the TFDs

While inspecting the code, I saw that iwl_tx_queue_unmap modifies
the read pointer of the Tx queue without taking any locks. This means
that it can race with the reclaim flow. This can possibly lead to
a DMA warning complaining that we unmap the same buffer twice.

This is more a W/A than a fix since it is really weird to take
sta_lock inside iwl_tx_queue_unmap, but it can help until we revamp
the locking model in the transport layer.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: Add "_d" sku to 105 series of devices
Wey-Yi Guy [Mon, 10 Oct 2011 14:27:01 +0000 (07:27 -0700)]
iwlagn: Add "_d" sku to 105 series of devices

Add additional sku to 105 series

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: add "_d" sku to 6005 series of devices
Wey-Yi Guy [Mon, 10 Oct 2011 14:27:00 +0000 (07:27 -0700)]
iwlagn: add "_d" sku to 6005 series of devices

Add additional sku to 6005 series of devices

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: set rts retry limit
Wey-Yi Guy [Mon, 10 Oct 2011 14:26:59 +0000 (07:26 -0700)]
iwlagn: set rts retry limit

setup the rts rety limit for tx command

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: remove un-necessary step
Wey-Yi Guy [Mon, 10 Oct 2011 14:26:58 +0000 (07:26 -0700)]
iwlagn: remove un-necessary step

No need to copy twice.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: stop interrupts when suspending
Johannes Berg [Mon, 10 Oct 2011 14:26:57 +0000 (07:26 -0700)]
iwlagn: stop interrupts when suspending

Occasionally, the device will send interrupts
while it is resuming, at a point where we are
not set up again to handle them. This causes
the core IRQ handling to completely disable
the IRQ, and then the driver won't work again
until it is reloaded/rebound.

To fix this issue disable the IRQ on suspend,
this will cause us to only get interrupts
again after we've setup everything on resume.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: eliminate bus pointer from iwl_priv structure
Don Fry [Mon, 10 Oct 2011 14:26:56 +0000 (07:26 -0700)]
iwlagn: eliminate bus pointer from iwl_priv structure

A pointer to the bus structure is still in iwl_priv.  Finish
cleanup and remove it.

Signed-off-by: Don Fry <donald.h.fry@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: kill hw_params.max_stations
Emmanuel Grumbach [Mon, 10 Oct 2011 14:26:55 +0000 (07:26 -0700)]
iwlagn: kill hw_params.max_stations

Not needed since driver split.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: send simple LQ command for WoWLAN
Johannes Berg [Mon, 10 Oct 2011 14:26:54 +0000 (07:26 -0700)]
iwlagn: send simple LQ command for WoWLAN

For some reason, WoWLAN doesn't always seem to
be happy with more advanced LQ commands. Since
we don't need them as we're not going to send
a lot of data, simply program the station with
the very simple default LQ command.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: don't assign seqno to QoS Null frames
Johannes Berg [Mon, 10 Oct 2011 14:26:53 +0000 (07:26 -0700)]
iwlagn: don't assign seqno to QoS Null frames

802.11 says:
"Sequence numbers for QoS (+)Null frames may be
set to any value."

However, if we use the normal counters then peers
will get confused with aggregation since there'll
be holes in the sequence number sequence.

To avoid that, don't assign sequence numbers to
QoS Null frames.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi GUy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: update beacon smarter
Johannes Berg [Mon, 10 Oct 2011 14:26:52 +0000 (07:26 -0700)]
iwlagn: update beacon smarter

Updating the beacon every time right after one was
transmitted is pointless, most of the time we might
not even have to update it. We will update it every
time it changes, which includes from set_tim(), a
callback iwlwifi didn't implement so far.

This also reduces latency for clients, previously
we would update the beacon right after the previous
one was transmitted, and then a TIM change would
only take effect after that again -- updating the
beacon right after the TIM changes makes the TIM
change go out to the air faster.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: add "echo test" command to debugfs
Wey-Yi Guy [Mon, 10 Oct 2011 14:26:51 +0000 (07:26 -0700)]
iwlagn: add "echo test" command to debugfs

For command queue testing, add "echo test" to debugfs

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: check rf kill in queue stuck
Wey-Yi Guy [Mon, 10 Oct 2011 14:26:50 +0000 (07:26 -0700)]
iwlagn: check rf kill in queue stuck

check the RF KILL flag in queue stuck watch dog function

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: add "echo" test when command queue stuck
Wey-Yi Guy [Mon, 10 Oct 2011 14:26:49 +0000 (07:26 -0700)]
iwlagn: add "echo" test when command queue stuck

When detect command queue stuck, instead of reload the firmware
do the "echo" test to make sure it is really stuck before reload

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: add WARN if tx cmd complete come back late
Wey-Yi Guy [Mon, 10 Oct 2011 14:26:48 +0000 (07:26 -0700)]
iwlagn: add WARN if tx cmd complete come back late

For error condition, STATUS_HCMD_ACTIVE already got clear before receive
tx cmd complete, give warning

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: add REPLY_ECHO host command
Wey-Yi Guy [Mon, 10 Oct 2011 14:26:47 +0000 (07:26 -0700)]
iwlagn: add REPLY_ECHO host command

Add "echo" host command for testing and drebugging to make sure uCode still
responding

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: add cmd queue pointer info when timeout
Wey-Yi Guy [Mon, 10 Oct 2011 14:26:46 +0000 (07:26 -0700)]
iwlagn: add cmd queue pointer info when timeout

When detect cmd queue time out, display the current read/write pointer

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoftmac100: fix skb truesize underestimation
Eric Dumazet [Thu, 13 Oct 2011 11:20:08 +0000 (11:20 +0000)]
ftmac100: fix skb truesize underestimation

ftmac100 allocates a page per skb fragment. We must account
PAGE_SIZE increments on skb->truesize, not the actual frag length.

If frame is under 64 bytes, page is freed, so increase truesize only for
bigger frames.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
CC: Po-Yu Chuang <ratbert@faraday-tech.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoniu: fix skb truesize underestimation
Eric Dumazet [Thu, 13 Oct 2011 12:39:27 +0000 (12:39 +0000)]
niu: fix skb truesize underestimation

Add a 'truesize' argument to niu_rx_skb_append(), filled with rcr_size
by the caller to properly account frag sizes in skb->truesize

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agovmxnet3: fix skb truesize underestimation
Eric Dumazet [Thu, 13 Oct 2011 11:38:17 +0000 (11:38 +0000)]
vmxnet3: fix skb truesize underestimation

vmxnet3 allocates a page per skb fragment. We must account
PAGE_SIZE increments on skb->truesize, not the actual frag length.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
CC: Shreyas Bhatewara <sbhatewara@vmware.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoftgmac100: fix skb truesize underestimation
Eric Dumazet [Thu, 13 Oct 2011 11:30:52 +0000 (11:30 +0000)]
ftgmac100: fix skb truesize underestimation

ftgmac100 allocates a page per skb fragment. We must account
PAGE_SIZE increments on skb->truesize, not the actual frag length.

If frame is under 64 bytes, page is freed, and truesize adjusted.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
CC: Po-Yu Chuang <ratbert@faraday-tech.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosky2: fix skb truesize underestimation
Eric Dumazet [Thu, 13 Oct 2011 21:12:46 +0000 (17:12 -0400)]
sky2: fix skb truesize underestimation

sky2 allocates a page per skb fragment. We must account
PAGE_SIZE increments on skb->truesize, not the actual frag length.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoe1000e: fix skb truesize underestimation
Eric Dumazet [Thu, 13 Oct 2011 08:03:36 +0000 (08:03 +0000)]
e1000e: fix skb truesize underestimation

e1000e allocates a page per skb fragment. We must account
PAGE_SIZE increments on skb->truesize, not the actual frag length.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
CC: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoixgbe: fix skb truesize underestimation
Eric Dumazet [Thu, 13 Oct 2011 07:59:41 +0000 (07:59 +0000)]
ixgbe: fix skb truesize underestimation

ixgbe allocates half a page per skb fragment. We must account
PAGE_SIZE/2 increments on skb->truesize, not the actual frag length.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
CC: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoigb: fix skb truesize underestimation
Eric Dumazet [Thu, 13 Oct 2011 07:56:41 +0000 (07:56 +0000)]
igb: fix skb truesize underestimation

e1000 allocates half a page per skb fragment. We must account
PAGE_SIZE/2 increments on skb->truesize, not the actual frag length.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoe1000: fix skb truesize underestimation
Eric Dumazet [Thu, 13 Oct 2011 07:53:42 +0000 (07:53 +0000)]
e1000: fix skb truesize underestimation

e1000 allocates a full page per skb fragment. We must account PAGE_SIZE
increments on skb->truesize, not the actual frag length.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2: fix skb truesize underestimation
Eric Dumazet [Thu, 13 Oct 2011 07:50:19 +0000 (07:50 +0000)]
bnx2: fix skb truesize underestimation

bnx2 allocates a full page per fragment. We must account PAGE_SIZE
increments on skb->truesize, not the actual frag length.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobe2net: fix truesize errors
Eric Dumazet [Thu, 13 Oct 2011 06:31:02 +0000 (06:31 +0000)]
be2net: fix truesize errors

Fix skb truesize underestimations of this driver.

Each frag truesize is exactly rx_frag_size bytes. (2048 bytes per
default)

A driver should not use "sizeof(struct sk_buff)" at all.

Signed-off-by: Eric Dumazet <eric.dumazet>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: more accurate skb truesize
Eric Dumazet [Thu, 13 Oct 2011 07:28:54 +0000 (07:28 +0000)]
net: more accurate skb truesize

skb truesize currently accounts for sk_buff struct and part of skb head.
kmalloc() roundings are also ignored.

Considering that skb_shared_info is larger than sk_buff, its time to
take it into account for better memory accounting.

This patch introduces SKB_TRUESIZE(X) macro to centralize various
assumptions into a single place.

At skb alloc phase, we put skb_shared_info struct at the exact end of
skb head, to allow a better use of memory (lowering number of
reallocations), since kmalloc() gives us power-of-two memory blocks.

Unless SLUB/SLUB debug is active, both skb->head and skb_shared_info are
aligned to cache lines, as before.

Note: This patch might trigger performance regressions because of
misconfigured protocol stacks, hitting per socket or global memory
limits that were previously not reached. But its a necessary step for a
more accurate memory accounting.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
CC: Andi Kleen <ak@linux.intel.com>
CC: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next
David S. Miller [Thu, 13 Oct 2011 18:00:06 +0000 (14:00 -0400)]
Merge git://git./linux/kernel/git/jkirsher/net-next

12 years agoigb: Version bump.
Carolyn Wyborny [Fri, 7 Oct 2011 07:00:27 +0000 (07:00 +0000)]
igb: Version bump.

This change updates the driver version to 3.2.10.

Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoigb: Loopback functionality supports for i350 devices
Akeem G. Abodunrin [Thu, 8 Sep 2011 20:39:48 +0000 (20:39 +0000)]
igb: Loopback functionality supports for i350 devices

This patch adds VMDq loopback pf support for i350 devices. The patch
is necessary since the register that enabled loopback was moved and
renamed from DTXSWC to TXSWC.

Signed-off-by: "Akeem G. Abodunrin" <akeem.g.abodunrin@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoigb: fix static function warnings reported by sparse
Emil Tantilov [Tue, 30 Aug 2011 06:35:04 +0000 (06:35 +0000)]
igb: fix static function warnings reported by sparse

igb_update/validate_nvm_checksum_with_offset() should be static.
Also removes unneeded prototypes for the above functions.

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoigb: Add workaround for byte swapped VLAN on i350 local traffic
Alexander Duyck [Fri, 26 Aug 2011 07:47:11 +0000 (07:47 +0000)]
igb: Add workaround for byte swapped VLAN on i350 local traffic

On i350 when traffic is looped back from a VF to the PF the value is byte
swapped from the normal format.  In order to address this we need to add a
flag indicating that the ring will need to byte swap the loopback packets
prior to processing them.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoigb: Drop unnecessary write of E1000_IMS from igb_msix_other
Alexander Duyck [Fri, 26 Aug 2011 07:47:01 +0000 (07:47 +0000)]
igb: Drop unnecessary write of E1000_IMS from igb_msix_other

Since we mask interrupts in EIMS not in IMS there is no need to re-enable
mask bits in that register.  As such we can remove the write to IMS from
the end of igb_msix_other.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoigb: Fix features that are currently 82580 only and should also be i350
Alexander Duyck [Fri, 26 Aug 2011 07:46:55 +0000 (07:46 +0000)]
igb: Fix features that are currently 82580 only and should also be i350

This change allows support for per packet timesync and global device reset
on the i350 adapter.  These features were supported on both 82580 and i350
however it looks like several checks where not updated and as such the i350
support was not enabled.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoigb: Make certain one vector is always assigned in igb_request_irq
Alexander Duyck [Fri, 26 Aug 2011 07:46:45 +0000 (07:46 +0000)]
igb: Make certain one vector is always assigned in igb_request_irq

This change makes certain that one interrupt is always initialized in
igb_request_irq.  In addition we drop the use of adapter->pdev and
instead just call pdev since we made a local copy of the pointer earlier in
the function.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoigb: avoid unnecessarily creating a local copy of the q_vector
Alexander Duyck [Fri, 26 Aug 2011 07:46:34 +0000 (07:46 +0000)]
igb: avoid unnecessarily creating a local copy of the q_vector

This is mostly a drop of unnecessary pointer defines for q_vector when we
don't have issues with line width and don't have multiple references to
the pointer.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoixgbe: Correct check for change in FCoE priority
Mark Rustad [Tue, 20 Sep 2011 03:00:22 +0000 (03:00 +0000)]
ixgbe: Correct check for change in FCoE priority

Correct a check for change in FCoE priority when IEEE mode DCB is in use.
In IEEE mode a different function has to be used to get the FCoE priority
mask. Also, the check for the mask assumed that only one priority was set.
In case there should be more than one, check just the bit.

These changes help avoid link flapping issues that can come up when IEEE
DCB is in use.

Signed-off-by: Mark Rustad <mark.d.rustad@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoixgbe: Add FCoE DDP allocation failure counters to ethtool stats.
Amir Hanania [Wed, 31 Aug 2011 02:07:55 +0000 (02:07 +0000)]
ixgbe: Add FCoE DDP allocation failure counters to ethtool stats.

Add 2 new counters to ethtool:
1. Count DDP allocation failure since we max the number of buffers
allowed in one DDP context.
2. Count DDP allocation failure since we max the number of buffers
allowed in one DDP context when we alloc an extra buffer.

Signed-off-by: Amir Hanania <amir.hanania@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoixgbe: Add protection from VF invalid target DMA
Greg Rose [Wed, 7 Sep 2011 05:59:35 +0000 (05:59 +0000)]
ixgbe: Add protection from VF invalid target DMA

It is possible for a VF to set an invalid target DMA address in its
Tx/Rx descriptor buffer pointers.  The workarounds in this patch
will guard against such an event and issue a VFLR to the VF in response.
The VFLR will shut down the VF until an administrator can take action
to investigate the event and correct the problem.

Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agonet-netlink: Add a new attribute to expose TOS values via netlink
Murali Raja [Wed, 12 Oct 2011 09:00:35 +0000 (09:00 +0000)]
net-netlink: Add a new attribute to expose TOS values via netlink

This patch exposes the tos value for the TCP sockets when the TOS flag
is requested in the ext_flags for the inet_diag request. This would mainly be
used to expose TOS values for both for TCP and UDP sockets. Currently it is
supported for TCP. When netlink support for UDP would be added the support
to expose the TOS values would alse be done. For IPV4 tos value is exposed
and for IPV6 tclass value is exposed.

Signed-off-by: Murali Raja <muralira@google.com>
Acked-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: wireless: brcm80211: replace ndo_set_multicast_list with ndo_set_rx_mode
Stephen Rothwell [Wed, 12 Oct 2011 02:36:00 +0000 (13:36 +1100)]
net: wireless: brcm80211: replace ndo_set_multicast_list  with ndo_set_rx_mode

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomwifiex: add support for Marvell pcie8766 chipset
Amitkumar Karwar [Wed, 12 Oct 2011 00:41:21 +0000 (17:41 -0700)]
mwifiex: add support for Marvell pcie8766 chipset

This patch supports 88W8766P chipset with a PCIe interface.

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

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Ramesh Radhakrishnan <rramesh@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Frank Huang <frankh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agocipso: remove an unneeded NULL check in cipso_v4_doi_add()
Dan Carpenter [Tue, 11 Oct 2011 22:43:53 +0000 (18:43 -0400)]
cipso: remove an unneeded NULL check in cipso_v4_doi_add()

We dereference doi_def on the line before the NULL check.  It has
been this way since 2008.  I checked all the callers and doi_def is
always non-NULL here.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoath9k: only send FCS-fail packets to mac80211 if requested
Felix Fietkau [Sat, 8 Oct 2011 20:02:59 +0000 (22:02 +0200)]
ath9k: only send FCS-fail packets to mac80211 if requested

Prevents lots of broken frames from showing up on monitor interfaces
by default.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: fix a regression in key miss handling
Felix Fietkau [Sat, 8 Oct 2011 20:02:58 +0000 (22:02 +0200)]
ath9k_hw: fix a regression in key miss handling

The commit "ath9k_hw: Fix incorrect key_miss handling" changed the code
to only report key miss errors if a MIC error wasn't reported.
When checking the flags in that order in the MAC code, it might miss some
real events, because the value of the MIC error flag is undefined under
some conditions.

The primary issue addressed by the previous commit is making sure that
MIC errors are properly reported on the STA side. This can be fixed in
a better way by adding a separate rx status flag for key miss and
ignoring it for multicast frames.

This fix slightly improves stability in AP mode on some older hardware,
like AR9132.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Cc: stable@kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: remove EEP_REG_1
Felix Fietkau [Sat, 8 Oct 2011 18:06:22 +0000 (20:06 +0200)]
ath9k_hw: remove EEP_REG_1

It was previously used for current_rd_ext

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath: remove ath_regulatory::current_rd_ext
Felix Fietkau [Sat, 8 Oct 2011 18:06:21 +0000 (20:06 +0200)]
ath: remove ath_regulatory::current_rd_ext

It is unused since the previous dead code that was using it had been
removed earlier.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: clean up tx power handling
Felix Fietkau [Sat, 8 Oct 2011 18:06:20 +0000 (20:06 +0200)]
ath9k_hw: clean up tx power handling

The code for handling various restrictions concerning regulatory limits,
antenna gain, etc. is very convoluted and duplicated across various
EEPROM parsing implementations, making it hard to review.

This patch partially cleans up the mess by unifying regulatory limit
handling in one function and simplifying handling of antenna gain.
It also removes unused transmit power scaling arrays from the EEPROM code,
which belonged to an unimplemented API that isn't supposed to be in
the driver anyway.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: make ath9k_hw_set_interrupts use ah->imask by default
Felix Fietkau [Sat, 8 Oct 2011 18:06:19 +0000 (20:06 +0200)]
ath9k_hw: make ath9k_hw_set_interrupts use ah->imask by default

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: disable unnecessary PHY error reporting
Felix Fietkau [Sat, 8 Oct 2011 13:49:57 +0000 (15:49 +0200)]
ath9k: disable unnecessary PHY error reporting

PHY errors relevant for ANI are always tracked by hardware counters, the
bits that allow them to pass through the rx filter are independent of that.
Enabling PHY errors in the rx filter often creates lots of useless DMA traffic
and might be responsible for some of the rx dma stop failure warnings.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Cc: stable@kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agob43: trivial: do not report any link quality instead of invalid one
Rafał Miłecki [Fri, 7 Oct 2011 20:39:35 +0000 (22:39 +0200)]
b43: trivial: do not report any link quality instead of invalid one

We don't want to report random quality info (new PHYs are affected).

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agortlwifi: Change debug parameter to apply to individual drivers
Larry Finger [Fri, 7 Oct 2011 16:27:33 +0000 (11:27 -0500)]
rtlwifi: Change debug parameter to apply to individual drivers

The current debug parameter is applied to rtlwifi, which means that all
loaded drivers have the same level of debugging applied. In addition,
the previous method requires a two-step load process to enable debugging.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: dont orphan TX skb
Johannes Berg [Fri, 7 Oct 2011 12:55:40 +0000 (14:55 +0200)]
mac80211: dont orphan TX skb

This was another workaround for truesize "bugs".
The reason we did this was that when we orphaned
the SKB it wouldn't be truesize-checked later.
Now that the check is gone (and we just charge
the former smaller size to the socket) there's
no longer a reason to orphan the skb here.

Keep the skb charged to the socket until it is
really freed (or orphaned in TX status). This
helps flow control and allows us to get at the
socket later for other purposes.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: dont adjust truesize
Johannes Berg [Fri, 7 Oct 2011 12:55:39 +0000 (14:55 +0200)]
mac80211: dont adjust truesize

There's no need to adjust truesize.

The history of this was that we always ran into
skb_truesize_bug (via skb_truesize_check) which
has since been removed in commit 92a0acce186cd.
skb_truesize_check() checked that truesize  was
bigger or equal to the actual allocation, which
would trigger in mac80211 due to header adding.
The check no longer exists and we shouldn't be
messing with the truesize anwyay.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: parse radiotap header earlier
Johannes Berg [Fri, 7 Oct 2011 12:01:26 +0000 (14:01 +0200)]
mac80211: parse radiotap header earlier

We can now move the radiotap header parsing into
ieee80211_monitor_start_xmit(). This moves it out of
the hotpath, and also helps the code since now the
radiotap header will no longer be present in
ieee80211_xmit() etc. which is easier to understand.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: move fragment flag to info flag as dont-fragment
Johannes Berg [Fri, 7 Oct 2011 12:01:25 +0000 (14:01 +0200)]
mac80211: move fragment flag to info flag as dont-fragment

The purpose of this is two-fold:
 1) by moving it out of tx_data.flags, we can in
    another patch move the radiotap parsing so it
    no longer is in the hotpath
 2) if a device implements fragmentation but can
    optionally skip it, the radiotap request for
    not doing fragmentation may be honoured

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: remove tx_data ethertype
Johannes Berg [Fri, 7 Oct 2011 12:01:24 +0000 (14:01 +0200)]
mac80211: remove tx_data ethertype

It's set, but never used, so kill it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: optimise monitor xmit
Johannes Berg [Fri, 7 Oct 2011 12:01:23 +0000 (14:01 +0200)]
mac80211: optimise monitor xmit

Since the only way the interface can be a monitor
interface in ieee80211_xmit() is because the frame
came from ieee80211_monitor_start_xmit() we can
move all the code there.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: Update injection documentation
Helmut Schaa [Fri, 7 Oct 2011 09:53:41 +0000 (11:53 +0200)]
mac80211: Update injection documentation

Add documentation about NOACK tx flag usage.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: fix retry counting / BAR handling during queue flush
Felix Fietkau [Fri, 7 Oct 2011 00:28:15 +0000 (02:28 +0200)]
ath9k: fix retry counting / BAR handling during queue flush

When tx is suspended temporarily and the queue is flushed, do not increase
the retry count or attempt to send out BAR frames. Instead simply retry
the affected subframes normally after the reset.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: improve PS filter clearing and retry counting for A-MPDU
Felix Fietkau [Fri, 7 Oct 2011 00:28:14 +0000 (02:28 +0200)]
ath9k: improve PS filter clearing and retry counting for A-MPDU

Do not increment the retry counter if packets to a sleeping station
were not sent because of tx failure, instead of only checking the filter
flag.
Clear the PS filter only after an A-MPDU was reported as filtered,
otherwise the hardware might do some unnecessary extra retransmissions.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: keep track of what's triggering hardware resets
Felix Fietkau [Fri, 7 Oct 2011 00:28:13 +0000 (02:28 +0200)]
ath9k: keep track of what's triggering hardware resets

Export how many times each of the reset triggers has fired through debugfs.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: indicate which queues are blocked when stopping tx fails
Felix Fietkau [Fri, 7 Oct 2011 00:28:12 +0000 (02:28 +0200)]
ath9k: indicate which queues are blocked when stopping tx fails

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: Fix regression that allowed mpaths between non-peers.
Javier Cardona [Thu, 6 Oct 2011 21:54:22 +0000 (14:54 -0700)]
mac80211: Fix regression that allowed mpaths between non-peers.

Mesh paths should only exist over established peer links.

Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomwifiex: fix smatch errors
Yogesh Ashok Powar [Wed, 5 Oct 2011 21:58:24 +0000 (14:58 -0700)]
mwifiex: fix smatch errors

drivers/net/wireless/mwifiex/main.c +828 mwifiex_remove_card(52)
  error: potential null derefence 'priv'.
drivers/net/wireless/mwifiex/main.c +828 mwifiex_remove_card(52)
  error: we previously assumed 'priv' could be null (see line 820)
drivers/net/wireless/mwifiex/txrx.c +90 mwifiex_process_tx(24)
  error: potential null derefence 'local_tx_pd'.
drivers/net/wireless/mwifiex/sta_ioctl.c +766
mwifiex_rate_ioctl_set_rate_value(30)
  error: buffer overflow 'rate' 14 <= 14

Cc: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: remove some bogus error handling code
Dan Carpenter [Wed, 5 Oct 2011 05:48:20 +0000 (08:48 +0300)]
ath9k: remove some bogus error handling code

If "axq_qnum >= ARRAY_SIZE(sc->tx.txq)", then the call to
ath9k_hw_releasetxqueue() would read beyond the end of the ah->txq[]
array and possibly corrupt memory.  Fortunately,
ath9k_hw_setuptxqueue() doesn't return high values of "axq_qnum" and
this code can be removed.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath5k: remove some unneeded error handling code
Dan Carpenter [Wed, 5 Oct 2011 05:46:37 +0000 (08:46 +0300)]
ath5k: remove some unneeded error handling code

th5k_hw_setup_tx_queue() returns a valid offset into the ah->ah_txq[]
array.  The ah->ah_txq[] and the ah->txqs[] array are the same size.
Both have AR5K_NUM_TX_QUEUES elements.  So this error handling code
will never trigger.

Also it's wrong.  The call to ath5k_hw_release_tx_queue() with a qnum
of AR5K_NUM_TX_QUEUES or more will just trigger a WARN_ON() and
return.  Or if it missed the WARN_ON(), it would just corrupt some
memory and return.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: fix offchannel TX cookie matching
Johannes Berg [Tue, 4 Oct 2011 16:27:10 +0000 (18:27 +0200)]
mac80211: fix offchannel TX cookie matching

When I introduced in-kernel off-channel TX I
introduced a bug -- the work can't be canceled
again because the code clear the skb pointer.
Fix this by keeping track separately of whether
TX status has already been reported.

Cc: stable@kernel.org [2.6.38+]
Reported-by: Jouni Malinen <j@w1.fi>
Tested-by: Jouni Malinen <j@w1.fi>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: separate init calib and rt calib
Wey-Yi Guy [Tue, 4 Oct 2011 14:10:19 +0000 (07:10 -0700)]
iwlagn: separate init calib and rt calib

My previous patch for init calib cfg disable a set of calibration for both
init and runtime which cause performance issue, Fix it

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: pass no-CCK flag through to HW scan
Johannes Berg [Tue, 4 Oct 2011 13:07:33 +0000 (15:07 +0200)]
mac80211: pass no-CCK flag through to HW scan

This is needed so that offloaded scan can do the
right thing. Without this patch, the no_cck flag
contains random values from the kernel heap.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoMerge branch 'for-linville' of git://github.com/lucacoelho/wl12xx
John W. Linville [Tue, 11 Oct 2011 19:56:29 +0000 (15:56 -0400)]
Merge branch 'for-linville' of git://github.com/lucacoelho/wl12xx

12 years agonet: wireless: add brcm80211 drivers
Arend van Spriel [Wed, 5 Oct 2011 11:19:03 +0000 (13:19 +0200)]
net: wireless: add brcm80211 drivers

Add the brcm80211 tree to drivers/net/wireless, and disable the version that's
in drivers/staging.  This version includes the sources currently in staging,
plus any changes that have been sent out for review.

Sources in staging will be deleted in a followup patch.

Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoMerge branch 'for-davem' of git://git.infradead.org/users/linville/wireless-next
David S. Miller [Tue, 11 Oct 2011 19:39:21 +0000 (15:39 -0400)]
Merge branch 'for-davem' of git://git.infradead.org/users/linville/wireless-next

12 years agoMerge branch 'master' of git://git.infradead.org/users/linville/wireless-next into...
John W. Linville [Tue, 11 Oct 2011 19:35:42 +0000 (15:35 -0400)]
Merge branch 'master' of git://git.infradead.org/users/linville/wireless-next into for-davem

Conflicts:
Documentation/feature-removal-schedule.txt

12 years agoath6kl: fixup merge damage in ath6kl_mgmt_tx
John W. Linville [Tue, 11 Oct 2011 19:33:10 +0000 (15:33 -0400)]
ath6kl: fixup merge damage in ath6kl_mgmt_tx

  CC [M]  drivers/net/wireless/ath/ath6kl/cfg80211.o
drivers/net/wireless/ath/ath6kl/cfg80211.c:1838:2: warning: initialization from incompatible pointer type

Caused by commit e9f935e3e8dc0bddd0df6d148165d95925422502...

Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next
David S. Miller [Tue, 11 Oct 2011 19:24:56 +0000 (15:24 -0400)]
Merge git://git./linux/kernel/git/jkirsher/net-next