firefly-linux-kernel-4.4.55.git
12 years agoiwlwifi: remove unused AMPDU factor/density configuration
Johannes Berg [Thu, 8 Dec 2011 15:13:29 +0000 (07:13 -0800)]
iwlwifi: remove unused AMPDU factor/density configuration

These are unused, so can be removed safely. They also
don't make a lot of sense in Bluetooth configuration.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: remove most of the iwl_priv references from iwl-ucode.c
Don Fry [Wed, 7 Dec 2011 16:50:46 +0000 (08:50 -0800)]
iwlwifi: remove most of the iwl_priv references from iwl-ucode.c

Remove all but the last few references to iwl_priv from the lower
level iwl-ucode.c, with resulting code changes.

Signed-off-by: Don Fry <donald.h.fry@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: create iwl_mac80211 unregister routine
Don Fry [Fri, 9 Dec 2011 18:07:38 +0000 (10:07 -0800)]
iwlwifi: create iwl_mac80211 unregister routine

The mac80211 setup_register operations are collected in one routine,
but the cleanup routines are not.  Create a routine for this.

Signed-off-by: Don Fry <donald.h.fry@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: add missing documentation for iwl_shared
Emmanuel Grumbach [Wed, 7 Dec 2011 12:46:24 +0000 (14:46 +0200)]
iwlwifi: add missing documentation for iwl_shared

A few descriptions were missing

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: don't accept Tx packets when draining HW queues
Emmanuel Grumbach [Wed, 7 Dec 2011 08:32:36 +0000 (10:32 +0200)]
iwlwifi: don't accept Tx packets when draining HW queues

If the agg SM is in IWL_EMPTYING_HW_QUEUE_ADDBA or in
IWL_EMPTYING_HW_QUEUE_DELBA, we are not supposed to get Tx packets
from mac80211. mac80211 is supposed to buffer these packets for us.
A few issues have been identified in this mechanism, not all of them
were fixed.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: kill iwl_{start,stop}_tx_ba_trans_ready
Emmanuel Grumbach [Wed, 7 Dec 2011 08:11:00 +0000 (10:11 +0200)]
iwlwifi: kill iwl_{start,stop}_tx_ba_trans_ready

Since my latest patches, the upper layer reports to mac80211 that the
driver is ready to continue the start / stop BA flow as opposed to
the transport layer. Hence, iwl_{start,stop}_tx_ba_trans_ready are
not needed any more.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: add debug in Tx path in AGG flow
Emmanuel Grumbach [Wed, 7 Dec 2011 07:30:21 +0000 (09:30 +0200)]
iwlwifi: add debug in Tx path in AGG flow

This will allow us to catch bad cases in which the packets aren't in
the right place on the ring.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: reset the tid_data when a station is removed
Emmanuel Grumbach [Wed, 23 Nov 2011 09:37:27 +0000 (11:37 +0200)]
iwlwifi: reset the tid_data when a station is removed

Since the station is removed, we need to reset the information that
was accounted for this station.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: tid_data moves to iwl_priv
Emmanuel Grumbach [Wed, 23 Nov 2011 09:06:12 +0000 (11:06 +0200)]
iwlwifi: tid_data moves to iwl_priv

The transport doesn't need to access it any more.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
12 years agoiwlwifi: transport layer shouldn't access the AGG SM
Emmanuel Grumbach [Wed, 23 Nov 2011 08:52:20 +0000 (10:52 +0200)]
iwlwifi: transport layer shouldn't access the AGG SM

This is another step towards the move of tid_data from the shared
area.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: tid_data logic move to upper layer - seq_number
Emmanuel Grumbach [Mon, 21 Nov 2011 11:25:31 +0000 (13:25 +0200)]
iwlwifi: tid_data logic move to upper layer - seq_number

The tid_data is not related to the transport layer, so move
the logic that depends on it to the upper layer.
This patch deals with the seq_number.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: tid_data logic move to upper layer - txqid
Emmanuel Grumbach [Mon, 21 Nov 2011 11:25:31 +0000 (13:25 +0200)]
iwlwifi: tid_data logic move to upper layer - txqid

The tid_data is not related to the transport layer, so move
the logic that depends on it to the upper layer.
This patch deals with the mapping of RA / TID to HW queues in AGG.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: tid_data logic move to upper layer - check_empty
Emmanuel Grumbach [Fri, 16 Dec 2011 15:13:25 +0000 (07:13 -0800)]
iwlwifi: tid_data logic move to upper layer - check_empty

The tid_data is not related to the transport layer, so move
the logic that depends on it to the upper layer.
This patch deals with the code that checks if there are still
pending packets for an RA / TID.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: tid_data logic move to upper layer - tx AGG setup
Emmanuel Grumbach [Mon, 21 Nov 2011 11:25:31 +0000 (13:25 +0200)]
iwlwifi: tid_data logic move to upper layer - tx AGG setup

The tid_data is not related to the transport layer, so move
the logic that depends on it to the upper layer.
This patch deals with tx AGG setup.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: tid_data logic move to upper layer - tx AGG alloc
Emmanuel Grumbach [Mon, 21 Nov 2011 11:25:31 +0000 (13:25 +0200)]
iwlwifi: tid_data logic move to upper layer - tx AGG alloc

The tid_data is not related to the transport layer, so move
the logic that depends on it to the upper layer.
This patch deals with tx AGG alloc.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: tid_data logic move to upper layer - tx AGG stop
Emmanuel Grumbach [Mon, 21 Nov 2011 11:25:31 +0000 (13:25 +0200)]
iwlwifi: tid_data logic move to upper layer - tx AGG stop

The tid_data is not related to the transport layer, so move
the logic that depends on it to the upper layer.
This patch deals with tx AGG stop.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: don't rely on the wr / rd pointers in DELBA flow
Emmanuel Grumbach [Mon, 21 Nov 2011 09:49:25 +0000 (11:49 +0200)]
iwlwifi: don't rely on the wr / rd pointers in DELBA flow

In the same spirit as the previous patch. Eventually this will
allow us to remove the tid_data knowledge from the transport layer.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: we can wake SW queues even when draining HW queues
Emmanuel Grumbach [Mon, 21 Nov 2011 20:31:54 +0000 (22:31 +0200)]
iwlwifi: we can wake SW queues even when draining HW queues

In the very first implementation of HT, the driver was responsible
for the queueing: stopping and waking the queues while the HW queues
where being drained. In this implementation, we had to deal with the
case where we were draining the AGG queue because we wanted to tear
down the BA agreement.
In the normal flow (when we don't drain any HW queue), when packets
are reclaimed, we wake the SW queue in case the SW queue was stopped
which can happen when the HW queues are too full.
While draining a HW queue, we must make sure that we don't wake the
SW queue, since the whole point of the draining is to empty totally
the HW queue and not only get below a certain threshold.
This is why there is condition in the reclaim function:

if (NOT EMPTYING DELBA)
wake the SW queue is applicable

Since then, a lot has changed and mac80211 is now able to buffer
packets that are being sent to a packet list that will be spliced
after the driver has reported it has drained its HW queues.
Hence, there is no need for the for aforementioned if, and we can
safely wake up the queue even if we are draining HW queues.
Removing this if, also allows us to remove the wake_queue in
check_empty that was there in order to deal with a corner case
created by the if.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: don't count the tfds in HW queue any more
Emmanuel Grumbach [Mon, 21 Nov 2011 09:07:18 +0000 (11:07 +0200)]
iwlwifi: don't count the tfds in HW queue any more

Since packets sent to an RA / TID in AGG are sent from a
separate HW Tx queue, we may get into a race:
the regular queue isn't empty while we already begin to
send packets from the AGG queue. This would result in sending
packets out of order.

In order to cope with this, mac80211 waits until the driver
reports that the legacy queue is drained before it can send
packets to the AGG queue. During that time, mac80211 buffers
packets for the driver. These packets will be sent in order
after the driver reports it is ready.

The way this was implemented in the driver is as follows:
We held a counter that monitors the number of packets for
an RA / TID in the HW queues. When this counter reached 0,
we knew that the HW queues were drained and we reported to
mac80211 that were ready to proceed.

This patch changes the implementation described above. We
now remember what is the wifi sequence number of the first
packet that will be sent in the AGG queue (lets' call it
ssn). When we reclaim the packet before ssn, we know that
the queue is drained, and we are ready to proceed.

This will allow us to move this logic in the upper layer and
eventually remove the tid_data from the shared area.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: fix endianity issue in debug prints
Emmanuel Grumbach [Mon, 21 Nov 2011 09:15:34 +0000 (11:15 +0200)]
iwlwifi: fix endianity issue in debug prints

ba_resp->seq_ctl is __le16, need to translate to cpu endianity.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: Add official names for new devices
Don Fry [Tue, 6 Dec 2011 18:42:41 +0000 (10:42 -0800)]
iwlwifi: Add official names for new devices

Replace the engineering names with the marketing names for the
new devices.

Signed-off-by: Don Fry <donald.h.fry@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: move iwl_cfg from iwl_priv to iwl_shared
Don Fry [Fri, 16 Dec 2011 15:07:36 +0000 (07:07 -0800)]
iwlwifi: move iwl_cfg from iwl_priv to iwl_shared

Move the configuration pointer from the upper level iwl_priv to the
lower level iwl_shared structure, with associated code fixes.

Signed-off-by: Don Fry <donald.h.fry@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
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 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>