platform/kernel/linux-3.10.git
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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

13 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>
13 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>
13 years agowl12xx: disable AP-mode-specific quirks
Eliad Peller [Wed, 5 Oct 2011 09:55:38 +0000 (11:55 +0200)]
wl12xx: disable AP-mode-specific quirks

The current wl12xx fw (7.3.0.0.77) supports both STA and AP mode, and
we no longer use AP-mode-specific quirks.

WL12XX_QUIRK_END_OF_TRANSACTION is still used for certain HWs, while
WL12XX_QUIRK_LPD_MODE is not used anymore.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: Add support for HW channel switch
Shahar Levi [Thu, 8 Sep 2011 10:01:33 +0000 (13:01 +0300)]
wl12xx: Add support for HW channel switch

The wl12xx FW supports HW channel switch.  If we don't use it,
sometimes the firmware gets confused when recalibrating to the new
channel, causing RX problems.  This commit adds HW channel switch
support by implementing the channell_switch op.

Signed-off-by: Shahar Levi <shahar_levi@ti.com>
[added one comment, remove the tx_flush and rephrased the commit message]
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: set max_sched_scan_ie_len correctly
Luciano Coelho [Tue, 27 Sep 2011 13:22:35 +0000 (16:22 +0300)]
wl12xx: set max_sched_scan_ie_len correctly

The wiphy max_sched_scan_ie_len attribute was not set correctly and
remained as 0, so when IEs were being passed in a scheduled scan, we
were returning -EINVAL.

Fix this by setting the attribute properly.

Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: configure rate policy for p2p operations
Eliad Peller [Mon, 3 Oct 2011 10:06:36 +0000 (12:06 +0200)]
wl12xx: configure rate policy for p2p operations

p2p packets should go out only with OFDM rates.

Configure a new rate policy that will (later) be used
during p2p_find (when the p2p_cli / p2p_go interfaces
are in use, we won't have to use this policy, as
the configured rates should already be OFDM-only).

Additionally, update CONF_TX_MAX_RATE_CLASSES to reflect
the current value from the fw api.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agoMerge branch 'master' of git://github.com/padovan/bluetooth-next
John W. Linville [Tue, 4 Oct 2011 18:06:47 +0000 (14:06 -0400)]
Merge branch 'master' of git://github.com/padovan/bluetooth-next

13 years agoath9k_hw: set pci_express capability true for AR9480
Mohammed Shafi Shajakhan [Fri, 30 Sep 2011 06:01:28 +0000 (11:31 +0530)]
ath9k_hw: set pci_express capability true for AR9480

the AR_SREV register does not seems to indicate whether AR9480 is
pci_express capable or not though the other information like macVersion
etc can be obtained properly. this fix is essential as ASPM won't be intialized
and its related driver functionality ath9k_hw_configpcipowersave won't be
called

Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: Fix number of GPIO pins for AR9287/9300
Mohammed Shafi Shajakhan [Fri, 30 Sep 2011 06:01:27 +0000 (11:31 +0530)]
ath9k_hw: Fix number of GPIO pins for AR9287/9300

this patch fixes the assumption of maximum number of GPIO pins present
in AR9287/AR9300. this fix is essential as we might encounter some
functionality issues involved in accessing the status of GPIO pins which
are all incorrectly assumed to be not within the range of max_num_gpio
of AR9300/AR9287 chipsets

Cc: stable@kernel.org
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agolibertas: detect TX lockups and reset hardware
Daniel Drake [Mon, 3 Oct 2011 10:33:02 +0000 (11:33 +0100)]
libertas: detect TX lockups and reset hardware

Recent patches added support for resetting the SD8686 hardware when
commands time out, which seems to happen quite frequently soon after
resuming the system from a Wake-on-WLAN-triggered resume.

At http://dev.laptop.org/ticket/10969 we see the same thing happen
with transmits. In this case, the hardware will fail to respond to
a frame passed for transmission, and libertas (correctly) will block
all further commands and transmissions as the hardware can only
deal with one thing at a time. This results in a lockup while the
system waits indefinitely for the dead card to respond.

Hook up a TX lockup timer to detect this and reset the hardware.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: pass vif param to conf_tx() callback
Eliad Peller [Sun, 2 Oct 2011 08:15:52 +0000 (10:15 +0200)]
mac80211: pass vif param to conf_tx() callback

tx params should be configured per interface.
add ieee80211_vif param to the conf_tx callback,
and change all the drivers that use this callback.

The following spatch was used:
@rule1@
struct ieee80211_ops ops;
identifier conf_tx_op;
@@
ops.conf_tx = conf_tx_op;

@rule2@
identifier rule1.conf_tx_op;
identifier hw, queue, params;
@@
conf_tx_op (
- struct ieee80211_hw *hw,
+ struct ieee80211_hw *hw, struct ieee80211_vif *vif,
u16 queue,
const struct ieee80211_tx_queue_params *params) {...}

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlagn: rename iwlagn module iwlwifi and alias to iwlagn.
Don Fry [Fri, 30 Sep 2011 18:40:20 +0000 (11:40 -0700)]
iwlagn: rename iwlagn module iwlwifi and alias to iwlagn.

Rename the iwlagn module as iwlwifi in preparation for future
changes.  Add an alias to iwlagn for backward compatibility.

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>
13 years agoath9k_hw: extend GPIO pin select mask for rfkill
Mohammed Shafi Shajakhan [Fri, 30 Sep 2011 06:47:28 +0000 (12:17 +0530)]
ath9k_hw: extend GPIO pin select mask for rfkill

this extends the bits for rf kill GPIO selection to [7:2] from [4:2] as
we use GPIO pin 11 as rfkill for AR9480 and also remove few unused
macros

Cc: Wilson Tsao <wtsao@qca.qualcomm.com>
Cc: "Hu, Russell" <rhu@qca.qualcomm.com>
Cc: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomwifiex: handle an error path correctly
Amitkumar Karwar [Fri, 30 Sep 2011 03:43:41 +0000 (20:43 -0700)]
mwifiex: handle an error path correctly

In failure case locks are not allocated in mwifiex_register().
So mwifiex_free_lock_list() routine call becomes redundant.
Also we don't need to check return type for mwifiex_init_lock_list()
routine. It never fails.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomwifiex: correct AMSDU aggregation check
Amitkumar Karwar [Fri, 30 Sep 2011 03:43:40 +0000 (20:43 -0700)]
mwifiex: correct AMSDU aggregation check

The commit "mwifiex: remove list traversal.."(fcf2176c87..)
wrongly modifies AMSDU aggregation check. Due to this even though
packet size for iperf traffic is already large, we unnecessarily
try to aggregate them which adds some delay. If Tx iperf is started
on UUT for 30 seconds, UUT keeps sending Tx packets for few more
seconds.

That commit is reverted to fix the problem.
Also, MIN_NUM_AMSDU check is moved inside the loop to optimize the
loop.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.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>
13 years agoath9k_htc: add AVM FRITZ!WLAN 11N v2 support
Luis R. Rodriguez [Thu, 29 Sep 2011 17:42:19 +0000 (10:42 -0700)]
ath9k_htc: add AVM FRITZ!WLAN 11N v2 support

This was reported and tested by Martin Walter over at AVM GmbH Berlin.
This also applies to 3.0.1 so sendint to stable.

Cc: s.kirste@avm.de
Cc: d.friedel@avm.de
Cc: Martin Walter <m.walter@avm.de>
Cc: Peter Grabienski <pgrabien@qca.qualcomm.com>
Cc: stable@kernel.org
Tested-by: Martin Walter <m.walter@avm.de>
Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: Send nullfunc frames at lower rate during connection monitor
Rajkumar Manoharan [Thu, 29 Sep 2011 15:04:04 +0000 (20:34 +0530)]
mac80211: Send nullfunc frames at lower rate during connection monitor

Recently mac80211 was changed to use nullfunc instead of probe
request for connection monitoring for tx ack status reporting
hardwares. Sometimes in congested network, STA got disconnected
quickly after the association. It was observered that the rate
control was not adopted to environment due to minimal transmission.

As the nullfunc are used for monitoring purpose, these frames should
not be sacrificed for rate control updation. So it is better to send
the monitoring null func frames at minimum rate that could help to
retain the connection.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agonet:rfkill: add a gpio setup function into GPIO rfkill
Sangwook Lee [Thu, 29 Sep 2011 11:57:17 +0000 (12:57 +0100)]
net:rfkill: add a gpio setup function into GPIO rfkill

Add a gpio setup function which gives a chance to set up
platform specific configuration such as pin multiplexing,
input/output direction at the runtime or booting time.

Signed-off-by: Sangwook Lee <sangwook.lee@linaro.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: Allow noack flag overwrite for injected frames
Helmut Schaa [Thu, 29 Sep 2011 11:42:25 +0000 (13:42 +0200)]
mac80211: Allow noack flag overwrite for injected frames

Allow injected unicast frames to be sent without having to wait
for an ACK.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoMerge branch 'for-linville' of git://github.com/kvalo/ath6kl
John W. Linville [Mon, 3 Oct 2011 18:59:35 +0000 (14:59 -0400)]
Merge branch 'for-linville' of git://github.com/kvalo/ath6kl

13 years agoath6kl: include vmalloc.h in debug.c
Kalle Valo [Mon, 3 Oct 2011 10:44:40 +0000 (13:44 +0300)]
ath6kl: include vmalloc.h in debug.c

Fixes compilation errors when compiling for ARM:

ath6kl/debug.c:312: error: implicit declaration of function 'vmalloc'
ath6kl/debug.c:312: warning: assignment makes pointer from integer without a cast
ath6kl/debug.c:342: error: implicit declaration of function 'vfree'
ath6kl/debug.c:696: warning: assignment makes pointer from integer without a cast
ath6kl/debug.c:871: warning: assignment makes pointer from integer without a cast

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
13 years agoath6kl: fix size_t related warnings
Kalle Valo [Sat, 1 Oct 2011 06:43:09 +0000 (09:43 +0300)]
ath6kl: fix size_t related warnings

My earlier debug log additions added these warnings when compiling 64 bit
kernels:

ath6kl/init.c:962: warning: format '%d' expects type 'int',
  but argument 3 has type 'size_t'
ath6kl/init.c:975: warning: format '%d' expects type 'int',
  but argument 3 has type 'size_t'
ath6kl/init.c:988: warning: format '%d' expects type 'int',
  but argument 3 has type 'size_t'
ath6kl/init.c:1009: warning: format '%d' expects type 'int',
  but argument 3 has type 'size_t'
ath6kl/init.c:1192: warning: format '%d' expects type 'int',
  but argument 4 has type 'size_t'
ath6kl/init.c:1236: warning: format '%d' expects type 'int',
  but argument 4 has type 'size_t'
ath6kl/init.c:1267: warning: format '%d' expects type 'int',
  but argument 4 has type 'size_t'

Reported-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
13 years agomac80211: dont assign seqno to or aggregate QoS Null frames
Johannes Berg [Thu, 29 Sep 2011 14:04:41 +0000 (16:04 +0200)]
mac80211: dont assign seqno to or aggregate 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, neither assign a sequence number
to QoS null frames nor put them on aggregation.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: document client powersave
Johannes Berg [Thu, 29 Sep 2011 14:04:40 +0000 (16:04 +0200)]
mac80211: document client powersave

With the addition of uAPSD and driver buffering
the powersave handling has gotten quite complex.
Add a section to the documentation to explain it
for anyone wanting to implement it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: allow out-of-band EOSP notification
Johannes Berg [Thu, 29 Sep 2011 14:04:39 +0000 (16:04 +0200)]
mac80211: allow out-of-band EOSP notification

iwlwifi has a separate EOSP notification from
the device, and to make use of that properly
it needs to be passed to mac80211. To be able
to mix with tx_status_irqsafe and rx_irqsafe
it also needs to be an "_irqsafe" version in
the sense that it goes through the tasklet,
the actual flag clearing would be IRQ-safe
but doing it directly would cause reordering
issues.

This is needed in the case of a P2P GO going
into an absence period without transmitting
any frames that should be driver-released as
in this case there's no other way to inform
mac80211 that the service period ended. Note
that for drivers that don't use the _irqsafe
functions another version of this function
will be required.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: explicitly notify drivers of frame release
Johannes Berg [Thu, 29 Sep 2011 14:04:38 +0000 (16:04 +0200)]
mac80211: explicitly notify drivers of frame release

iwlwifi needs to know the number of frames that are
going to be sent to a station while it is asleep so
it can properly handle the uCode blocking of that
station.

Before uAPSD, we got by by telling the device that
a single frame was going to be released whenever we
encountered IEEE80211_TX_CTL_POLL_RESPONSE. With
uAPSD, however, that is no longer possible since
there could be more than a single frame.

To support this model, add a new callback to notify
drivers when frames are going to be released.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: add missing station flags to debugfs
Johannes Berg [Thu, 29 Sep 2011 14:04:37 +0000 (16:04 +0200)]
mac80211: add missing station flags to debugfs

My work and some previous work didn't add
all the flags, add them now and while at it
simplify the code.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: optimise station flags
Johannes Berg [Thu, 29 Sep 2011 14:04:36 +0000 (16:04 +0200)]
mac80211: optimise station flags

The flaglock in struct sta_info has long been
something that I wanted to get rid of, this
finally does the conversion to atomic bitops.

The conversion itself is straight-forward in
most places, a few things needed to change a
bit since we can no longer use multiple bits
at the same time.

On x86-64, this is a fairly significant code
size reduction:
   text    data     bss     dec     hex
 427861   23648    1008  452517   6e7a5 before
 425383   23648     976  450007   6ddd7 after

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: reply only once to each PS-poll
Johannes Berg [Thu, 29 Sep 2011 14:04:35 +0000 (16:04 +0200)]
mac80211: reply only once to each PS-poll

If a PS-poll frame is retried (but was received)
there is no way to detect that since it has no
sequence number. As a consequence, the standard
asks us to not react to PS-poll frames until the
response to one made it out (was ACKed or lost).

Implement this by using the WLAN_STA_SP flags to
also indicate a PS-Poll "service period" and the
IEEE80211_TX_STATUS_EOSP flag for the response
packet to indicate the end of the "SP" as usual.

We could use separate flags, but that will most
likely completely confuse drivers, and while the
standard doesn't exclude simultaneously polling
using uAPSD and PS-Poll, doing that seems quite
problematic.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: send (QoS) Null if no buffered frames
Johannes Berg [Thu, 29 Sep 2011 14:04:34 +0000 (16:04 +0200)]
mac80211: send (QoS) Null if no buffered frames

For PS-poll, there's a possible race between
us expiring a frame and the station polling
for it -- send it a null frame in that case.

For uAPSD, the standard says that we have to
send a frame in each SP, so send null if we
don't have any other frames.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: implement uAPSD
Johannes Berg [Thu, 29 Sep 2011 14:04:33 +0000 (16:04 +0200)]
mac80211: implement uAPSD

Add uAPSD support to mac80211. This is probably not
possible with all devices, so advertising it with
the cfg80211 flag will be left up to drivers that
want it.

Due to my previous patches it is now a fairly
straight-forward extension. Drivers need to have
accurate TX status reporting for the EOSP frame.
For drivers that buffer themselves, the provided
APIs allow releasing the right number of frames,
but then drivers need to set EOSP and more-data
themselves. This is documented in more detail in
the new code itself.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: allow releasing driver-buffered frames
Johannes Berg [Thu, 29 Sep 2011 14:04:32 +0000 (16:04 +0200)]
mac80211: allow releasing driver-buffered frames

If there are frames for a station buffered in
the driver, mac80211 announces those in the TIM
IE but there's no way to release them. Add new
API to release such frames and use it when the
station polls for a frame.

Since the API will soon also be used for uAPSD
it is easily extensible.

Note that before this change drivers announcing
driver-buffered frames in the TIM bit actually
will respond to a PS-Poll with a potentially
lower priority frame (if there are any frames
buffered in mac80211), after this patch a driver
that hasn't been changed will no longer respond
at all. This only affects ath9k, which will need
to be fixed to implement the new API.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: clear more-data bit on filtered frames
Johannes Berg [Thu, 29 Sep 2011 14:04:31 +0000 (16:04 +0200)]
mac80211: clear more-data bit on filtered frames

It doesn't seem likely, but maybe possible, that the
more-data bit needs to be recomputed due to changes
in the queued frames. Clear it for filtered frames
to ensure that we never send it incorrectly. It'll
be set again as necessary when we retransmit this
frame.

The more likely case is maybe where the station woke
up after the filtered frame in which case more-data
should be clear when the frame is transmitted to the
station since it is now awake.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: remove return value from add_pending_skbs
Johannes Berg [Thu, 29 Sep 2011 14:04:30 +0000 (16:04 +0200)]
mac80211: remove return value from add_pending_skbs

Now that we no longer use the return value, we no
longer need to maintain it either, so remove it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: split PS buffers into ACs
Johannes Berg [Thu, 29 Sep 2011 14:04:29 +0000 (16:04 +0200)]
mac80211: split PS buffers into ACs

For uAPSD support we'll need to have per-AC PS
buffers. As this is a major undertaking, split
the buffers before really adding support for
uAPSD. This already makes some reference to the
uapsd_queues variable, but for now that will
never be non-zero.

Since book-keeping is complicated, also change
the logic for keeping a maximum of frames only
and allow 64 frames per AC (up from 128 for a
station).

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: also expire filtered frames
Johannes Berg [Thu, 29 Sep 2011 14:04:28 +0000 (16:04 +0200)]
mac80211: also expire filtered frames

mac80211 will expire normal PS-buffered frames, but
if the device rejected some frames for a sleeping
station, these won't be on the ps_tx_buf queue but
on the tx_filtered queue instead; this is done to
avoid reordering.

However, mac80211 will not expire frames from the
filtered queue, let's fix that.

Also add a more comments to what all this expiry is
doing and how it works.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: unify TIM bit handling
Johannes Berg [Thu, 29 Sep 2011 14:04:27 +0000 (16:04 +0200)]
mac80211: unify TIM bit handling

Currently, the TIM bit for a given station is set
and cleared all over the place. Since the logic to
set/clear it will become much more complex when we
add uAPSD support, as a first step let's collect
the entire logic in one place. This requires a few
small adjustments to other places.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: let drivers inform it about per TID buffered frames
Johannes Berg [Thu, 29 Sep 2011 14:04:26 +0000 (16:04 +0200)]
mac80211: let drivers inform it about per TID buffered frames

For uAPSD implementation, it is necessary to know on
which ACs frames are buffered. mac80211 obviously
knows about the frames it has buffered itself, but
with aggregation many drivers buffer frames. Thus,
mac80211 needs to be informed about this.

For now, since we don't have APSD in any form, this
will unconditionally set the TIM bit for the station
but later with uAPSD only some ACs might cause the
TIM bit to be set.

ath9k is the only driver using this API and I only
modify it in the most basic way, it won't be able
to implement uAPSD with this yet. But it can't do
that anyway since there's no way to selectively
release frames to the peer yet.

Since drivers will buffer frames per TID, let them
inform mac80211 on a per TID basis, mac80211 will
then sort out the AC mapping itself.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: data path modification for TDLS peers
Arik Nemtsov [Wed, 28 Sep 2011 11:12:54 +0000 (14:12 +0300)]
mac80211: data path modification for TDLS peers

Mark the STA entries of enabled TDLS peers with a new "peer authorized"
flag.

During link setup, allow special TDLS setup frames through the AP, but
otherwise drop all packets destined to the peer. This is required by the
TDLS (802.11z) specification in order to prevent reordering of MSDUs
between the AP and direct paths.

When setup completes and the peer is authorized, send data directly,
bypassing the AP.

In the Rx path, allow data to be received directly from TDLS peers.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Cc: Kalyan C Gaddam <chakkal@iit.edu>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agonl80211/mac80211: allow adding TDLS peers as stations
Arik Nemtsov [Wed, 28 Sep 2011 11:12:53 +0000 (14:12 +0300)]
nl80211/mac80211: allow adding TDLS peers as stations

When adding a TDLS peer STA, mark it with a new flag in both nl80211 and
mac80211. Before adding a peer, make sure the wiphy supports TDLS and
our operating mode is appropriate (managed).

In addition, make sure all peers are removed on disassociation.

A TDLS peer is first added just before link setup is initiated. In later
setup stages we have more info about peer supported rates, capabilities,
etc. This info is reported via nl80211_set_station().

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Cc: Kalyan C Gaddam <chakkal@iit.edu>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: handle TDLS high-level commands and frames
Arik Nemtsov [Wed, 28 Sep 2011 11:12:52 +0000 (14:12 +0300)]
mac80211: handle TDLS high-level commands and frames

Register and implement the TDLS cfg80211 callback functions.

Internally prepare and send TDLS management frames. We incorporate
local STA capabilities and supported rates with extra IEs given by
usermode. The resulting packet is either encapsulated in a data frame,
or assembled as an action frame. It is transmitted either directly or
through the AP, as mandated by the TDLS specification.

Declare support for the TDLS external setup wiphy capability. This
tells usermode to handle link setup and discovery on its own, and use the
kernel driver for sending TDLS mgmt packets.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Cc: Kalyan C Gaddam <chakkal@iit.edu>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: standardize adding supported rates IEs
Arik Nemtsov [Wed, 28 Sep 2011 11:12:51 +0000 (14:12 +0300)]
mac80211: standardize adding supported rates IEs

Relocate the mesh implementation of adding the (extended) supported
rates IE to util.c, anticipating its use by other parts of mac80211.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Cc: Kalyan C Gaddam <chakkal@iit.edu>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agonl80211: support sending TDLS commands/frames
Arik Nemtsov [Wed, 28 Sep 2011 11:12:50 +0000 (14:12 +0300)]
nl80211: support sending TDLS commands/frames

Add support for sending high-level TDLS commands and TDLS frames via
NL80211_CMD_TDLS_OPER and NL80211_CMD_TDLS_MGMT, respectively. Add
appropriate cfg80211 callbacks for lower level drivers.

Add wiphy capability flags for TDLS support and advertise them via
nl80211.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Cc: Kalyan C Gaddam <chakkal@iit.edu>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlagn: iwl-agn-rs: remove unnecessary null check for sta and lq_sta
Greg Dietsche [Wed, 28 Sep 2011 22:54:04 +0000 (17:54 -0500)]
iwlagn: iwl-agn-rs: remove unnecessary null check for sta and lq_sta

both sta and lq_sta are guaranteed to be not null in the
calling function so we don't need to check them here.

Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k/ath9k_htc: Fix PS wrappers for RF kill
Mohammed Shafi Shajakhan [Wed, 28 Sep 2011 11:26:10 +0000 (16:56 +0530)]
ath9k/ath9k_htc: Fix PS wrappers for RF kill

ath9k_hw_gpio_get reads the GPIO in/out registers to get the status of
GPIO pins, so use PS wrappers

Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agocfg80211/mac80211: apply station uAPSD parameters selectively
Johannes Berg [Tue, 27 Sep 2011 18:56:12 +0000 (20:56 +0200)]
cfg80211/mac80211: apply station uAPSD parameters selectively

Currently, when hostapd sets the station as authorized
we also overwrite its uAPSD parameter. This obviously
leads to buggy behaviour (later, with my patches that
actually add uAPSD support). To fix this, only apply
those parameters if they were actually set in nl80211,
and to achieve that add a bitmap of things to apply.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agortlwifi: Remove unused _usb_nbytes_read_write and _usb_writeN_sync
Larry Finger [Tue, 27 Sep 2011 05:48:21 +0000 (00:48 -0500)]
rtlwifi: Remove unused _usb_nbytes_read_write and _usb_writeN_sync

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agortlwifi: Remove unused routine _usb_readN_sync
Larry Finger [Tue, 27 Sep 2011 05:48:20 +0000 (00:48 -0500)]
rtlwifi: Remove unused routine _usb_readN_sync

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomwifiex: add cfg80211 handlers add/del_virtual_intf
Yogesh Ashok Powar [Tue, 27 Sep 2011 03:37:26 +0000 (20:37 -0700)]
mwifiex: add cfg80211 handlers add/del_virtual_intf

Making adding and deleting virtual interfaces dynamic. Adding
handlers for creating and deleting virtual interface with
given name and dev respectively.

Also, creating default interface of type station on insmod of
the driver.

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>
13 years agomwifiex: fix Tx data rate display issue
Amitkumar Karwar [Tue, 27 Sep 2011 03:37:25 +0000 (20:37 -0700)]
mwifiex: fix Tx data rate display issue

"iw dev mlan0 link" shows wrong data rate, because data rate is
not sent properly to cfg80211 stack. Also stack is not updated
with mcs and Tx data flags information.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomwifiex: remove unreachable code
Amitkumar Karwar [Tue, 27 Sep 2011 03:37:24 +0000 (20:37 -0700)]
mwifiex: remove unreachable code

In disconnected state "iw dev mlan0 link" command will return
from cfg80211 stack itself. We also have an error check in
mwifiex_cfg80211_get_station() routine. Therefore the code
under "if (!priv->media_connected)" condition in
mwifiex_rate_ioctl_get_rate_value() routine becomes unreachable.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomwifiex: remove unnecessary mwifiex_dump_station_info() call
Amitkumar Karwar [Tue, 27 Sep 2011 03:37:23 +0000 (20:37 -0700)]
mwifiex: remove unnecessary mwifiex_dump_station_info() call

An extra call to mwifiex_dump_station_info() routine in get_station
callback function is redundant

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: Remove redundant my beacon check at ath_rx_ps_beacon
Rajkumar Manoharan [Mon, 26 Sep 2011 16:46:56 +0000 (22:16 +0530)]
ath9k: Remove redundant my beacon check at ath_rx_ps_beacon

Make use of the rx status's is_mybeacon in order to avoid
redundant memcmp.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: Remove unnecessary AMPDU check at tx status
Rajkumar Manoharan [Mon, 26 Sep 2011 16:18:39 +0000 (21:48 +0530)]
ath9k: Remove unnecessary AMPDU check at tx status

Fill the ampdu_[ack]_len for both aggregation and normal frames.
So that we could avoid unnecesary conditional at tx status.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: max_tp_rate2 management of minstrel_ht
Lorenzo Bianconi [Sat, 24 Sep 2011 16:48:26 +0000 (18:48 +0200)]
mac80211: max_tp_rate2 management of minstrel_ht

I noticed a possible issue in the max_tp_rate2 management of
minstrel_ht. In particular, if we look up just among max_tp_rate2 of
each group it will be possible that the selected rate will not be the
mcs with second maximum throughput. I wrote this simple patch.

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agowireless: at76c50x: use native hex_pack_byte() method
Andy Shevchenko [Wed, 28 Sep 2011 09:30:59 +0000 (12:30 +0300)]
wireless: at76c50x: use native hex_pack_byte() method

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: "John W. Linville" <linville@tuxdriver.com>
Tested-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agobtusb: add device entry for Broadcom SoftSailing
Oliver Neukum [Wed, 21 Sep 2011 09:41:45 +0000 (11:41 +0200)]
btusb: add device entry for Broadcom SoftSailing

From 0cea73465cd22373c5cd43a3edd25fbd4bb532ef Mon Sep 17 00:00:00 2001
From: Oliver Neukum <oliver@neukum.org>
Date: Wed, 21 Sep 2011 11:37:15 +0200
Subject: [PATCH] btusb: add device entry for Broadcom SoftSailing

This device declares itself to be vendor specific
It therefore needs to be added to the device table
to make btusb bind.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: hci_le_adv_report_evt code refactoring
Andre Guedes [Mon, 26 Sep 2011 23:48:35 +0000 (20:48 -0300)]
Bluetooth: hci_le_adv_report_evt code refactoring

There is no reason to treat the first advertising entry differently
from the potential other ones. Besides, the current implementation
can easily leads to typos.

Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Fix possible NULL pointer dereference
Waldemar Rymarkiewicz [Fri, 23 Sep 2011 08:01:30 +0000 (10:01 +0200)]
Bluetooth: Fix possible NULL pointer dereference

Checking conn->pending_sec_level if there is no connection leads to potential
null pointer dereference. Don't process pin_code_request_event at all if no
connection exists.

Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@gmail.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agowireless/ath6kl: use of module_param requires the inclusion of moduleparam.h
Stephen Rothwell [Wed, 28 Sep 2011 08:32:34 +0000 (18:32 +1000)]
wireless/ath6kl: use of module_param requires the inclusion of moduleparam.h

Otheriwse the module.h split up fails like this:

drivers/net/wireless/ath/ath6kl/init.c:27:26: error: expected ')' before 'uint'

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
13 years agoath6kl: improve wmi debug messages
Kalle Valo [Tue, 27 Sep 2011 11:31:21 +0000 (14:31 +0300)]
ath6kl: improve wmi debug messages

Add a new debug level ATH6KL_DBG_WMI_DUMP and other minor
improvements to the wmi debug messages.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
13 years agoath6kl: add debug logs for booting
Kalle Valo [Tue, 27 Sep 2011 11:31:11 +0000 (14:31 +0300)]
ath6kl: add debug logs for booting

Just to make it easier to find out why boot fails.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
13 years agoath6kl: add sdio debug messages
Kalle Valo [Tue, 27 Sep 2011 11:30:58 +0000 (14:30 +0300)]
ath6kl: add sdio debug messages

Add extensive debug messages to sdio.c. Makes it easier to debug
various problems.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
13 years agoath6kl: add prefix parameter to ath6kl_dbg_dump()
Kalle Valo [Tue, 27 Sep 2011 11:30:45 +0000 (14:30 +0300)]
ath6kl: add prefix parameter to ath6kl_dbg_dump()

Makes it easier to recognise longs dumps.

Obligatory screenshot using "rx" prefix:

ath6kl: ath6kl_rx
rx 00000000: 10 10 00 00 00 00 08 30 00 00 00 00 00 00 f9 0b  .......0........
rx 00000010: 2c 44 08 30 00 00 f9 0b 0c a4 02 00 00 00 73 d2  ,D.0..........s.
rx 00000020: 94 00 f9 0b 04 8c 01 00 02 00 07 02 02 00 f9 0b  ................

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
13 years agoath6kl: silence "invalid rate" warning
Kalle Valo [Tue, 27 Sep 2011 20:33:28 +0000 (23:33 +0300)]
ath6kl: silence "invalid rate" warning

For some reason firmware is sending invalid rates when we try to
query current bitrate from ath6kl_get_station() and a warning is issued:

[ 3810.415720] ath6kl: invalid rate: 1935633515
[ 3811.105493] ath6kl: invalid rate: 1935633515
[ 3811.556063] ath6kl: invalid rate: 1935633515

As the warning happens way too often, convert the warning to a debug
message once we have a proper fix. But to make it easy to follow
how often the problem appears, add a debugfs to print
various statistics about workarounds and make this issue the first WAR.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
13 years agoMerge branch 'master' of git://git.infradead.org/users/linville/wireless
John W. Linville [Wed, 28 Sep 2011 14:28:09 +0000 (10:28 -0400)]
Merge branch 'master' of git://git.infradead.org/users/linville/wireless

Conflicts:
drivers/net/wireless/iwlwifi/iwl-scan.c
net/wireless/nl80211.c

13 years agoBluetooth: Mark not declared l2cap_core functions as static
Szymon Janc [Thu, 28 Jul 2011 14:24:33 +0000 (16:24 +0200)]
Bluetooth: Mark not declared l2cap_core functions as static

Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: use recommended LE connection parameters
Anderson Lizardo [Wed, 27 Jul 2011 21:40:09 +0000 (18:40 -0300)]
Bluetooth: use recommended LE connection parameters

The new connection parameters now match the recommended values for
Proximity and Health Thermometer profiles. The previous values were
ramdomly chosen, and are either too low or too high for most cases.

New values:

Scan Interval: 60 ms
Scan Window: 30 ms
Minimum Connection Interval: 50 ms
Maximum Connection Interval: 70 ms
Supervision Timeout: 420 ms

See "Table 5.2: Recommended Scan Interval and Scan Window Values" and
"Table 5.3: Recommended Connection Interval Values" for both profiles
for details. Note that the "fast connection" parameters were chosen,
because we do not support yet dynamically changing these parameters from
initiator side.

Additionally, the Proximity profile recommends (section "4.4 Alert on
Link Loss"):

"It is recommended that the Link Supervision Timeout (LSTO) is set to 6x
the connection interval."

Minimum_CE_Length and Maximum_CE_Length were also changed from 0x0001 to
0x0000 because they are informational and optional, and old value was
not reflecting reality.

Signed-off-by: Anderson Lizardo <anderson.lizardo@openbossa.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>