cascardo/linux.git
12 years agoath6kl: handle firmware names more dynamically
Kalle Valo [Fri, 16 Dec 2011 18:53:31 +0000 (20:53 +0200)]
ath6kl: handle firmware names more dynamically

Currently ath6kl has just hardcoded paths to each firmware file. Change
this more dynamic by separating the the directory and file name from each
other. That way it's easier to dynamically create full paths to firmware and
code looks better. And now it's possible to remove a function needed by
devicetree code.

While at it add a structure inside struct ath6kl_hw to contain all
firmware names. I deliberately omitted board file support as
those will be handled later.

This is needed for firmware API 3.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
12 years agoath6kl: Send own IP addr to the firmware during WOW suspend
Raja Mani [Fri, 16 Dec 2011 08:54:24 +0000 (14:24 +0530)]
ath6kl: Send own IP addr to the firmware during WOW suspend

Firmware ARP module requires own IP addr in order to respond
to the outside world when the target is in WOW suspend state.

At present, firmware ARP module has capability to hold 2 IP addr.
So, WOW mode will be disabled if the total IP addr configured in
net_dev for our device is greater than firmware limit (MAX_IP_ADDRS)
which is 2 at this moment.

Signed-off-by: Raja Mani <rmani@qca.qualcomm.com>
Signed-off-by: Thirumalai Pachamuthu <tpachamu@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
12 years agoath6kl: Avoid taking struct as argument in ath6kl_wmi_set_ip_cmd
Raja Mani [Fri, 16 Dec 2011 08:54:23 +0000 (14:24 +0530)]
ath6kl: Avoid taking struct as argument in ath6kl_wmi_set_ip_cmd

In this way, caller is free to pass only the value of IP addr
to configure.

In addition to this,
  * 'ips' variable data type in struct wmi_set_ip_cmd is changed
     from __le32 to __be32 in order to match network byte order.
  *  ipv4_is_multicast() is used to validate multicast ip addr.
  *  New argument if_idx is added to supply correct vif index
     to ath6kl_wmi_cmd_send().

This will be used in the next patch.

Signed-off-by: Raja Mani <rmani@qca.qualcomm.com>
Signed-off-by: Thirumalai Pachamuthu <tpachamu@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
12 years agoath6kl: Fix connect command to clear previously used IEs
Jouni Malinen [Thu, 15 Dec 2011 12:16:00 +0000 (14:16 +0200)]
ath6kl: Fix connect command to clear previously used IEs

Empty IE buffer means that the new association is not supposed to
include extra IEs. Make sure any previously configured (Re)Association
Request frame IEs get cleared in such a case. This is based on a patch
from Shuibing.

Cc: Dai Shuibing <shuibing@qca.qualcomm.com>
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
12 years agoath6kl: Use cfg80211_roamed_bss() to report roaming event
Vasanthakumar Thiagarajan [Tue, 13 Dec 2011 11:49:57 +0000 (17:19 +0530)]
ath6kl: Use cfg80211_roamed_bss() to report roaming event

This is to avoid the scenario where the bss entry of the AP got
expired when reporting roaming event to current AP. As the bss
entry for the current bss is available in driver, pass this bss
to cfg80211. This fixes WARNING: at net/wireless/sme.c:586.

This patch depends on the following patch in cfg80211
"cfg80211: Fix race in bss timeout".

Reported-by: Kalle Valo <kvalo@qca.qualcomm.com>
Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
12 years agoMerge remote branch 'wireless-next/master' into ath6kl-next
Kalle Valo [Fri, 16 Dec 2011 19:10:39 +0000 (21:10 +0200)]
Merge remote branch 'wireless-next/master' into ath6kl-next

Conflicts:
drivers/net/wireless/ath/ath6kl/init.c

12 years agoath9k: Support RSN Mesh
Chun-Yeow Yeoh [Wed, 7 Dec 2011 20:45:46 +0000 (12:45 -0800)]
ath9k: Support RSN Mesh

Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com>
Acked-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agocfg80211: Restore orig channel values upon disconnect
Rajkumar Manoharan [Wed, 7 Dec 2011 16:20:08 +0000 (21:50 +0530)]
cfg80211: Restore orig channel values upon disconnect

When we restore regulatory settings the world regulatory domain
is properly reset on cfg80211 (or user prefered regulatory domain)
but we were never setting back channel values for drivers that use
WIPHY_FLAG_CUSTOM_REGULATORY. Set these values up again by using
the orig_ channel parameters.

This fixes restoring custom regulatory settings upon disconnect
events.

Cc: compat@orbit-lab.org
Cc: Paul Stewart <pstew@google.com>
Cc: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Cc: Senthilkumar Balasubramanian <senthilb@qca.qualcomm.com>
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agocfg80211: allow following country IE power for custom regdom cards
Luis R. Rodriguez [Wed, 7 Dec 2011 16:20:07 +0000 (21:50 +0530)]
cfg80211: allow following country IE power for custom regdom cards

By definition WIPHY_FLAG_STRICT_REGULATORY was intended to allow the
wiphy to adjust itself to the country IE power information if the
card had no regulatory data but we had no way to tell cfg80211 that if
the card also had its own custom regulatory domain (these are typically
custom world regulatory domains) that we want to follow the country IE's
noted values for power for each channel. We add support for this and
document it.

This is not a critical fix but a performance optimization for cards
with custom regulatory domains that associate to an AP with sends
out country IEs with a higher EIRP than the one on the custom
regulatory domain. In practice the only driver affected right now
are the Atheros drivers as they are the only drivers using both
WIPHY_FLAG_STRICT_REGULATORY and WIPHY_FLAG_CUSTOM_REGULATORY --
used on cards that have an Atheros world regulatory domain. Cards
that have been programmed to follow a country specifically will not
follow the country IE power. So although not a stable fix distributions
should consider cherry picking this.

Cc: compat@orbit-lab.org
Cc: Paul Stewart <pstew@google.com>
Cc: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Cc: Senthilkumar Balasubramanian <senthilb@qca.qualcomm.com>
Reported-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211_hwsim: fix wmediumd_pid
Johannes Berg [Wed, 7 Dec 2011 11:35:17 +0000 (12:35 +0100)]
mac80211_hwsim: fix wmediumd_pid

Fix a few minor issues with wmediumd_pid:
a) make static
b) use u32 to match the snd_pid type
c) use ACCESS_ONCE since we don't lock it
d) don't explicitly initialize to 0

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: remove ATH9K_HW_CAP_CST
Mohammed Shafi Shajakhan [Wed, 7 Dec 2011 11:21:39 +0000 (16:51 +0530)]
ath9k_hw: remove ATH9K_HW_CAP_CST

its not used anywhere in the current code

Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: validate for non-zero BSSID
Mohammed Shafi Shajakhan [Wed, 7 Dec 2011 11:21:38 +0000 (16:51 +0530)]
ath9k: validate for non-zero BSSID

before concluding that the recieved beacon is for us, let us make sure
that the BSSID is non-zero. when I configured ad-hoc mode as creator and
left it for some time without joining I found we recieved few frames whose
BSSID is zero, which we concluded wrongly as 'my_beacons'

Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agob43: N-PHY: check for bustype before touching BCMA CC PLLs
Rafał Miłecki [Thu, 15 Dec 2011 13:17:21 +0000 (14:17 +0100)]
b43: N-PHY: check for bustype before touching BCMA CC PLLs

Reported-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcm80211: smac: precendence bug in wlc_phy_attach()
Dan Carpenter [Thu, 15 Dec 2011 11:23:32 +0000 (14:23 +0300)]
brcm80211: smac: precendence bug in wlc_phy_attach()

Negate has higher precendence than compare and since neither zero nor
one are equal to four or eight the original condition is always false.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: add DFS radar pulse processing
Zefir Kurtisi [Thu, 15 Dec 2011 04:16:34 +0000 (20:16 -0800)]
ath9k: add DFS radar pulse processing

This initial DFS module provides basic functionality to deal
with radar pulses reported by the Atheros DFS HW pulse detector.

The reported data is evaluated and basic plausibility checks
are performed to filter false pulses. Passing radar pulses are
forwarded to pattern detectors which are not yet implemented.

(Some modifications to actually use ATH9K_DFS_DEBUGFS based on comments
from Julian Calaby <julian.calaby@gmail.com>. -- JWL)

Signed-off-by: Zefir Kurtisi <zefir.kurtisi@neratec.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: add DFS testing check
Zefir Kurtisi [Thu, 15 Dec 2011 04:16:33 +0000 (20:16 -0800)]
ath9k_hw: add DFS testing check

In order to enable DFS upstream we want to be sure
DFS has been tested for each chipset. Push for public
documentation of the requirements we want in place and
allow for enabling each chipset through a single upstream
commit.

Signed-off-by: Zefir Kurtisi <zefir.kurtisi@neratec.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath: add a debug level for DFS
Zefir Kurtisi [Thu, 15 Dec 2011 04:16:32 +0000 (20:16 -0800)]
ath: add a debug level for DFS

This can later be used by other drivers that implement
DFS support.

Signed-off-by: Zefir Kurtisi <zefir.kurtisi@neratec.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcmsmac: Replace kmalloc/memset with kzalloc
Larry Finger [Thu, 15 Dec 2011 02:23:03 +0000 (20:23 -0600)]
brcmsmac: Replace kmalloc/memset with kzalloc

In ai_attach(), space is allocated for an si_info struct. Immediately
after the allocation, routine ai_doattach() is called and that allocated
space is set to zero. As no other routine calls ai_doattach(), kzalloc()
can be utilized.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Acked-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath: document ATH_DBG_MCI
Luis R. Rodriguez [Wed, 14 Dec 2011 21:56:36 +0000 (13:56 -0800)]
ath: document ATH_DBG_MCI

A debug level was added to the ath module for printing
MCI messages but no documentation was provided. Clarify that
MCI is the Message Coexistence Interface, a private protocol
used exclusively for WLAN-BT coexistence starting from
AR9462.

Cc: wtsao@qca.qualcomm.com
Cc: rmanohar@qca.qualcomm.com
Cc: mohammed@qca.qualcomm.com
Cc: senthilb@qca.qualcomm.com
Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: avoid retransmitting aggregation frames that a BAR was sent for
Felix Fietkau [Wed, 14 Dec 2011 21:08:08 +0000 (22:08 +0100)]
ath9k: avoid retransmitting aggregation frames that a BAR was sent for

The receiver will discard them anyway.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: simplify tx locking
Felix Fietkau [Wed, 14 Dec 2011 21:08:07 +0000 (22:08 +0100)]
ath9k: simplify tx locking

Instead of releasing and taking back the lock over and over again in the
tx path, hold the lock a bit longer, requiring much fewer lock/unlock pairs.
This makes locking much easier to review and should not have any noticeable
performance/latency impact.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: remove bogus sequence number increment
Felix Fietkau [Wed, 14 Dec 2011 21:08:06 +0000 (22:08 +0100)]
ath9k: remove bogus sequence number increment

tid->seq_next is initialized on A-MPDU start anyway, and the comment next
to this chunk of code seems to be bogus as well.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: reduce indentation level in a few places
Felix Fietkau [Wed, 14 Dec 2011 21:08:05 +0000 (22:08 +0100)]
ath9k: reduce indentation level in a few places

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: reduce the number of unnecessary BAR tx packets
Felix Fietkau [Wed, 14 Dec 2011 21:08:04 +0000 (22:08 +0100)]
ath9k: reduce the number of unnecessary BAR tx packets

When processing A-MPDU tx status, only send a BAR for the failed packet
with the highest sequence number.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: change maximum software retransmission handling
Felix Fietkau [Wed, 14 Dec 2011 21:08:03 +0000 (22:08 +0100)]
ath9k: change maximum software retransmission handling

Instead of limiting a subframe to 10 A-MPDU software transmission attempts,
count hardware retransmissions as well and raise the limit a bit. That way
there will be fewer software retransmission attempts when traffic suffers
from lots of hardware retransmissions.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: Fix power save in change interface
Mohammed Shafi Shajakhan [Wed, 14 Dec 2011 14:16:08 +0000 (19:46 +0530)]
mac80211: Fix power save in change interface

we found that power save is not getting enabled when we do
change interface in this order STA->IBSS->STA. this is
because ieee80211_setup_sdata clears type-dependent union

Reported-by: Leela Kella <leela@qca.qualcomm.com>
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: remove an unnecessary paraenthesis
Mohammed Shafi Shajakhan [Wed, 14 Dec 2011 14:16:07 +0000 (19:46 +0530)]
mac80211: remove an unnecessary paraenthesis

Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: Use appropriate TID for sending BAR, ADDBA and DELBA frames
Helmut Schaa [Thu, 15 Dec 2011 09:18:34 +0000 (10:18 +0100)]
mac80211: Use appropriate TID for sending BAR, ADDBA and DELBA frames

Currently BAR, ADDBA and DELBA frames are always sent using AC_VO. If
the TID for which a BA session is established is assigned to a different
queue BAR, ADDBA and DELBA frames can "overtake" frames of the according
BA session.

Hence, always put BA session related frames into the same queue as the
BA sessions data frames.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: reduce station management complexity
Johannes Berg [Thu, 15 Dec 2011 10:24:20 +0000 (11:24 +0100)]
mac80211: reduce station management complexity

Now that IBSS no longer needs to insert stations
from atomic context, we can get rid of all the
special cases for that, and even get rid of the
sta_lock (though it needs to stay as tim_lock.)

This makes the station management code much more
straight-forward.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: delay IBSS station insertion
Johannes Berg [Thu, 15 Dec 2011 10:17:37 +0000 (11:17 +0100)]
mac80211: delay IBSS station insertion

In order to notify drivers and simplify the station
management code, defer IBSS station insertion to a
work item and don't do it directly while receiving
a frame.

This increases the complexity in IBSS a little bit,
but it's pretty straight forward and it allows us
to reduce the station management complexity (next
patch) considerably.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: make address arguments to sta_info_alloc const
Johannes Berg [Wed, 14 Dec 2011 12:28:46 +0000 (13:28 +0100)]
mac80211: make address arguments to sta_info_alloc const

No real changes, just note that they are const.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: count authorized stations per BSS
Johannes Berg [Wed, 14 Dec 2011 11:20:31 +0000 (12:20 +0100)]
mac80211: count authorized stations per BSS

Currently, each AP interface will send multicast
traffic if any interface has a station entry even
if that station entry is allocated only. With the
new station state management we can easily fix it
by adding a counter that counts each authorized
station only and send multicast traffic only when
the correct interface has at least one authorized
station.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: refactor station state transitions
Johannes Berg [Wed, 14 Dec 2011 11:35:30 +0000 (12:35 +0100)]
mac80211: refactor station state transitions

Station entries can have various states, the most
important ones being auth, assoc and authorized.
This patch prepares us for telling the driver about
these states, we don't want to confuse drivers with
strange transitions, so with this we enforce that
they move in the right order between them (back and
forth); some transitions might happen before the
driver even knows about the station, but at least
runtime transitions will be ordered correctly.

As a consequence, IBSS and MESH stations will now
have the ASSOC flag set (so they can transition to
AUTHORIZED), and we can get rid of a special case
in TX processing.

When freeing a station, unwind the state so that
other parts of the code (or drivers later) can rely
on the transitions.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: use station mutex in configuration
Johannes Berg [Wed, 14 Dec 2011 11:20:29 +0000 (12:20 +0100)]
mac80211: use station mutex in configuration

There's no need to use RCU here, we can just lock
the station mutex instead. This allows the code
to sleep, which is necessary for later patches.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: remove duplicate TDLS peer verification
Johannes Berg [Wed, 14 Dec 2011 11:20:28 +0000 (12:20 +0100)]
mac80211: remove duplicate TDLS peer verification

This is already checked in cfg80211, so no need
to repeat the checks here.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agocfg80211: validate nl80211 station handling better
Johannes Berg [Wed, 14 Dec 2011 11:20:27 +0000 (12:20 +0100)]
cfg80211: validate nl80211 station handling better

The nl80211 station handling code is a bit messy
and doesn't do a lot of validation. It seems like
this could be an issue for drivers that don't use
mac80211 to validate everything.

As cfg80211 doesn't keep station state, move the
validation of allowing supported_rates to change
for TDLS only in station mode to mac80211.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agonl80211: add TDLS peer flag to policy
Johannes Berg [Wed, 14 Dec 2011 08:29:15 +0000 (09:29 +0100)]
nl80211: add TDLS peer flag to policy

This was evidently missed in the TDLS patch (07ba55d7).

Cc: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agowl12xx: alloc buffer in driver_state_read to prevent compilation warning
Luciano Coelho [Thu, 15 Dec 2011 12:58:08 +0000 (14:58 +0200)]
wl12xx: alloc buffer in driver_state_read to prevent compilation warning

When compiling wl12xx for x86, there was a warning complaining about
the size of the buffer we were allocating in the stack:

drivers/net/wireless/wl12xx/debugfs.c: In function 'driver_state_read':
drivers/net/wireless/wl12xx/debugfs.c:380:1: warning: the frame size of 1040 bytes is larger than 1024 bytes

To prevent this, allocate the buffer in the heap instead.

Signed-off-by: Luciano Coelho <coelho@ti.com>
12 years agoSet wlvif->ps_compl to NULL in before return
Pontus Fuchs [Wed, 14 Dec 2011 13:32:23 +0000 (14:32 +0100)]
Set wlvif->ps_compl to NULL in before return

wl1271_configure_suspend_sta leaves a stale stack declared
completion in wlvif->ps_compl. Set it to NULL before returning.

Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com>
[small fix to use wlvif->ps_compl instead of wl->ps_compl]
Signed-off-by: Luciano Coelho <coelho@ti.com>
12 years agowl12xx: remove unused firmware version macros
Luciano Coelho [Wed, 14 Dec 2011 12:57:58 +0000 (14:57 +0200)]
wl12xx: remove unused firmware version macros

We don't use WL12XX_BA_SUPPORT_FW_COST_VER2_START nor
WL12XX_BA_SUPPORT_FW_COST_VER2_END anymore.

Signed-off-by: Luciano Coelho <coelho@ti.com>
12 years agowl12xx: remove deprecated packet detection threshold config
Luciano Coelho [Tue, 13 Dec 2011 13:45:54 +0000 (15:45 +0200)]
wl12xx: remove deprecated packet detection threshold config

The ACX_PD_THRESHOLD configuration command is deprecated and should
not be used anymore.

Signed-off-by: Luciano Coelho <coelho@ti.com>
12 years agowl12xx: use ieee80211_free_txskb()
Eliad Peller [Tue, 13 Dec 2011 13:26:38 +0000 (15:26 +0200)]
wl12xx: use ieee80211_free_txskb()

Use the newly introduced ieee80211_free_txskb() instead
of dev_kfree_skb() for failed tx packets.

Additionally, if the skb is a dummy packet, re-enqueue
it (as the fw expects it) instead of freeing it.

Reported-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
12 years agowl12xx: call extended radio parameters for wl127x AP mode
Luciano Coelho [Tue, 13 Dec 2011 09:39:50 +0000 (11:39 +0200)]
wl12xx: call extended radio parameters for wl127x AP mode

We need to set the extended radio parameters for wl127x only.
Currently, we were only calling this command with wl127x STA mode, but
we should also do it for AP mode.

Move the call to the extended radio paramaters to the common hw_init
and use a single if for the chip type to do everything at once.

Signed-off-by: Luciano Coelho <coelho@ti.com>
12 years agowl12xx: don't write out of bounds when hlid > WL12XX_MAX_LINKS
Luciano Coelho [Tue, 13 Dec 2011 09:39:02 +0000 (11:39 +0200)]
wl12xx: don't write out of bounds when hlid > WL12XX_MAX_LINKS

We should not get an hlid value bigger than WL12XX_MAX_LINKS from
wl1271_rx_handle_data().  We have a WARN_ON in case it happens.  But
despite the warning, we would still go ahead and write the hlid bit
into active_hlids (a stack variable).  This would cause us to
overwrite other data in the stack.

To avoid this problem, we now skip the write when issuing the warning,
so at least we don't corrupt data.

Signed-off-by: Luciano Coelho <coelho@ti.com>
12 years agowl12xx: Restore testmode ABI
Pontus Fuchs [Thu, 1 Dec 2011 11:13:44 +0000 (12:13 +0100)]
wl12xx: Restore testmode ABI

Commit 80900d0140a7648587982c8f299830e900e49165 accidently broke
the ABI for testmode commands. Restore the ABI again.

Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Luciano Coelho <coelho@ti.com>
12 years agoNFC: Initial LLCP support
Samuel Ortiz [Wed, 14 Dec 2011 15:43:12 +0000 (16:43 +0100)]
NFC: Initial LLCP support

This patch is an initial implementation for the NFC Logical Link Control
protocol. It's also known as NFC peer to peer mode.
This is a basic implementation as it lacks SDP (services Discovery
Protocol), frames aggregation support, and frame rejecion parsing.
Follow up patches will implement those missing features.
This code has been tested against a Nexus S phone implementing LLCP 1.0.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoNFC: DEP link hook implementation for pn533
Samuel Ortiz [Wed, 14 Dec 2011 15:43:11 +0000 (16:43 +0100)]
NFC: DEP link hook implementation for pn533

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoNFC: Set and get DEP general bytes
Samuel Ortiz [Wed, 14 Dec 2011 15:43:10 +0000 (16:43 +0100)]
NFC: Set and get DEP general bytes

Without an API for setting and getting the local and remote general bytes,
drivers won't be able to properly establish a DEP link.
This API also allows them to propagate the remote general bytes they get
from the DEP link establishment up to the LLCP layer.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoNFC: Add a DEP link control netlink command
Samuel Ortiz [Wed, 14 Dec 2011 15:43:09 +0000 (16:43 +0100)]
NFC: Add a DEP link control netlink command

NFC-DEP (Data Exchange Protocol) is an NFC MAC layer.
This command allows to enable and disable the DEP link on to which e.g.
LLCP can run.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoNFC: Atomic socket allocation
Samuel Ortiz [Wed, 14 Dec 2011 15:43:08 +0000 (16:43 +0100)]
NFC: Atomic socket allocation

rawsock_create() is called with preemption disabled, so we should not
sleep.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoNFC: Do not take the genl mutex from the netlink release notifier
Samuel Ortiz [Wed, 14 Dec 2011 15:43:07 +0000 (16:43 +0100)]
NFC: Do not take the genl mutex from the netlink release notifier

The netlink notifier is atomic so we must not sleep in that context.
Also we know that Any netlink packets arriving to us will be purged when
the notifier is called, so we don't need to take the mutex.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoNFC: Add tx skb allocation routine
Samuel Ortiz [Wed, 14 Dec 2011 15:43:06 +0000 (16:43 +0100)]
NFC: Add tx skb allocation routine

This is a factorization of the current rawsock tx skb allocation routine,
as it will be used by the LLCP code.
We also rename nfc_alloc_skb to nfc_alloc_recv_skb for consistency sake.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoNFC: Add function name to the NFC pr_fmt() routine
Samuel Ortiz [Wed, 14 Dec 2011 15:43:05 +0000 (16:43 +0100)]
NFC: Add function name to the NFC pr_fmt() routine

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agort2x00: Make use of ieee80211_free_txskb in tx path
Helmut Schaa [Wed, 14 Dec 2011 15:28:41 +0000 (16:28 +0100)]
rt2x00: Make use of ieee80211_free_txskb in tx path

ieee80211_free_txskb should be used when dropping a frame in the device
rx path such that mac80211 knows about this frame being dropped.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: free skb on error path of ieee80211_ibss_join()
Simon Wunderlich [Wed, 14 Dec 2011 12:33:30 +0000 (13:33 +0100)]
mac80211: free skb on error path of ieee80211_ibss_join()

Our new return also created a memleak. The skb should be freed before
returning an error.

Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomwifiex: remove cfg_workqueue
Amitkumar Karwar [Wed, 14 Dec 2011 04:43:17 +0000 (20:43 -0800)]
mwifiex: remove cfg_workqueue

cfg_workqueue was added to notify cfg80211 that scan, connect
or disconnect is done by calling respective completion handlers.
We can avoid use of this workqueue by calling those handlers
from other places.
1) Call connect, disconnect completion handlers in their callback
   functions.
   ex. Call cfg80211_connect_result() in mwifiex_cfg80211_connect()
2) Call scan completion handler after parsing response of last scan
   command in a queue.

After removing the workqueue, variables (assoc_request etc.) and
checks used for mutual exclusion become redundant. Those are also
removed in this patch.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agonl80211: accept testmode dump with netdev
Johannes Berg [Tue, 13 Dec 2011 16:22:05 +0000 (17:22 +0100)]
nl80211: accept testmode dump with netdev

All nl80211 commands that need only the wiphy
still allow identifying it by giving an interface
index, except, as Kenny pointed out, the testmode
dump support.

Fix this by looking up the wiphy via the ifidx in
this case as well.

Tested-by: Kenny Hsu <kenny.hsu@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
John W. Linville [Wed, 14 Dec 2011 19:35:41 +0000 (14:35 -0500)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless

Conflicts:
drivers/net/wireless/iwlwifi/iwl-agn.c

12 years agoiwlwifi: allow to switch to HT40 if not associated
Wey-Yi Guy [Wed, 14 Dec 2011 16:22:36 +0000 (08:22 -0800)]
iwlwifi: allow to switch to HT40 if not associated

My previous patch
34a5b4b6af104cf18eb50748509528b9bdbc4036 iwlwifi: do not re-configure
HT40 after associated

Fix the case of HT40 after association on specified AP, but it break the
association for some APs and cause not able to establish connection.
We need to address HT40 before and after addociation.

CC: stable@vger.kernel.org #3.0+
Reported-by: Andrej Gelenberg <andrej.gelenberg@udo.edu>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Tested-by: Andrej Gelenberg <andrej.gelenberg@udo.edu>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlwifi: tx_sync only on PAN context
Johannes Berg [Wed, 14 Dec 2011 16:22:35 +0000 (08:22 -0800)]
iwlwifi: tx_sync only on PAN context

Ted reported that he couldn't connect to some APs
and bisected it to the tx_sync implementation.
Disable it for the BSS context to fix this issue.

Reported-by: Ted Ts'o <tytso@mit.edu>
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 agomwifiex: avoid double list_del in command cancel path
Yogesh Ashok Powar [Wed, 14 Dec 2011 04:43:16 +0000 (20:43 -0800)]
mwifiex: avoid double list_del in command cancel path

Command cancel path cancels the current command and moves
it to free command queue. While doing that it deletes the
command entry from the pending list. This is not correct
as the entry has been already deleted from the pending
list at 'mwifiex_exec_next_cmd'. Fixing it.

Also making sure the stale command pointer is cleaned and
unaccessible for later use.

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 agoath6kl: support for P2P mgmt operations on station interface
Aarthi Thiruvengadam [Tue, 13 Dec 2011 21:32:12 +0000 (13:32 -0800)]
ath6kl: support for P2P mgmt operations on station interface

This patch enables support for doing P2P management operations like device
discovery on top of a station interface. After group formation, the station
interface will become a P2P GO/client interface as the case may be.

This feature requires modifications to a couple of existing WMI structures and
therefore new command ids and structures have been defined in order to be
compatible with older firmware versions and other chips. The exception here is
the wmi_connect_cmd. Adding a new field to the end of the structure will not
cause any issues with previous firmware versions since firmware only checks for
minimum length of the command. The other structures are of variable length,
hence it was not possible to add new fields to the end.

The new command ids have to be added to the end of enum wmi_cmd_id, so it has
updated to match the firmware.

The driver will support both the 'old' and the 'new' commands for a while by
checking the firmware capabilities.

Signed-off-by: Aarthi Thiruvengadam <athiruve@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
12 years agoath6kl: Support different uart_tx pin and refclk configuration
Ryan Hsu [Tue, 13 Dec 2011 09:11:07 +0000 (17:11 +0800)]
ath6kl: Support different uart_tx pin and refclk configuration

AR6003 family use uart_tx=8 and refclk=26Mhz by default, and AR6004 family
uses different uart_tx pin and could also support various xtal source,
moves these per hw configuration.

Signed-off-by: Ryan Hsu <ryanhsu@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
12 years agob43: avoid calling bcma_* if CONFIG_B43_BCMA is not set
John W. Linville [Wed, 14 Dec 2011 14:03:52 +0000 (09:03 -0500)]
b43: avoid calling bcma_* if CONFIG_B43_BCMA is not set

Avoids this:

ERROR: "bcma_chipco_pll_write" [drivers/net/wireless/b43/b43.ko] undefined!

Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomwifiex: do not advertise custom regulatory domain capability
Amitkumar Karwar [Tue, 13 Dec 2011 03:56:58 +0000 (19:56 -0800)]
mwifiex: do not advertise custom regulatory domain capability

mwifiex driver no longer supports it's own custom regulatory rules,
but custom regulatory domain capability is still advertised during
wiphy registration by the driver.

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>
12 years agobrcm80211: smac: register with bcma for specific 802.11 core revisions
Arend van Spriel [Mon, 12 Dec 2011 23:15:12 +0000 (15:15 -0800)]
brcm80211: smac: register with bcma for specific 802.11 core revisions

The brcmsmac driver has been verified on chipsets that were supported
when it was a pci device driver, ie. bcm4313, bcm43224, and bcm43225.
This patch restricts the driver to 802.11 core revisions that are found
in these chipsets.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcm80211: smac: cleanup buscore handling in aiutils.c
Arend van Spriel [Mon, 12 Dec 2011 23:15:11 +0000 (15:15 -0800)]
brcm80211: smac: cleanup buscore handling in aiutils.c

Instead of storing the buscore information now the BCMA core device
is kept for quick reference in si_info structure.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcm80211: smac: cleanup si_info structure definition
Arend van Spriel [Mon, 12 Dec 2011 23:15:10 +0000 (15:15 -0800)]
brcm80211: smac: cleanup si_info structure definition

Number of fields are no longer needed as the BCMA provides it
or makes them redundant. These have been removed.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcm80211: smac: remove mapped core related function from aiutils.c
Arend van Spriel [Mon, 12 Dec 2011 23:15:09 +0000 (15:15 -0800)]
brcm80211: smac: remove mapped core related function from aiutils.c

In aiutils.c the selected core was maintained by its index number. This
is obsolete using BCMA functions so several functions using that index
have been removed.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcm80211: smac: remove ai_switch_core() function
Arend van Spriel [Mon, 12 Dec 2011 23:15:08 +0000 (15:15 -0800)]
brcm80211: smac: remove ai_switch_core() function

The function ai_switch_core() is no longer needed and its counterpart
ai_restore_core() as well, because interrupts disabling is not needed
anymore.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcm80211: smac: remove interrupt disable callback functionality
Arend van Spriel [Mon, 12 Dec 2011 23:15:07 +0000 (15:15 -0800)]
brcm80211: smac: remove interrupt disable callback functionality

There is no need to interrupt disable/enable functionality any
longer due to BCMA usage assures the correct core is accessed
in any context.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcm80211: smac: INTROFF/INTRESTORE macros removed
Arend van Spriel [Mon, 12 Dec 2011 23:15:06 +0000 (15:15 -0800)]
brcm80211: smac: INTROFF/INTRESTORE macros removed

The macros were used to assure that the correct core was accessed in
the ISR, but register access is now done giving the explicit core so
no need to change interrupt state.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcm80211: smac: remove empty or unused functions from pmu.c
Arend van Spriel [Mon, 12 Dec 2011 23:15:05 +0000 (15:15 -0800)]
brcm80211: smac: remove empty or unused functions from pmu.c

A number of functions in pmu.c are not used or adding no functionality
at all. These have been removed.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcm80211: smac: remove register access macro definitions
Arend van Spriel [Mon, 12 Dec 2011 23:15:04 +0000 (15:15 -0800)]
brcm80211: smac: remove register access macro definitions

The register access macros like R_REG/W_REG/etc. are no longer
needed as the driver uses the BCMA provided functions.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcm80211: smac: use bcma core access functions in aiutils.c
Arend van Spriel [Mon, 12 Dec 2011 23:15:03 +0000 (15:15 -0800)]
brcm80211: smac: use bcma core access functions in aiutils.c

The code in aiutils.c now uses the BCMA function for control the
registers in the device cores.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcm80211: smac: use bcma core access functions in pmu.c
Arend van Spriel [Mon, 12 Dec 2011 23:15:02 +0000 (15:15 -0800)]
brcm80211: smac: use bcma core access functions in pmu.c

The code in pmu.c now uses the functions provided by BCMA to
access the core registers.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcm80211: smac: use bcma core access function in srom.c
Arend van Spriel [Mon, 12 Dec 2011 23:15:01 +0000 (15:15 -0800)]
brcm80211: smac: use bcma core access function in srom.c

The code in srom.c now uses the core access function provided by
BCMA so no need to pass __iomem pointer any longer.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcm80211: smac: use bcma core access functions in otp.c
Arend van Spriel [Mon, 12 Dec 2011 23:15:00 +0000 (15:15 -0800)]
brcm80211: smac: use bcma core access functions in otp.c

The code in otp.c now uses the bcma core access functions to
read the OTP information from the device.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcm80211: smac: change ai_findcoreidx() to ai_findcore()
Arend van Spriel [Mon, 12 Dec 2011 23:14:59 +0000 (15:14 -0800)]
brcm80211: smac: change ai_findcoreidx() to ai_findcore()

Instead of returning the core index the function now returns
the bcma device for the requested core id. This function is
now exposed in the header file.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agob43: N-PHY: update TX power fix
Rafał Miłecki [Mon, 12 Dec 2011 22:40:22 +0000 (23:40 +0100)]
b43: N-PHY: update TX power fix

Specs were updated.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agob43: N-PHY: workaround broken auto-increment on BCM43224
Rafał Miłecki [Mon, 12 Dec 2011 20:38:36 +0000 (21:38 +0100)]
b43: N-PHY: workaround broken auto-increment on BCM43224

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agob43: N-PHY: fix 32-bit reads of tables
Rafał Miłecki [Mon, 12 Dec 2011 20:38:35 +0000 (21:38 +0100)]
b43: N-PHY: fix 32-bit reads of tables

The order is different than on older PHYs.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobcma: extract revision and TX power IDs from SPROM
Rafał Miłecki [Mon, 12 Dec 2011 20:33:12 +0000 (21:33 +0100)]
bcma: extract revision and TX power IDs from SPROM

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: don't check sdata_running in vif notifier
Eliad Peller [Mon, 12 Dec 2011 13:30:04 +0000 (15:30 +0200)]
mac80211: don't check sdata_running in vif notifier

The ip address of the vif can be set even before the
vif is up. requiring the vif to be up in the vif
notifier makes the notifer ignore this event, which
causes wrong arp filter configuration later on.

Reported-by: Eyal Shapira <eyal@wizery.com>
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: configure BSS_CHANGED_ARP_FILTER on reconfiguration
Eliad Peller [Mon, 12 Dec 2011 12:10:49 +0000 (14:10 +0200)]
mac80211: configure BSS_CHANGED_ARP_FILTER on reconfiguration

Configure arp filtering on sta reconfiguration.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: Do not request FIF_BCN_PRBRESP_PROMISC for HW scan.
Dmitry TARNYAGIN [Mon, 12 Dec 2011 11:58:43 +0000 (12:58 +0100)]
mac80211: Do not request FIF_BCN_PRBRESP_PROMISC for HW scan.

ieee80211_configure_filter code used local->scanning as a boolean
value when it was a bit mask. Bits SCAN_COMPLETED, SCAN_ABORTED
should not set FIF_BCN_PRBRESP_PROMISC filter.

SCAN_HW_SCANNING should not set FIF_BCN_PRBRESP_PROMISC either,
as there is no explicit filter configuration request from
scan code. If a driver requires FIF_BCN_PRBRESP_PROMISC mode
during HW scanning, it's up to the driver to temporary enable it.

Similar mistake was fixed also in ieee80211_hw_config (power
configuration code).

Verified-by: Vitaly Wool <vitaly.wool@sonyericsson.com>
Signed-off-by: Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agortlwifi: merge ips,lps spinlocks into one mutex
Stanislaw Gruszka [Mon, 12 Dec 2011 11:43:24 +0000 (12:43 +0100)]
rtlwifi: merge ips,lps spinlocks into one mutex

With previous patch "rtlwifi: use work for lps" we can now use mutex for
protecting ps mode changing critical sections. This fixes running system
with interrupts disabled for long time.

Merge ips_lock and lps_lock as they seems to protect the same data
structures (accessed in rtl_ps_set_rf_state() function).

Reported-by: Philipp Dreimann <philipp@dreimann.net>
Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Mike McCormack <mikem@ring3k.org>
Cc: Chaoming Li <chaoming_li@realsil.com.cn>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Tested-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agortlwifi: use work for lps
Stanislaw Gruszka [Mon, 12 Dec 2011 11:43:23 +0000 (12:43 +0100)]
rtlwifi: use work for lps

Leaving leisure power save mode can take some time, so it's better to
perform that action in process context with interrupts enabled. This
patch changes lps_leave tasklet to work.

Reported-by: Philipp Dreimann <philipp@dreimann.net>
Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Mike McCormack <mikem@ring3k.org>
Cc: Chaoming Li <chaoming_li@realsil.com.cn>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agob43: N-PHY: implement spurious tone avoidance
Rafał Miłecki [Sun, 11 Dec 2011 12:16:51 +0000 (13:16 +0100)]
b43: N-PHY: implement spurious tone avoidance

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agob43: N-PHY: finish 2.4GHz 0x2056 radio setup
Rafał Miłecki [Sun, 11 Dec 2011 01:55:34 +0000 (02:55 +0100)]
b43: N-PHY: finish 2.4GHz 0x2056 radio setup

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agob43: N-PHY: determine various PHY params
Rafał Miłecki [Sun, 11 Dec 2011 01:55:33 +0000 (02:55 +0100)]
b43: N-PHY: determine various PHY params

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agob43: N-PHY: add table for antenna software control
Rafał Miłecki [Sun, 11 Dec 2011 01:55:32 +0000 (02:55 +0100)]
b43: N-PHY: add table for antenna software control

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agob43: N-PHY: workaround BCM43224 hw bug in writing table id 9
Rafał Miłecki [Sun, 11 Dec 2011 01:55:31 +0000 (02:55 +0100)]
b43: N-PHY: workaround BCM43224 hw bug in writing table id 9

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agob43: N-PHY: update some init values
Rafał Miłecki [Sun, 11 Dec 2011 01:55:30 +0000 (02:55 +0100)]
b43: N-PHY: update some init values

Changes were obtained from MMIO dump from 5.100.82.112.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agob43: N-PHY: random trivial fixes for typos, missing writes
Rafał Miłecki [Sun, 11 Dec 2011 01:55:29 +0000 (02:55 +0100)]
b43: N-PHY: random trivial fixes for typos, missing writes

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: make two mci related functions static
Felix Fietkau [Sat, 10 Dec 2011 21:11:19 +0000 (22:11 +0100)]
ath9k: make two mci related functions static

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobcma: support for suspend and resume
Rafał Miłecki [Fri, 9 Dec 2011 21:16:07 +0000 (22:16 +0100)]
bcma: support for suspend and resume

bcma used to lock up machine without enabling PCI or initializing CC.

Cc: stable@vger.kernel.org
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomwifiex: wakeup and stop multiple tx queues in net_device
Avinash Patil [Fri, 9 Dec 2011 04:41:05 +0000 (20:41 -0800)]
mwifiex: wakeup and stop multiple tx queues in net_device

replace single queue function calls with equivalent multiple queue
functions. Wakeup queue and stop queue calls are guarded by spin lock.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomwifiex: proper cleanup when RX multiport aggregation fails
Avinash Patil [Fri, 9 Dec 2011 04:41:04 +0000 (20:41 -0800)]
mwifiex: proper cleanup when RX multiport aggregation fails

Free SKBs allocated during multiport aggrgation setup when RX
multiport aggregation fails in the middle. With this handling
freeing SKB in mwifiex_process_int_status() for failure case
is removed.

Also handles single RX transaction failure.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomwifiex: failure case handling for PCIe events
Amitkumar Karwar [Fri, 9 Dec 2011 04:41:03 +0000 (20:41 -0800)]
mwifiex: failure case handling for PCIe events

Event buffers for PCIe interface are allocated during driver
initialisation, and respective physical addresses are sent to FW
in *_PCIE_DESC_DETAILS command so that FW can do DMA. These buffers
will be freed while unloading the driver. Therefore we should not
free them in event handling error path. Also we should skip next
pending events in failure case.

Also fixed 'returning -1 instead of -ENOMEM is sloppy' warnings.

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>