Commit graph

12263 commits

Author SHA1 Message Date
Amitkumar Karwar d930faee14 mwifiex: add support for Marvell pcie8766 chipset
This patch supports 88W8766P chipset with a PCIe interface.

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

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Ramesh Radhakrishnan <rramesh@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Frank Huang <frankh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-10-12 14:41:44 -04:00
Felix Fietkau ec205999d3 ath9k: only send FCS-fail packets to mac80211 if requested
Prevents lots of broken frames from showing up on monitor interfaces
by default.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-10-11 16:41:30 -04:00
Felix Fietkau 846d936350 ath9k_hw: fix a regression in key miss handling
The commit "ath9k_hw: Fix incorrect key_miss handling" changed the code
to only report key miss errors if a MIC error wasn't reported.
When checking the flags in that order in the MAC code, it might miss some
real events, because the value of the MIC error flag is undefined under
some conditions.

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

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

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Cc: stable@kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-10-11 16:41:29 -04:00
Felix Fietkau 1b428a26a1 ath9k_hw: remove EEP_REG_1
It was previously used for current_rd_ext

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-10-11 16:41:28 -04:00
Felix Fietkau cd2ea0df68 ath: remove ath_regulatory::current_rd_ext
It is unused since the previous dead code that was using it had been
removed earlier.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-10-11 16:41:27 -04:00
Felix Fietkau ca2c68cc7b ath9k_hw: clean up tx power handling
The code for handling various restrictions concerning regulatory limits,
antenna gain, etc. is very convoluted and duplicated across various
EEPROM parsing implementations, making it hard to review.

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

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-10-11 16:41:26 -04:00
Felix Fietkau 72d874c67c ath9k_hw: make ath9k_hw_set_interrupts use ah->imask by default
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-10-11 16:41:25 -04:00
Felix Fietkau ac06697c79 ath9k: disable unnecessary PHY error reporting
PHY errors relevant for ANI are always tracked by hardware counters, the
bits that allow them to pass through the rx filter are independent of that.
Enabling PHY errors in the rx filter often creates lots of useless DMA traffic
and might be responsible for some of the rx dma stop failure warnings.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Cc: stable@kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-10-11 16:41:24 -04:00
Rafał Miłecki 55ad5962e9 b43: trivial: do not report any link quality instead of invalid one
We don't want to report random quality info (new PHYs are affected).

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-10-11 16:41:23 -04:00
Larry Finger 73a253ca98 rtlwifi: Change debug parameter to apply to individual drivers
The current debug parameter is applied to rtlwifi, which means that all
loaded drivers have the same level of debugging applied. In addition,
the previous method requires a two-step load process to enable debugging.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-10-11 16:41:22 -04:00
Felix Fietkau daa5c408a5 ath9k: fix retry counting / BAR handling during queue flush
When tx is suspended temporarily and the queue is flushed, do not increase
the retry count or attempt to send out BAR frames. Instead simply retry
the affected subframes normally after the reset.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-10-11 16:41:15 -04:00
Felix Fietkau 26a64259b7 ath9k: improve PS filter clearing and retry counting for A-MPDU
Do not increment the retry counter if packets to a sleeping station
were not sent because of tx failure, instead of only checking the filter
flag.
Clear the PS filter only after an A-MPDU was reported as filtered,
otherwise the hardware might do some unnecessary extra retransmissions.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-10-11 16:41:14 -04:00
Felix Fietkau 030d629435 ath9k: keep track of what's triggering hardware resets
Export how many times each of the reset triggers has fired through debugfs.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-10-11 16:41:13 -04:00
Felix Fietkau 34d25810c7 ath9k: indicate which queues are blocked when stopping tx fails
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-10-11 16:41:12 -04:00
Yogesh Ashok Powar 3d82de0fa5 mwifiex: fix smatch errors
drivers/net/wireless/mwifiex/main.c +828 mwifiex_remove_card(52)
  error: potential null derefence 'priv'.
drivers/net/wireless/mwifiex/main.c +828 mwifiex_remove_card(52)
  error: we previously assumed 'priv' could be null (see line 820)
drivers/net/wireless/mwifiex/txrx.c +90 mwifiex_process_tx(24)
  error: potential null derefence 'local_tx_pd'.
drivers/net/wireless/mwifiex/sta_ioctl.c +766
mwifiex_rate_ioctl_set_rate_value(30)
  error: buffer overflow 'rate' 14 <= 14

Cc: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-10-11 16:41:11 -04:00
Dan Carpenter f49bbd2a45 ath9k: remove some bogus error handling code
If "axq_qnum >= ARRAY_SIZE(sc->tx.txq)", then the call to
ath9k_hw_releasetxqueue() would read beyond the end of the ah->txq[]
array and possibly corrupt memory.  Fortunately,
ath9k_hw_setuptxqueue() doesn't return high values of "axq_qnum" and
this code can be removed.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-10-11 16:41:10 -04:00
Dan Carpenter 8fb7475bde ath5k: remove some unneeded error handling code
th5k_hw_setup_tx_queue() returns a valid offset into the ah->ah_txq[]
array.  The ah->ah_txq[] and the ah->txqs[] array are the same size.
Both have AR5K_NUM_TX_QUEUES elements.  So this error handling code
will never trigger.

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

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-10-11 16:41:09 -04:00
Wey-Yi Guy af4dc88c56 iwlagn: separate init calib and rt calib
My previous patch for init calib cfg disable a set of calibration for both
init and runtime which cause performance issue, Fix it

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-10-11 16:41:07 -04:00
John W. Linville 5dde8e1749 Merge branch 'for-linville' of git://github.com/lucacoelho/wl12xx 2011-10-11 15:56:29 -04:00
Arend van Spriel 5b435de0d7 net: wireless: add brcm80211 drivers
Add the brcm80211 tree to drivers/net/wireless, and disable the version that's
in drivers/staging.  This version includes the sources currently in staging,
plus any changes that have been sent out for review.

Sources in staging will be deleted in a followup patch.

Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-10-11 15:55:30 -04:00
John W. Linville 094daf7db7 Merge branch 'master' of git://git.infradead.org/users/linville/wireless-next into for-davem
Conflicts:
	Documentation/feature-removal-schedule.txt
2011-10-11 15:35:42 -04:00
John W. Linville 5f68a2b0a8 ath6kl: fixup merge damage in ath6kl_mgmt_tx
CC [M]  drivers/net/wireless/ath/ath6kl/cfg80211.o
drivers/net/wireless/ath/ath6kl/cfg80211.c:1838:2: warning: initialization from incompatible pointer type

Caused by commit e9f935e3e8dc0bddd0df6d148165d95925422502...

Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-10-11 15:33:10 -04:00
Rafael J. Wysocki 9696cc9007 Merge branch 'pm-qos' into pm-for-linus
* pm-qos:
  PM / QoS: Update Documentation for the pm_qos and dev_pm_qos frameworks
  PM / QoS: Add function dev_pm_qos_read_value() (v3)
  PM QoS: Add global notification mechanism for device constraints
  PM QoS: Implement per-device PM QoS constraints
  PM QoS: Generalize and export constraints management code
  PM QoS: Reorganize data structs
  PM QoS: Code reorganization
  PM QoS: Minor clean-ups
  PM QoS: Move and rename the implementation files
2011-10-07 23:17:07 +02:00
Eliad Peller 694440d93b wl12xx: disable AP-mode-specific quirks
The current wl12xx fw (7.3.0.0.77) supports both STA and AP mode, and
we no longer use AP-mode-specific quirks.

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

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-10-07 08:32:30 +03:00
Shahar Levi 6d158ff38d wl12xx: Add support for HW channel switch
The wl12xx FW supports HW channel switch.  If we don't use it,
sometimes the firmware gets confused when recalibrating to the new
channel, causing RX problems.  This commit adds HW channel switch
support by implementing the channell_switch op.

Signed-off-by: Shahar Levi <shahar_levi@ti.com>
[added one comment, remove the tx_flush and rephrased the commit message]
Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-10-07 08:32:27 +03:00
Luciano Coelho c9e79a4714 wl12xx: set max_sched_scan_ie_len correctly
The wiphy max_sched_scan_ie_len attribute was not set correctly and
remained as 0, so when IEs were being passed in a scheduled scan, we
were returning -EINVAL.

Fix this by setting the attribute properly.

Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-10-07 08:31:44 +03:00
Eliad Peller 4b29886feb wl12xx: configure rate policy for p2p operations
p2p packets should go out only with OFDM rates.

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

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

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-10-07 08:31:43 +03:00
Mohammed Shafi Shajakhan 76ed94be65 ath9k_hw: set pci_express capability true for AR9480
the AR_SREV register does not seems to indicate whether AR9480 is
pci_express capable or not though the other information like macVersion
etc can be obtained properly. this fix is essential as ASPM won't be intialized
and its related driver functionality ath9k_hw_configpcipowersave won't be
called

Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-10-03 15:22:42 -04:00
Mohammed Shafi Shajakhan 6321eb0977 ath9k_hw: Fix number of GPIO pins for AR9287/9300
this patch fixes the assumption of maximum number of GPIO pins present
in AR9287/AR9300. this fix is essential as we might encounter some
functionality issues involved in accessing the status of GPIO pins which
are all incorrectly assumed to be not within the range of max_num_gpio
of AR9300/AR9287 chipsets

Cc: stable@kernel.org
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-10-03 15:22:42 -04:00
Daniel Drake 8f641d93c3 libertas: detect TX lockups and reset hardware
Recent patches added support for resetting the SD8686 hardware when
commands time out, which seems to happen quite frequently soon after
resuming the system from a Wake-on-WLAN-triggered resume.

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

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

Signed-off-by: Daniel Drake <dsd@laptop.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-10-03 15:22:41 -04:00
Eliad Peller 8a3a3c85e4 mac80211: pass vif param to conf_tx() callback
tx params should be configured per interface.
add ieee80211_vif param to the conf_tx callback,
and change all the drivers that use this callback.

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

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

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-10-03 15:22:41 -04:00
Don Fry 3c607d27c8 iwlagn: rename iwlagn module iwlwifi and alias to iwlagn.
Rename the iwlagn module as iwlwifi in preparation for future
changes.  Add an alias to iwlagn for backward compatibility.

Signed-off-by: Don Fry <donald.h.fry@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-10-03 15:22:38 -04:00
Mohammed Shafi Shajakhan 28d8c1df03 ath9k_hw: extend GPIO pin select mask for rfkill
this extends the bits for rf kill GPIO selection to [7:2] from [4:2] as
we use GPIO pin 11 as rfkill for AR9480 and also remove few unused
macros

Cc: Wilson Tsao <wtsao@qca.qualcomm.com>
Cc: "Hu, Russell" <rhu@qca.qualcomm.com>
Cc: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-10-03 15:22:36 -04:00
Amitkumar Karwar 44b815c6b0 mwifiex: handle an error path correctly
In failure case locks are not allocated in mwifiex_register().
So mwifiex_free_lock_list() routine call becomes redundant.
Also we don't need to check return type for mwifiex_init_lock_list()
routine. It never fails.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-10-03 15:22:36 -04:00
Amitkumar Karwar d85c5fe462 mwifiex: correct AMSDU aggregation check
The commit "mwifiex: remove list traversal.."(fcf2176c87..)
wrongly modifies AMSDU aggregation check. Due to this even though
packet size for iperf traffic is already large, we unnecessarily
try to aggregate them which adds some delay. If Tx iperf is started
on UUT for 30 seconds, UUT keeps sending Tx packets for few more
seconds.

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

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-10-03 15:22:35 -04:00
Luis R. Rodriguez 8c34559b4a ath9k_htc: add AVM FRITZ!WLAN 11N v2 support
This was reported and tested by Martin Walter over at AVM GmbH Berlin.
This also applies to 3.0.1 so sendint to stable.

Cc: s.kirste@avm.de
Cc: d.friedel@avm.de
Cc: Martin Walter <m.walter@avm.de>
Cc: Peter Grabienski <pgrabien@qca.qualcomm.com>
Cc: stable@kernel.org
Tested-by: Martin Walter <m.walter@avm.de>
Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-10-03 15:22:35 -04:00
John W. Linville a5abbcb220 Merge branch 'for-linville' of git://github.com/kvalo/ath6kl 2011-10-03 14:59:35 -04:00
Kalle Valo 62c83ac4d6 ath6kl: include vmalloc.h in debug.c
Fixes compilation errors when compiling for ARM:

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

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-10-03 13:52:46 +03:00
Kalle Valo ef54862642 ath6kl: fix size_t related warnings
My earlier debug log additions added these warnings when compiling 64 bit
kernels:

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

Reported-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-10-01 12:05:36 +03:00
Johannes Berg 47086fc51a mac80211: implement uAPSD
Add uAPSD support to mac80211. This is probably not
possible with all devices, so advertising it with
the cfg80211 flag will be left up to drivers that
want it.

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

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-30 15:57:15 -04:00
Johannes Berg 042ec45337 mac80211: let drivers inform it about per TID buffered frames
For uAPSD implementation, it is necessary to know on
which ACs frames are buffered. mac80211 obviously
knows about the frames it has buffered itself, but
with aggregation many drivers buffer frames. Thus,
mac80211 needs to be informed about this.

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

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

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

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-30 15:57:10 -04:00
Greg Dietsche a76011e2cb iwlagn: iwl-agn-rs: remove unnecessary null check for sta and lq_sta
both sta and lq_sta are guaranteed to be not null in the
calling function so we don't need to check them here.

Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-30 15:57:04 -04:00
Mohammed Shafi Shajakhan 90826313fd ath9k/ath9k_htc: Fix PS wrappers for RF kill
ath9k_hw_gpio_get reads the GPIO in/out registers to get the status of
GPIO pins, so use PS wrappers

Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-30 15:57:04 -04:00
Larry Finger ffca287118 rtlwifi: Remove unused _usb_nbytes_read_write and _usb_writeN_sync
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-30 15:57:02 -04:00
Larry Finger 970ba6a64d rtlwifi: Remove unused routine _usb_readN_sync
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-30 15:57:02 -04:00
Yogesh Ashok Powar 93a1df48d2 mwifiex: add cfg80211 handlers add/del_virtual_intf
Making adding and deleting virtual interfaces dynamic. Adding
handlers for creating and deleting virtual interface with
given name and dev respectively.

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

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-30 15:57:01 -04:00
Amitkumar Karwar 4ec6f9c0c9 mwifiex: fix Tx data rate display issue
"iw dev mlan0 link" shows wrong data rate, because data rate is
not sent properly to cfg80211 stack. Also stack is not updated
with mcs and Tx data flags information.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-30 15:57:00 -04:00
Amitkumar Karwar cbaaf592b7 mwifiex: remove unreachable code
In disconnected state "iw dev mlan0 link" command will return
from cfg80211 stack itself. We also have an error check in
mwifiex_cfg80211_get_station() routine. Therefore the code
under "if (!priv->media_connected)" condition in
mwifiex_rate_ioctl_get_rate_value() routine becomes unreachable.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-30 15:56:59 -04:00
Amitkumar Karwar 82df4d38a0 mwifiex: remove unnecessary mwifiex_dump_station_info() call
An extra call to mwifiex_dump_station_info() routine in get_station
callback function is redundant

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-30 15:56:59 -04:00
Rajkumar Manoharan f73c604cfb ath9k: Remove redundant my beacon check at ath_rx_ps_beacon
Make use of the rx status's is_mybeacon in order to avoid
redundant memcmp.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-30 15:56:58 -04:00
Rajkumar Manoharan 185d1589cc ath9k: Remove unnecessary AMPDU check at tx status
Fill the ampdu_[ack]_len for both aggregation and normal frames.
So that we could avoid unnecesary conditional at tx status.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-30 15:56:57 -04:00
Andy Shevchenko 4ca8c452a6 wireless: at76c50x: use native hex_pack_byte() method
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: "John W. Linville" <linville@tuxdriver.com>
Tested-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-30 15:16:25 -04:00
John W. Linville 8e00f5fbb4 Merge branch 'master' of git://git.infradead.org/users/linville/wireless-next into for-davem
Conflicts:
	drivers/net/wireless/iwlwifi/iwl-pci.c
	drivers/net/wireless/wl12xx/main.c
2011-09-30 14:52:29 -04:00
Stephen Rothwell c6efe578fc wireless/ath6kl: use of module_param requires the inclusion of moduleparam.h
Otheriwse the module.h split up fails like this:

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

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-09-28 19:32:59 +03:00
Kalle Valo b9b6ee6039 ath6kl: improve wmi debug messages
Add a new debug level ATH6KL_DBG_WMI_DUMP and other minor
improvements to the wmi debug messages.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-09-28 19:27:31 +03:00
Kalle Valo 6bc364315a ath6kl: add debug logs for booting
Just to make it easier to find out why boot fails.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-09-28 19:27:31 +03:00
Kalle Valo f7325b85ef ath6kl: add sdio debug messages
Add extensive debug messages to sdio.c. Makes it easier to debug
various problems.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-09-28 19:27:31 +03:00
Kalle Valo ef09410323 ath6kl: add prefix parameter to ath6kl_dbg_dump()
Makes it easier to recognise longs dumps.

Obligatory screenshot using "rx" prefix:

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

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-09-28 19:27:30 +03:00
Kalle Valo 9a7308341b ath6kl: silence "invalid rate" warning
For some reason firmware is sending invalid rates when we try to
query current bitrate from ath6kl_get_station() and a warning is issued:

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

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

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-09-28 19:03:47 +03:00
John W. Linville 0874073570 Merge branch 'master' of git://git.infradead.org/users/linville/wireless
Conflicts:
	drivers/net/wireless/iwlwifi/iwl-scan.c
	net/wireless/nl80211.c
2011-09-28 10:28:09 -04:00
John W. Linville a8acfd82eb Merge branch 'master' of git://git.infradead.org/users/linville/wireless into for-davem 2011-09-27 15:47:33 -04:00
Dan Carpenter 2fb40577b0 wl3501_cs: min_t() cast truncates high bits
wrqu->encoding.length comes from the network administrator.  It's
size u16.  We want to limit "tocopy" to the smallest value of either
"len_keys", "wrqu->encoding.length" or 100.  But because .length
gets cast from u16 to u8 we might use a random, smaller value than
the was desired.  It's probably not very serious, but we may as well
fix it.

Btw, this is from code auditing and not from testing.  I don't know
if this affects anyone in real life.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-27 14:36:04 -04:00
Johannes Berg 84b1bec6d7 iwlagn: fix scan complete processing
When we cancel a scan, the completion runs
only from the workqueue. This can cause the
remain-on-channel scan to fail when another
one was just canceled, because we're still
aborting it.

To fix this, run the completion inline with
the lock still held before returning from
iwl_scan_cancel_timeout().

Also, to avoid the scan complete work from
completing a new scan prematurely, add a
new STATUS_SCAN_COMPLETE bit.

Reported-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Tested-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-27 14:34:09 -04:00
Johannes Berg a2fa2462f0 iwlagn: move iwl_process_scan_complete up
To make the next patch easier to read, move
the function up, it'll be needed earlier in
this file in the next patch.

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>
2011-09-27 14:34:09 -04:00
Johannes Berg f253247a94 iwlagn: refactor scan complete
We'll need to be able to run scan complete
inline, not from the workqueue, so refactor
it.

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>
2011-09-27 14:34:09 -04:00
Johannes Berg 98efb4a52b iwlagn: make iwl_scan_cancel_timeout void
The return value of iwl_scan_cancel_timeout()
isn't used anywhere, so let's just remove it.

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>
2011-09-27 14:34:08 -04:00
Johannes Berg 0288356272 iwlagn: remove Kelvin support
Only 5150 series devices report their temperature
in Kelvin, and for those we already convert it to
Celsius when storing into priv->temperature, so
there's no way priv->temperature will ever be in
Kelvin. Remove support for this.

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>
2011-09-27 14:34:08 -04:00
Johannes Berg 325a7ddf7b iwlagn: fix slot programming
When an AP mode interface is added with a DTIM
period of two, the slot programming is wrong.
Fix it by taking into account the DTIM period.

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>
2011-09-27 14:34:08 -04:00
Johannes Berg 8bd2c1ead5 iwlagn: fix dangling scan request
If iwl_scan_initiate() fails for any reason,
priv->scan_request and priv->scan_vif are left
dangling. This can lead to a crash later when
iwl_bg_scan_completed() tries to run a pending
scan request.

In practice, this seems to be very rare due to
the STATUS_SCANNING check earlier. That check,
however, is wrong -- it should allow a scan to
be queued when a reset/roc scan is going on.
When a normal scan is already going on, a new
one can't be issued by mac80211, so that code
can be removed completely. I introduced this
bug when adding off-channel support in commit
266af4c745.

Cc: stable@kernel.org [3.0]
Reported-by: Peng Yan <peng.yan@intel.com>
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>
2011-09-27 14:34:07 -04:00
Emmanuel Grumbach 7f90dce1ea iwlagn: use kcalloc when possible for array allocation
As everybody knows kcalloc checks the multiplication is safe and
that we don't run into overflow.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-27 14:34:07 -04:00
Emmanuel Grumbach 1a8496137d iwlagn: update rate scaling with BA notifications
In the current code, the rate scaling isn't fed with
statistics from the BA notifications.

This is since my patch:

	iwlagn: reclaim the packets in transport layer

Fix that.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-27 14:34:07 -04:00
Wey-Yi Guy 1895b36bfb iwlagn: add debugging to show probe related info in scan notification
Add debugging to show the status of probe in scan notification
to help debug probe related issues

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-27 14:34:07 -04:00
Emmanuel Grumbach 02dc84fe18 iwlagn: set the sequence control from the transport layer
Since all the queue logic has been moved to the transport layer,
the sequence number is set in the transport layer.
While doing that I forgot that the mac header is copied to the
TB of the TX cmd in the upper layer before the call to the transport
layer. So basically we used the sequence number from mac80211...
This was fine for the first assocation but after the second, mac80211
resets its counters while we don't hence a shift that led to terrible
impact on performance.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-27 14:34:06 -04:00
Emmanuel Grumbach 511afa3bfb iwlagn: sparse warning priv->temperature is signed
Since priv->temperature is signed, we cannot use debugfs_create_u32
to refer to it.
Use a regular debugfs file instead.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-27 14:34:06 -04:00
Emmanuel Grumbach d56da92092 iwlagn: remove warning in iwl_rx_handle
Txid was used without being initialized.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-27 14:34:05 -04:00
Felix Fietkau 1a8f0d39a0 ath9k: fix a regression in ath9k_ps_restore
After 'ath9k: optimize ath9k_ps_restore', it would only send the device to
network sleep and not to full sleep anymore, potentially causing more
battery drain.

Reported-by: Vivek Natarajan <nataraja@qca.qualcomm.com>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-27 14:34:05 -04:00
Amitkumar Karwar 5cf80993ad mwifiex: reset skb length before inserting to free queue
After handling command response, cmd skb is inserted into command
free queue(which keeps track of availabile skbs) for reuse purpose.
Skb length is not getting reset to zero here. This patch takes care
of it.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-27 14:34:04 -04:00
Amitkumar Karwar 4ed5d521b0 mwifiex: pass correct band parameter to ieee80211_channel_to_frequency()
ieee80211_channel_to_frequency() routine expects band parameter in
the form of "enum ieee80211_band band". Currently driver specific
band (BAND_A, BAND_AN etc.) is passed to the routine.

This patch makes sure that correct parameter is passed.

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>
2011-09-27 14:34:03 -04:00
Amitkumar Karwar 5116f3cef2 mwifiex: update bss band information
In recent commit "mwifiex: use cfg80211 dynamic scan..."
(7c6fa2a843..) scan table handling in driver is removed to
make use of cfg80211 dynamic scan table. Now driver sends
beacon buffers found in scanning directly to stack and parse
the buffer for requested BSS only during association.

Beacon buffer doesn't contain bss band information. Driver
gets it from firmware in separate tlv (chan_band_tlv).
Currently since we don't inform stack about bss bandinfo,
there is an issue with 5GHz association.

Use "priv" field of struct cfg80211_bss to store bandinfo.
This fixes 5GHz association issue.

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>
2011-09-27 14:34:03 -04:00
Amitkumar Karwar d06b7b9e1f mwifiex: fix 5GHz association issue
Sometimes association in 5GHz doesn't work. Dmesg log shows
"Can not find requested SSID xyz" error message. Currently
while preparing scan channel list for firmware Null entries
are created for disabled channels. The routine which retrieves
this list ignores channels after Null entry. Hence sometimes
driver doesn't scan the channel of requested AP and association
fails. The issue is fixed by avoiding those NULL entries.

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>
2011-09-27 14:34:02 -04:00
Rafał Miłecki 177c3732fe b43: LCN-PHY: minor clean ups
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-27 14:34:02 -04:00
Rafał Miłecki 93dbd82808 b43: update dummy transmission
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-27 14:34:02 -04:00
Rafał Miłecki 7955d87f5c b43: add missing MMIO defines
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-27 14:34:01 -04:00
Daniel Drake b4c3f34aff libertas: scan behaviour consistency improvements
When scanning for the broadcast SSID, there is no need to add the
SSID TLV (restoring the behaviour of the driver behaviour in the wext
days, confirmed in Marvell specifications).

If bssid is unspecified, the current scan code will usually fire off an
active scan probing for the specific requested SSID. However, if a scan
is ongoing (or has just finished), those scan results will be used
instead (even if that scan is totally different, e.g. a passive scan on
channel 4 for a different SSID). Fix this inconsistency by always
firing off a scan when associating without a bssid.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-27 14:34:01 -04:00
Eliad Peller 37a41b4aff mac80211: add ieee80211_vif param to tsf functions
TSF can be kept per vif.
Add ieee80211_vif param to set/get/reset_tsf, and move
the debugfs entries to the per-vif directory.

Update all the drivers that implement these callbacks.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-27 14:27:48 -04:00
Mohammed Shafi Shajakhan 129321804e ath9k: add Block ACK bitmap in sample debug
this represents the bitmap of block ACK received after the
successful transmission of an aggregate frame. also made few
changes to beautify the display

Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-27 14:27:47 -04:00
Kalle Valo 1b4304da0a ath6kl: allow firmware to override firmware patch address
In some firmware versions their patch address has changed. If the firmware
provides one, use it to override the default address.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-09-27 21:25:12 +03:00
Jouni Malinen 00b1edf169 ath6kl: fix TCP corruption
Commit 94e532d1a ("ath6kl: Fix system freeze under heavy data load")
aligns the skb data without checking if the skb is cloned. Because of
this ath6kl can corrupt the local TCP stack information that can result
in TCP retransmission failing and TCP connections stalling.

To avoid the corruption we need to copy the skb. Now the alignment
in ath6kl_htc_tx_buf_align() doesn't corrupt TCP packets anymore (and is
not even used for the cloned skb's that got copied since the alignment
of the data is handled at the copy time).

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-09-27 21:24:12 +03:00
Vasanthakumar Thiagarajan aad9339fa2 ath6kl: Remove unnecessary retrieval of first list entry in ath6kl_htc_tx_setup_scat_list()
It is unnecessary to take the first list entry from queue again for
transmission. Sometimes it may look racy when the head of the list
changes between subsequent retrival, but should not happen in
practical.

Reported-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-09-27 10:14:12 +03:00
Rajkumar Manoharan 3038fac8d8 ath6kl: Fix compilation error while compiling w/o debug
drivers/net/wireless/ath/ath6kl/htc_hif.o:
In function `ath6kl_debug_fwlog_event':
drivers/net/wireless/ath/ath6kl/debug.h:109:
multiple definition of `ath6kl_debug_fwlog_event'
drivers/net/wireless/ath/ath6kl/debug.o:
drivers/net/wireless/ath/ath6kl/debug.h:109: first defined here
drivers/net/wireless/ath/ath6kl/htc_hif.o:
In function `ath6kl_debug_cleanup':
drivers/net/wireless/ath/ath6kl/debug.h:118:
multiple definition of `ath6kl_debug_cleanup'
drivers/net/wireless/ath/ath6kl/debug.o:
drivers/net/wireless/ath/ath6kl/debug.h:118: first defined here

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-09-27 10:13:27 +03:00
Mohammed Shafi Shajakhan ba54238552 ath9k: Fix a dma warning/memory leak
proper dma_unmapping and freeing of skb's has to be done in the rx
cleanup for EDMA chipsets when the device is unloaded and this also
seems to address the following warning which shows up occasionally when
the device is unloaded

	Call Trace:
	[<c0148cd2>] warn_slowpath_common+0x72/0xa0
	[<c03b669c>] ? dma_debug_device_change+0x19c/0x200
	[<c03b669c>] ? dma_debug_device_change+0x19c/0x200
	[<c0148da3>] warn_slowpath_fmt+0x33/0x40
	[<c03b669c>] dma_debug_device_change+0x19c/0x200
	[<c0657f12>] notifier_call_chain+0x82/0xb0
	[<c0171370>] __blocking_notifier_call_chain+0x60/0x90
	[<c01713bf>] blocking_notifier_call_chain+0x1f/0x30
	[<c044f594>] __device_release_driver+0xa4/0xc0
	[<c044f647>] driver_detach+0x97/0xa0
	[<c044e65c>] bus_remove_driver+0x6c/0xe0
	[<c029af0b>] ? sysfs_addrm_finish+0x4b/0x60
	[<c0450109>] driver_unregister+0x49/0x80
	[<c0299f54>] ? sysfs_remove_file+0x14/0x20
	[<c03c3ab2>] pci_unregister_driver+0x32/0x80
	[<f92c2162>] ath_pci_exit+0x12/0x20 [ath9k]
	[<f92c8467>] ath9k_exit+0x17/0x36 [ath9k]
	[<c06523cd>] ? mutex_unlock+0xd/0x10
	[<c018e27f>] sys_delete_module+0x13f/0x200
	[<c02139bb>] ? sys_munmap+0x4b/0x60
	[<c06547c5>] ? restore_all+0xf/0xf
	[<c0657a20>] ? spurious_fault+0xe0/0xe0
	[<c01832f4>] ? trace_hardirqs_on_caller+0xf4/0x180
	[<c065b863>] sysenter_do_call+0x12/0x38
	 ---[ end trace 16e1c1521c06bcf9 ]---
	Mapped at:
	[<c03b7938>] debug_dma_map_page+0x48/0x120
	[<f92ba3e8>] ath_rx_init+0x3f8/0x4b0 [ath9k]
	[<f92b5ae4>] ath9k_init_device+0x4c4/0x7b0 [ath9k]
	[<f92c2813>] ath_pci_probe+0x263/0x330 [ath9k]

Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-26 14:55:51 -04:00
Larry Finger 831d85471e rtlwifi: rtl8192cu: Fix unitialized struct
Driver rtl8192cu assigns a new struct rtl_tcb_desc object, but fails to
clear it.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@kernel.org>  [2.6.39+]
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-26 14:55:50 -04:00
Johannes Berg 6c80c39d9a iwlagn: fix dangling scan request
If iwl_scan_initiate() fails for any reason,
priv->scan_request and priv->scan_vif are left
dangling. This can lead to a crash later when
iwl_bg_scan_completed() tries to run a pending
scan request.

In practice, this seems to be very rare due to
the STATUS_SCANNING check earlier. That check,
however, is wrong -- it should allow a scan to
be queued when a reset/roc scan is going on.
When a normal scan is already going on, a new
one can't be issued by mac80211, so that code
can be removed completely. I introduced this
bug when adding off-channel support in commit
266af4c745.

Cc: stable@kernel.org [3.0]
Reported-by: Peng Yan <peng.yan@intel.com>
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>
2011-09-26 14:55:50 -04:00
Arik Nemtsov 6b661895a1 wl12xx: report the stop_ba event to all STAs in AP-mode
Use the AP_MAX_LINKS as the upper boundary for traversing the links array,
thereby guaranteeing BA sessions with all connected STAs are stopped when
the stop_ba event is received.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-09-23 15:59:55 +03:00
Arik Nemtsov f80c2d12e5 wl12xx: correct fw_status structure for 8 sta support in AP-mode
Fix an erroneous labeling of array boundaries in the fw_status structure.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-09-23 15:59:54 +03:00
Eliad Peller af7fbb28ef wl12xx: implement set_bitrate_mask callback
Save the configured bitrate, and use the min allowed rate
as the basic rate (e.g. when scanning).

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-09-23 15:59:45 +03:00
Arik Nemtsov 68eaaf6ee5 wl12xx: AP mode - support hidden SSID
If a hidden SSID is requested, generate a probe response template
containing the real SSID.

Depends on the patch "mac80211: add ssid config to bss information
in AP-mode".

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-09-23 14:43:32 +03:00
Eliad Peller df4c849f46 wl12xx: Use dev_hlid for auth and assoc req
On roaming, the auth and assoc req are sent with the sta
hlid. This is wrong, as the sta hlid is configured according
to the old ap. Use the dev_hlid instead.

Move the wl1271_tx_update_filters() call into wl1271_tx_get_hlid(),
so wl->dev_hlid will be valid.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-09-23 14:38:51 +03:00
Eliad Peller c6930b07b3 wl12xx: send all pending packets on channel change
There is a race condition between wl1271_tx_work() and the
channel switch, so make sure all the pending packets are
being sent before switching channel.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-09-23 14:38:49 +03:00
Eliad Peller 26b4bf2e0f wl12xx: remove P2P ie from probe response
wl12xx uses a single probe response template, regardless of
the probe request.
However, the P2P spec forbids including the p2p ie in some
cases (e.g. the probe request didn't include the p2p ie).

The fw responds only to probe requests that don't
include the p2p ie, and passes up probe requests that
include them (the supplicant will answer them).

Thus, strip the p2p ie from the probe response template.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-09-23 14:38:47 +03:00
Eliad Peller d48055d9fc wl12xx: remove TIM ie from probe response
wl12xx uses the beacon as the probe response template.
However, the beacon includes a TIM ie, which shouldn't
exist in the probe response.

Delete it from the skb before configuring the probe
response template.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-09-23 14:38:47 +03:00
Shahar Levi 06b660e1a3 wl12xx: Include OFDM rates in IBSS mode
We were including only 11b rates in IBSS mode.  This patch adds OFDM
rates.

[Rephrased commit log and removed one unnecessary comment. -- Luca]

Signed-off-by: Shahar Levi <shahar_levi@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-09-23 14:21:36 +03:00
Shahar Levi d3b104ae22 wl12xx: fix sdio_test module functionality
Due to some changes in PM in recent kernels, the sdio_test module has
been broken for a while.  This patch fixes the code that powers the
card on and off.

Also made some small indentation fixes in the Makefile.

[Rephrased commit log and removed the change in the FW name, since
it's done in another patch. -- Luca]

Signed-off-by: Shahar Levi <shahar_levi@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-09-23 14:11:31 +03:00
Vasanthakumar Thiagarajan 1de547d6dc ath6kl: Fix disconnect event reporting
Driver does not report disconnect event properly when in connecting state,
this leads to issues failures in starting reconnection. Send a disconnect
command to target when a disconnect event is received with reason code
other than 3 (DISCONNECT_CMD - disconnect request from host) to make the
frimware stop trying to connect even after giving disconnect event. There
will be one more disconnect event for this disconnect command with reason
code DISCONNECT_CMD which will be notified to cfg80211.

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-09-23 10:47:14 +03:00
Kalle Valo 5694f96296 ath6kl: pass only unicast frames for aggregation
When pinging form ar6003 to the AP RTT was high even when power save was
disabled:

100 packets transmitted, 97 received, 3% packet loss, time 99125ms
rtt min/avg/max/mdev = 1.875/46.733/795.506/139.181 ms

After some investigation one reason for this was that received
multicast traffic confused the aggrecation logic and caused 400 ms
timeouts when receiving multicast frames from AP.

A simple way to fix is to pass only unicast frames for aggregation. This
improves RTT:

100 packets transmitted, 99 received, 1% packet loss, time 99144ms
rtt min/avg/max/mdev = 2.083/13.084/403.390/56.794 ms

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-09-23 10:44:11 +03:00
Luciano Coelho 6cd9d21a0c wl12xx: fix forced passive scans
We were using incorrect max and min dwell times during forced passive
scans because we were still using the active scan states to scan
(passively) the channels that were not marked as passive.

Instead of doing passive scans in active states, we now skip active
states and scan for all channels in passive states.

Cc: <stable@kernel.org> # 2.6.36+
Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-09-22 13:21:41 +03:00
Jouni Malinen 865121361f ath6kl: Report PMKSA candidate events through cfg80211
This allows RSN pre-authentication to be used when roaming decisions are
done in the target.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-09-22 10:40:40 +03:00
Vivek Natarajan 011a36e119 ath6kl: Indicate the roaming capability of the firmware
When the rssi of the current AP drops, both wpa_supplicant and the
firmware may do a background scan to find a better AP and try to
associate. This might lead to a race condition where both may try
to connect to some AP based on their scan results.

Since the firmware is capable of handling roaming, let
wpa_supplicant know about this capability so that it will back off
from bgscan based roaming.

Signed-off-by: Vivek Natarajan <nataraja@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-09-22 10:36:53 +03:00
Kalle Valo f3674ee97b Merge remote branch 'wireless-next/master' into ath6kl-next 2011-09-22 10:33:13 +03:00
David S. Miller 8decf86879 Merge branch 'master' of github.com:davem330/net
Conflicts:
	MAINTAINERS
	drivers/net/Kconfig
	drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
	drivers/net/ethernet/broadcom/tg3.c
	drivers/net/wireless/iwlwifi/iwl-pci.c
	drivers/net/wireless/iwlwifi/iwl-trans-tx-pcie.c
	drivers/net/wireless/rt2x00/rt2800usb.c
	drivers/net/wireless/wl12xx/main.c
2011-09-22 03:23:13 -04:00
Jouni Malinen 32c1087460 ath6kl: Export beacon interval and DTIM period through STA info
Now that we allow the first Beacon frame after each connection to
be processed at the host, we can figure out the DTIM period and
expose it with Beacon interval through STA info BSS parameters
to user space.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-09-22 10:08:00 +03:00
Jouni Malinen 551185ca0a ath6kl: Update BSS information after connection
Since we may end up using a dummy BSS entry when roaming, allow one Beacon
frame -based bssinfo from the current BSS to be processed prior to starting
to filter all bssinfo events. This allows cfg80211 BSS table to be filled
with proper data in the roaming case where the full Beacon data may not
have been present at the time of roamed event.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-09-22 10:07:59 +03:00
Jouni Malinen 82e14f56f7 ath6kl: Remove unnecessary bssinfo event header conversion
There is no point in unconditionally converting the bssinfo header
to the old version since only the new header is being used and the
driver can as well read the values from it when needed. Leaving out
the conversion saves some extra memory copying.

In addition, use the calculated "rssi" value snr - 95 dBm to get the
proper value in cfg80211 BSS table (i.e., something that more or less
matches with the value used in STA info).

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-09-22 10:07:59 +03:00
Jouni Malinen 457fb0415a ath6kl: Remove the unused node table implementation
Now that the scan results are reported directly to the cfg80211 BSS
table there is no need for maintaining this internal node table
implementation for scan results. Remove the definitions and node
table functions.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-09-22 10:07:59 +03:00
Jouni Malinen 1aaa8c7469 ath6kl: Replace internal node table with cfg80211 BSS table
The internal node table in ath6kl was not really used for any useful
purpose. It was just used to collect scan results during a scan and then
provide them in a burst to cfg80211 at the completion of the scan. There
is no point in doing this since cfg80211 is perfectly capable of
maintaining the BSS table and the BSS inform messages are sent in
separate function calls anyway.

This provides more complete information in the cfg80211 BSS table since
this allows Beacon and Probe Response frames to be distinguished and IEs
from them reported separately.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-09-22 10:07:59 +03:00
Jouni Malinen 3b25ed186f ath6kl: Remove unnecessary node table update on disconnect event
Since ath6kl does not actually update cfg80211 BSS table when this
event occurs, there is not much need for removing the entries from
the internal table that is not really used or exposed.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-09-22 10:07:59 +03:00
Jouni Malinen 64b834d83a ath6kl: Remove RSSI update for internal node table
ath6kl does not actually update cfg80211 BSS table when this update
occurs, so there is not much need in updating the internal table
that is not used or exposed.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-09-22 10:07:58 +03:00
Jouni Malinen f195d5076a ath6kl: Remove deprecated WMI_OPT_RX_FRAME_EVENTID processing
This event has been deprecated and there is no need for ath6kl to
include code for processing it.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-09-22 10:07:58 +03:00
Jouni Malinen 01cac476a4 ath6kl: Fix BSS update on roaming
This fixes the BSS "update" just before the connected or roamed event.
The previous implementation was completely broken: it forced a hardcoded
signal strength and IEs from Association _Request_ frame instead of any
Beacon information. This broke various things, including PMKSA caching.

The current workaround for creating a dummy BSS entry before the roamed
event is not exactly ideal, but that is quite a bit better than the
previous state. As a future improvement, cfg80211 could potentially be
extended to allow this type of use or ath6kl could delay sending the
roamed event before receiving a BSS info event.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-09-22 10:07:58 +03:00
Dan Carpenter 49753128d8 mwifiex: remove unneeded NULL check
We dereference "rate" on the lines before so the checks here are too
late to help.  This function is only called from
mwifiex_dump_station_info() and "rate" is always a non-NULL pointer
so the check can be removed.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-21 16:19:44 -04:00
Dan Carpenter aef0ba54ec mwifiex: add a kfree() to an error path
We're not likely to hit this small memory leak, but lets fix it
anyway to keep the static checkers happy.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-21 16:19:44 -04:00
Amit Beka 5adcb81037 iwlagn: remove duplicate list init
iwl_trans_rx_alloc is only called from iwl_rx_init, so no need
to init the lists twice.

Signed-off-by: Amit Beka <amit.beka@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-21 16:19:43 -04:00
Emmanuel Grumbach 08ecf10441 iwlagn: pending frames musn't be incremented if agg is on
During my works on the transport layer I removed code that updated
a local variable (is_agg) that is needed to keep the pending_frames
count up to date. Fix this.

Also, there should be no way to have a packet with TX_CTL_AMPDU set
while the internal aggregation state machine is not in AGG_ON state.
Add a WARN_ON to ensure that.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-21 16:19:43 -04:00
Emmanuel Grumbach edb5c2f38d iwlagn: remove uneeded declaration
This has been removed but the declaration hasn't.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-21 16:19:43 -04:00
Emmanuel Grumbach 132f98c2dc iwlagn: simplify the iwl_device_cmd layout
This simplifies both the transport layer and the upper layer.

Kill the union in the device command, which avoids the funny syntax
we had: cmd->cmd.payload.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-21 16:19:43 -04:00
Emmanuel Grumbach 247c61d625 iwlagn: remove the callback in host commands
Before this patch, the upper layer could register a callback for each
host command. This mechanism allowed the upper layer to have
different callbacks for the same command ID. In fact, it wasn't used
and the rx_handlers is enough: same callback for all the command with
a specific command ID.

The iwl_send_add_station needs the access the command that was sent
while handling the response (regardless if the command was sent in
SYNC or ASYNC mode). So now, all the handlers receive the host
command that was sent. This implies a change in the handler signature.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-21 16:19:42 -04:00
Johannes Berg 390808db4a iwlagn: split remain-on-channel
If we're associated and want to do P2P at the same
time, the scan for remain-on-channel is currently
limited to 80ms because of the way the device will
behave in that case. Instead of doing that, split
up the dwell times into little pieces. It will not
actually be a single big dwell time then, but will
be close enough. This improves robustness of P2P
in such scenarios.

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>
2011-09-21 16:19:42 -04:00
Johannes Berg c689290601 iwlagn: remove common station priv
Since the driver split there's no more need for
shared/non-shared private station data so remove
struct iwl_station_priv_common entirely.

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>
2011-09-21 16:19:42 -04:00
Johannes Berg 6e809a16d9 iwlagn: move scan code to scan file
Since the driver split there's no longer a need
to have the scan code scattered across multiple
files, so move it all back to iwl-scan.c

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-21 16:19:41 -04:00
Stanislaw Gruszka 65d0f19e58 iwlegacy: do not use interruptible waits
iwlegacy version of fix:

commit effd4d9aec
Author: Johannes Berg <johannes.berg@intel.com>
Date:   Thu Sep 15 11:46:52 2011 -0700

    iwlagn: do not use interruptible waits

    Since the dawn of its time, iwlwifi has used
    interruptible waits to wait for synchronous
    commands and firmware loading.

    This leads to "interesting" bugs, because it
    can't actually handle the interruptions; for
    example when a command sending is interrupted
    it will assume the command completed fully,
    and then leave it pending, which leads to all
    kinds of trouble when the command finishes
    later.

    Since there's no easy way to gracefully deal
    with interruptions, fix the driver to not use
    interruptible waits.

    This at least fixes the error
    iwlagn 0000:02:00.0: Error: Response NULL in  'REPLY_SCAN_ABORT_CMD'

    I have seen in P2P testing, but it is likely
    that there are other errors caused by this.

Cc: stable@kernel.org # 2.6.39+
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-21 15:58:24 -04:00
Stanislaw Gruszka 2e2a41d6ca iwlegacy: fix command queue timeout
iwlegacy version of fix:

commit 282cdb325a
Author: Johannes Berg <johannes.berg@intel.com>
Date:   Mon Sep 12 12:09:10 2011 -0700

    iwlagn: fix command queue timeout

    If the command queue is constantly busy,
    which can happen in P2P, the hangcheck
    timer will frequently find a command in
    it and will eventually reset the device
    because nothing sets the timestamp for
    this queue when commands are processed.

    Fix this by setting the timestamp when
    a command completes.

iwlegacy does not support P2P, but this patch fix possible
unneeded hardware resets, hence is needed.

Cc: stable@kernel.org  # 2.6.39+
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-21 15:58:23 -04:00
Rajkumar Manoharan e9f9530bb6 ath9k_hw: Fix Rx DMA stuck for AR9003 chips
During the endurance testing, rx frames are not getting DMAd from
MAC whereas pcu rx frame counters are getting updated properly.
As per systems team input updated the initval to fix rx dma stuck
issue.

Cc: stable@kernel.org
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-21 15:58:22 -04:00
Larry Finger da3ba88a99 rtlwifi: Combine instances of RTL_HAL_IS_CCK_RATE macros.
Three drivers, rtl8192ce, rtl8192cu and rtl8192de, use the same macro
to check if a particular rate is in the CCK set. This common code is
relocated to a common header file. A distinct macro used by rtl8192se
with the same name is renamed.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-20 14:43:50 -04:00
Larry Finger 87b6d09225 rtlwifi: rtl8192de: Change modinfo messages
The various modparam messages are difficult to understand.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-20 14:43:50 -04:00
Larry Finger 7664beeb2f rtlwifi: rtl8192se: Change modinfo messages
The various modparam messages are difficult to understand.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-20 14:43:50 -04:00
Larry Finger eed7231658 rtlwifi: rtl8192ce: Change modinfo messages
The various modparam messages are difficult to understand.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-20 14:43:49 -04:00
Rajkumar Manoharan f36369afce ath9k: Store noise immunity values across scanning
CCK/OFDM noise immunilty values are always reset to defaults
during bgscan. This could affect the link quality and
performance when the STA is associated in a noisy channel.
So do not override the learned values across the scanning.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-20 14:43:49 -04:00
John W. Linville 4d8b61490c Merge branch 'master' of git://git.infradead.org/users/linville/wireless
Conflicts:
	drivers/net/wireless/iwlwifi/iwl-pci.c
	drivers/net/wireless/iwlwifi/iwl-trans-pcie-tx.c
	drivers/net/wireless/rt2x00/rt2800usb.c
	drivers/net/wireless/wl12xx/main.c
2011-09-20 14:11:55 -04:00
John W. Linville eebb6fb4ae Merge branch 'master' of ssh://infradead/~/public_git/wireless into for-davem 2011-09-20 09:19:14 -04:00
Rafał Miłecki 2981808269 b43: LCN-PHY: finish sense setup
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-19 16:10:14 -04:00
Rafał Miłecki bbb5574224 b43: LCN-PHY: add more init tweaks
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-19 16:10:13 -04:00
Rafał Miłecki 1b0a69c1ff b43: LCN-PHY: init TX power control
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-19 16:10:13 -04:00
Rafał Miłecki ac78a52f49 b43: LCN-PHY: implement SPUR avoidance mode
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-19 16:10:12 -04:00
Rafał Miłecki 0c5644b98b b43: LCN-PHY: set TX filters
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-19 16:10:12 -04:00
Rafał Miłecki b534706a06 b43: LCN-PHY: tweaks for channel switching
They have been taken from brcmsmac, add Broadcom's copyright.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-19 16:10:11 -04:00
Wey-Yi Guy 143bb15de5 iwlagn: signedness bug
re-apply the unsigned shorts bug fixed by Dan Carpenter but get lost
after the file move.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-19 16:10:11 -04:00
Wey-Yi Guy 000850065c iwlagn: fix stack corruption for temperature offset v2
Same stack corruption problem as temperature offset

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-19 16:10:10 -04:00
Johannes Berg effd4d9aec iwlagn: do not use interruptible waits
Since the dawn of its time, iwlwifi has used
interruptible waits to wait for synchronous
commands and firmware loading.

This leads to "interesting" bugs, because it
can't actually handle the interruptions; for
example when a command sending is interrupted
it will assume the command completed fully,
and then leave it pending, which leads to all
kinds of trouble when the command finishes
later.

Since there's no easy way to gracefully deal
with interruptions, fix the driver to not use
interruptible waits.

This at least fixes the error
iwlagn 0000:02:00.0: Error: Response NULL in  'REPLY_SCAN_ABORT_CMD'

I have seen in P2P testing, but it is likely
that there are other errors caused by this.

Cc: Stanislaw Gruszka <sgruszka@redhat.com>
Cc: stable@kernel.org [2.6.24+]
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>
2011-09-19 16:10:10 -04:00
Wey-Yi Guy 7d8f2d50b5 iwlagn: use iwl_eeprom_calib_hdr structure
For retrieve calibration hdr related information, instead of using structure in
one place and #define in other place, unify the method to use data structure.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-19 16:10:10 -04:00
Wey-Yi Guy c6f30347a7 iwlagn: add support for v2 of temperature offset calibration
For 2000 series of NICs, version 2 of temperature offset calibration
should be used.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-19 16:10:10 -04:00
Johannes Berg 18d0077f0c iwlagn: remove drvdata support from bus layer
Since the removal of the sysfs files, it is no
longer necessary to have upper layers control
the drvdata, so let the PCI driver have it for
itself completely.

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>
2011-09-19 16:10:10 -04:00
Johannes Berg ca934b6715 iwlagn: move sysfs files to debugfs
The debug_level and temperature files should be in
debugfs, the txpower file is completely unneeded
since TX power can be set with iw/iwconfig.

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>
2011-09-19 16:10:09 -04:00
Johannes Berg fd90b3c1ba iwlagn: remove unused function declarations
iwl_suspend and iwl_resume don't exist.

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>
2011-09-19 16:10:09 -04:00
Johannes Berg cebcbd752a iwlagn: rename iwl-pci.h to iwl-cfg.h
There's nothing PCI(E) specific in this file.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-19 16:10:09 -04:00
Johannes Berg c01a404756 iwlagn: clean up PM code
The transport callbacks might as well be undefined
when CONFIG_PM_SLEEP is not set, so ifdef all of
it out and make everything available for PM_SLEEP
only.

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>
2011-09-19 16:10:09 -04:00
Johannes Berg 72afb108ad iwlagn: Makefile whitespace cleanup
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>
2011-09-19 16:08:08 -04:00
Johannes Berg 370ad313be iwlagn: generically provide iwl_trans_send_cmd_pdu
There's no need to have the transport layer have a
callback for iwl_trans_send_cmd_pdu() since it is
just a generic wrapper around iwl_trans_send_cmd().

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>
2011-09-19 16:08:07 -04:00
Johannes Berg c17d0681b8 iwlagn: move PCI-E transport files
Move all the PCI-E specific transport files to
be iwl-trans-pcie*; specifically iwl-trans.c
which is really iwl-trans-pcie.c.

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>
2011-09-19 16:08:07 -04:00
Wey-Yi Guy 701cb0997f iwlagn: merge eeprom access into single file
After driver split and no need to support legacy devices, there is no reason
we need to separate the NVM access into different files, merge those.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-19 15:58:30 -04:00
Emmanuel Grumbach 1dd9124e29 iwlagn: provide data after WARN_ON
From time to time, we hit a WARN_ON in iwl_mac_remove_interface.
This basically means that we got out of sync with mac80211: the vif
we hold differs from the vif 80211 passes as parameter. Try to get
some data that will help to debug this.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-19 15:58:29 -04:00
Don Fry 403ba56aed iwlagn: replace beacon_time_fsf_bits variable with #define
All devices use the same value for beacon_time_tsf_bits.  Use the #define

Signed-off-by: Don Fry <donald.h.fry@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-19 15:58:29 -04:00
Fry, Donald H b8c2b05e14 iwlagn: simplify chain_noise_num_beacons indirection
chain_noise_num_beacons is set and never changes.  Use the #define
rather than 3 levels of indirection.

Signed-off-by: Don Fry <donald.h.fry@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-19 15:58:29 -04:00
Fry, Donald H 5092e47afc iwlagn: fix modinfo display for 135 ucode.
The modinfo report for 135 ucode is iwlwifi-135-IWL135_UCODE_API_MAX.ucode
Change to show the value of the define:  iwlwifi-135-6.ucode

Signed-off-by: Don Fry <donald.h.fry@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-19 15:58:29 -04:00
Wey-Yi Guy ff647af656 iwlagn: New SKU for 6005 SFF
Adding another SKU for 6005 series devices.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-19 15:58:28 -04:00
Joe Perches 9845ad22fd iwlagn: Convert kzalloc to kcalloc
Convert kzalloc to kcalloc, coalesce multiple lines too.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-19 15:58:28 -04:00
Emmanuel Grumbach 21023e2696 iwlagn: add documentation to the transport layer
and do a few clean up fixes on the way

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-19 15:58:27 -04:00
Emmanuel Grumbach eeb7f8cb93 iwlagn: document the bus layer API
Add documentation to the bus layer API - iwl-bus.h

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-19 15:58:27 -04:00
Emmanuel Grumbach 14991a9d84 iwlagn: use enum iwl_rxon_context_id instead of u8
enum iwl_rxon_context_id is the right type to use when we need a
rxon_context_id.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-19 15:58:27 -04:00
Emmanuel Grumbach 859cfb0a99 iwlagn: move iwl_stop / wake_queue to the upper layer
Add a wrapper in the upper layer to call the mac80211's function.
This allows not to have the transport layer call mac80211 directly.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-19 15:58:26 -04:00
Emmanuel Grumbach 909e9b23e4 iwlagn: free the Tx cmd when a non empty Tx queue is freed
When a non-empty Tx queueis freed, the buffer it contains must be
freed too. Since the Tx cmd are now allocated from a pool, the Tx
cmd must be freed too.

This patch avoids to destroy a non-empty pool of Tx cmd.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-19 15:58:26 -04:00
Emmanuel Grumbach 39644e9ac5 iwlagn: unmap cmd queue's tfds as BIDI
If the driver is unloaded while there is still a host command in
flight, its tfd will be freed by iwl_tx_queue_free.
This function is called for both types of queues: Tx queues and cmd
queue. This didn't take in count the fact that in Tx queues, tfds are
mapped as TO_DEVICE (besides the first TB), whereas in cmd queue, all
TBs are mapped as BIDI.

Hence, tx_queue_free unmapped the second (and higher) TB of each tfd
in the cmd queue as TO_DEVICE, whereas they must be freed as BIDI.
This means that if a multi TFD is in flight while we unload the
driver (which is quite unlikely but can happen), we will get the
warning below.

This patch fixes this.

[  445.234060] ------------[ cut here ]------------
[  445.236273] WARNING: at lib/dma-debug.c:861 check_unmap+0x337/0x780()
[  445.236654] iwlagn 0000:02:00.0: DMA-API: device driver frees DMA memory with different direction [device address=0x0000000126950540] [size=8 bytes] [mapped with DMA_BIDIRECTIONAL] [unmapped with DMA_TO_DEVICE]
[  445.236654] Modules linked in: ...
[  445.236654] Pid: 1415, comm: modprobe Not tainted 3.1.0-rc4-wl-65912-g5215ff1-dirty #79
[  445.236654] Call Trace:
[  445.236654]  [<ffffffff81043a51>] warn_slowpath_common+0x71/0xa0
[  445.236654]  [<ffffffff81043b37>] warn_slowpath_fmt+0x47/0x50
[  445.236654]  [<ffffffff8121e687>] check_unmap+0x337/0x780
[  445.236654]  [<ffffffff810e9136>] ? free_one_page+0x156/0x320
[  445.236654]  [<ffffffff8121ec5a>] debug_dma_unmap_page+0x5a/0x60
[  445.236654]  [<ffffffffa021d701>] iwlagn_unmap_tfd.isra.11+0x121/0x1c0 [iwlagn]
[  445.236654]  [<ffffffffa021ddf2>] iwlagn_txq_free_tfd+0x42/0x70 [iwlagn]
[  445.236654]  [<ffffffffa02121de>] iwl_tx_queue_unmap+0x4e/0x70 [iwlagn]
[  445.236654]  [<ffffffffa0212fad>] iwl_trans_pcie_tx_free+0x10d/0x440 [iwlagn]
[  445.236654]  [<ffffffff81064959>] ? destroy_workqueue+0xb9/0x1e0
[  445.236654]  [<ffffffffa021330a>] iwl_trans_pcie_free+0x2a/0x2c0 [iwlagn]
[  445.236654]  [<ffffffffa022f4f2>] iwl_remove+0x149/0x17e [iwlagn]
[  445.236654]  [<ffffffffa022f546>] iwl_pci_remove+0x1f/0x65 [iwlagn]
[  445.236654]  [<ffffffff81228337>] pci_device_remove+0x47/0x120
[  445.236654]  [<ffffffff8134566c>] __device_release_driver+0x7c/0xe0
[  445.236654]  [<ffffffff81345dc8>] driver_detach+0xc8/0xd0
[  445.236654]  [<ffffffff813454c8>] bus_remove_driver+0x88/0xe0
[  445.236654]  [<ffffffff81346572>] driver_unregister+0x62/0xa0
[  445.236654]  [<ffffffff812271d4>] pci_unregister_driver+0x44/0xc0
[  445.236654]  [<ffffffffa0211ce5>] iwl_pci_unregister_driver+0x15/0x20 [iwlagn]
[  445.236654]  [<ffffffffa022f595>] iwl_exit+0x9/0xa74 [iwlagn]
[  445.236654]  [<ffffffff810918f4>] sys_delete_module+0x184/0x240
[  445.236654]  [<ffffffff81452ece>] ? retint_swapgs+0xe/0x13
[  445.236654]  [<ffffffff8121098e>] ? trace_hardirqs_on_thunk+0x3a/0x3f
[  445.236654]  [<ffffffff81459e2b>] system_call_fastpath+0x16/0x1b
[  445.236654] ---[ end trace 1fbc362b7dbe5d74 ]---
[  445.236654] Mapped at:
[  445.236654]  [<ffffffff8121d7cb>] debug_dma_map_page+0x8b/0x150
[  445.236654]  [<ffffffffa021e7b7>] iwl_enqueue_hcmd+0x837/0xa40 [iwlagn]
[  445.236654]  [<ffffffffa021f92d>] iwl_trans_pcie_send_cmd+0x8d/0x580 [iwlagn]
[  445.236654]  [<ffffffffa01f7c75>] iwl_send_calib_results+0x75/0xd0 [iwlagn]
[  445.236654]  [<ffffffffa01f21f6>] iwlagn_alive_notify+0x196/0x1f0 [iwlagn]
[  445.386500] iwlagn 0000:02:00.0: PCI INT A disabled

Reported-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-19 15:58:26 -04:00
Emmanuel Grumbach 17a68dd7bc iwlagn: warn about buggy fw that doesn't set SEQ_RX_FRAME
The way we check if there is host command that should be reclaimed is
way too complicated. We should have a clear indication from the fw.
The fw is expected to set the SEQ_RX_FRAME bit if the frame was
originated by the fw which indicates to the driver that there is no
host command to free.
Somehow, there seem to have been buggy fw out there, hence the very
old comment.

This code checks if we have still buggy fw out there.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-19 15:58:26 -04:00
Rajkumar Manoharan d2c71c2078 ath9k: Reset caldata on radio enable
Not doing so, the caldata continues to retain older history
values learned on that channel. It is always safer to start
noise floor calibration from the defaults after the assoication.
So this patch resets the nf history buffer when none of the
STA vifs are associated.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-19 15:58:25 -04:00
Rajkumar Manoharan 05bfe3d2a5 ath9k: load noise floor from history after the full chip reset
Currently during the full reset, the nf calibration is always
restarted from the defaults. The noise floor history buffers are
never be used again after the scan and ath reset. This patch
ensures that nf histories are always be used that helps to
improve the signal quality on congested environment

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-19 15:58:25 -04:00
Rajkumar Manoharan e9c10469cf ath9k_hw: Fix magnitude/phase coeff correction
Do the magnitude/phase coeff correction only if the outlier
is detected. Updating wrong magnitude/phase coeff factor
impacts not only tx gain setting but also leads to poor
performance in congested networks. In the clear environment
the impact is very minimal because the outlier happens
very rarely according to the past experiment. It occured
less than once every 1000 calibrations.

Cc: stable@kernel.org
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-19 15:58:25 -04:00
Felix Fietkau 491b209d06 ath9k_hw: remove ar9100_hw_compute_pll_control
AR913x uses the same PLL register layout as AR9160 and later.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-19 15:58:25 -04:00
Felix Fietkau bf3f204b92 ath9k_hw: fix setting the hardware diversity flag
ath9k_hw_set_diversity is only called from init.c where it cannot affect
the hardware setting because it's cleared on the next reset.
Instead of using a PHY op for something that's supposed to be initialized
statically, set the register value directly in the INI override function.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-19 15:58:25 -04:00
Felix Fietkau d7084da0ce ath9k_hw: remove dead code in the eeprom ops
The eeprom .set_addac function is only necessary for AR9160, remove it
from eeprom_4k.c and remove the dummy function from eeprom_9287.c

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-19 15:58:24 -04:00
Felix Fietkau 1b8714f7dc ath9k_hw: clean up hardware revision checks
- AR_SREV_5416_20_OR_LATER is always true, remove it
- AR_SREV_9280_20_OR_LATER is always true within eeprom_4k.c and eeprom_9287.c
- (AR_SREV_9271 || AR_SREV_9285) is always true in eeprom_4k.c

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-19 15:58:24 -04:00
Felix Fietkau f11cc949fd ath9k: sync the dma buffer after changing the retry flag
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-19 15:49:11 -04:00
Felix Fietkau 6e82bc4a5b ath9k: fix setting the IEEE80211_TX_CTL_CLEAR_PS_FILT flag
When the driver inserts padding between the 802.11 header and data, it
needs to set the hdr variable to the new header location.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-19 15:49:11 -04:00
John W. Linville 42cecc3465 Revert "ath9k: do not insert padding into tx buffers on AR9380+"
This reverts commit 4245d31347.
2011-09-19 15:42:31 -04:00
John W. Linville 376cf5d3fd Merge branch 'for-linville' of git://github.com/lucacoelho/wl12xx 2011-09-19 15:42:21 -04:00
John W. Linville b53d63ecce Merge branch 'master' of ssh://infradead/~/public_git/wireless-next into for-davem 2011-09-19 15:00:16 -04:00
Manual Munz 8c23516fbb b43: Fix beacon problem in ad-hoc mode
In ad-hoc mode, driver b43 does not issue beacons.

Signed-off-by: Manual Munz <freifunk@somakoma.de>
Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@kernel.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-19 14:51:51 -04:00
Vivek Natarajan 9df337a104 ath6kl: deinitialise wiphy on error
This fixes the following panic observed on card removal.

BUG: unable to handle kernel paging request at f86e22ac
EIP is at wiphy_update_regulatory+0x252/0x590 [cfg80211]
Call Trace:
 [<f92fb9e5>] set_regdom+0x165/0x600 [cfg80211]
 [<c02057ba>] ? __kmalloc+0x10a/0x190
 [<c0366557>] ? nla_parse+0xb7/0xd0
 [<f9300b92>] ? T.1400+0x12/0x20 [cfg80211]
 [<f9300c84>] nl80211_set_reg+0xe4/0x270 [cfg80211]
 [<f92fe560>] ? nl80211_pre_doit+0x0/0x160 [cfg80211]
 [<c050bdeb>] genl_rcv_msg+0x23b/0x280
 [<c050bbb0>] ? genl_rcv_msg+0x0/0x280
 [<c050ab76>] netlink_rcv_skb+0x86/0xb0
 [<c050bb80>] ? genl_rcv+0x0/0x30
 [<c050bb9c>] genl_rcv+0x1c/0x30

Signed-off-by: Vivek Natarajan <nataraja@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-09-19 10:01:55 +03:00
Jouni Malinen 151411e88f ath6kl: Fix static WEP configuration in AP mode
Configuration of the WEP keys needs to be delayed until the AP mode has
been properly started at the target. Partial support for delaying the
WEP key configuration was already in place in the driver, but the actual
part of deciding when to do this was missing.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-09-19 09:57:22 +03:00
Felix Fietkau 4245d31347 ath9k: do not insert padding into tx buffers on AR9380+
With the new EDMA descriptor format, a single descriptor can contain up
to four buffer pointers. By splitting the buffer into two parts, we can
let the hardware add the padding internally instead of using memmove on
the skb data.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-16 16:45:42 -04:00
Felix Fietkau 3afd21e7c5 ath9k: optimize ath_tx_rc_status usage
The only flag that needs to be set when ath_tx_rc_status is called with
rc_update == false is the IEEE80211_TX_STAT_TX_FILTERED flag. All other
data is ignored in that case.
This flag can be set from ath_tx_complete_buf instead, so that we can
drop a few redundant calls to ath_tx_rc_status and remove the rc_update
function parameter

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-16 16:45:41 -04:00
Felix Fietkau bdf2dbfb08 ath9k: remove a redundant check in ath_tx_form_aggr
ath_lookup_legacy now checks all the tx rate flags for MCS vs legacy

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-16 16:45:41 -04:00
Felix Fietkau c6c539f023 ath9k: optimize ath9k_ps_restore
ath_hw_cycle_counters_update only needs to be called if the power state
changes. Most of the time this does not happen, even when ps_usecount
goes down to 0.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-16 16:45:41 -04:00
Felix Fietkau 66ac69c8c3 ath9k_hw: remove the old tx descriptor API
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-16 16:45:40 -04:00
Felix Fietkau 493cf04fd3 ath9k: use the new API for setting tx descriptors
With the new API, tx descriptors can be written in one single pass
instead of having to re-read and rewrite fields from multiple places.
This makes the code easier to read and also slightly improves performance
on embedded MIPS hardware.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-16 16:45:40 -04:00
Felix Fietkau 2b63a41d14 ath9k_hw: add a new API for setting tx descriptors
Instead of using lots of different functions with long argument lists,
pull all the necessary information from one struct. This makes the code
easier to read and eliminates the need for copying data between multiple
linked descriptors.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-16 16:45:39 -04:00
Felix Fietkau 60f8cc60fa ath9k_hw: do not recalculate the descriptor checksum in ar9003_hw_fill_txdesc
Reduces the number of accesses to uncached descriptor memory.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-16 16:45:39 -04:00
Felix Fietkau 7a2721a323 ath9k: call ath9k_hw_set_desc_link for beacon descriptors
This ensures that only ath9k_hw_set_desc_link needs to recalculate the tx
descriptor checksum on AR9380+

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-16 16:45:38 -04:00
Felix Fietkau 38dad7ba60 ath9k: move ath_buf_set_rate to remove a forward declaration
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-16 16:45:37 -04:00
Felix Fietkau 399c64895d ath9k: reduce the number of functions that access the tx descriptor
Makes it easier to clean up the ath9k_hw descriptor API

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-16 16:45:37 -04:00
Felix Fietkau 55797b1ae5 ath9k: remove ATH_TX_XRETRY and BUF_XRETRY flags
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-16 16:45:37 -04:00
Felix Fietkau 3483288caf ath9k: ensure that rx is not enabled during a reset
During a reset, rx buffers are flushed after rx has been disabled. To avoid
race conditions, rx needs to stay disabled during the reset, so avoid any
calls to ath9k_hw_rxena in that case.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-16 16:45:37 -04:00
Felix Fietkau c31c8261bf ath9k: make beacon timer initialization more reliable
When starting the AP beacon timer, it assumes that the TSF has recently
been cleared. Set the SC_OP_TSF_RESET flag to ensure that this is always
the case.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-16 16:45:36 -04:00
Felix Fietkau e392700741 ath9k: fix enabling interrupts after a hardware error interrupt
The interrupt handler increases the interrupt disable refcount, so the
tasklet needs to always call ath9k_hw_enable_interrupts.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-16 16:45:36 -04:00
Mohammed Shafi Shajakhan c5d2593bad ath9k: Fix PS wrappers and enabling LED
in ath_pci_resume it seems we are not enabling LED properly, in addition
we have a PS wrapper fix for this

Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-16 16:45:35 -04:00
Mohammed Shafi Shajakhan 79ac9b3033 ath9k: enable LED pin for AR946/8x chipsets
now the LED starts working for AR946/8x chipsets

Cc: "Balasubramanian, senthilkumar" <senthilb@qca.qualcomm.com>
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-16 16:45:35 -04:00
Rajkumar Manoharan 7db062ac4b ath9k_hw: Do full chip reset on 11A channels for AR9003
AR9003 seems to have issues sometimes with fast channel change
in 5GHz and this case is handled specifically for AR9280 by doing
a full reset. Let's do a full reset for 5GHz channles of AR9380
& for all channels of AR9280 pci chips.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-16 16:45:34 -04:00
Senthil Balasubramanian b54af8af49 ath9k_hw: move register definitions to header files
Move the register macros to appropriate header files to be in
sync with other register definitions and also a single place
to refer everything.

Signed-off-by: Senthil Balasubramanian <senthilb@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-16 16:45:34 -04:00
Senthil Balasubramanian 2577c6e8f2 ath9k_hw: Add support for AR946/8x chipsets.
This patch adds support for AR946/8x chipets.

Signed-off-by: Senthil Balasubramanian <senthilb@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-16 16:45:33 -04:00
Senthil Balasubramanian 4d0707e66d ath9k_hw: Split tx/rx gain table initval handling
Split tx/rx gain table initval hanlding part so readability
is better and easy to manage the code.

Signed-off-by: Senthil Balasubramanian <senthilb@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-16 16:45:32 -04:00
Senthil Balasubramanian ce407afc10 ath9k_hw: Add initvals and register definitions for AR946/8x chipsets.
Add initvals and register modifications required to support AR946/8x chipsets.

Signed-off-by: Senthil Balasubramanian <senthilb@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-16 16:45:32 -04:00
John W. Linville bd1a272806 Merge branch 'for-linville' of git://github.com/lucacoelho/wl12xx 2011-09-16 16:20:43 -04:00
Don Fry 2249b01143 iwlagn: workaround bug crashing some APs
This patch reverts commit 9b76883284 which
was introduced in 2.6.38-rc1.  It works around a problem where the iwlagn
driver stimulates a bug crashing (requiring power cycle to recover) some
APs under heavy traffic.

CC: stable@kernel.org #2.6.39, #3.0.0 #3.1.0
Signed-off-by: Don Fry <donald.h.fry@intel.com>
SIgned-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-16 15:32:12 -04:00
Larry Finger daabead1c3 rtl2800usb: Fix incorrect storage of MAC address on big-endian platforms
The eeprom data is stored in little-endian order in the rt2x00 library.
As it was converted to cpu order in the read routines, the data need to
be converted to LE on a big-endian platform.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@kernel.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-16 15:32:10 -04:00
Larry Finger d331eb51e4 rt2800pci: Fix compiler error on PowerPC
Using gcc 4.4.5 on a Powerbook G4 with a PPC cpu, a complicated
if statement results in incorrect flow, whereas the equivalent switch
statement works correctly.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: stable <stable@kernel.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-16 15:32:09 -04:00
Stanislaw Gruszka 7cabafcea7 ipw2x00: fix rtnl mutex deadlock
This fix regression introduced by:

commit: ecb4433550
Author: Stanislaw Gruszka <sgruszka@redhat.com>
Date:   Fri Aug 12 14:00:59 2011 +0200

    mac80211: fix suspend/resume races with unregister hw

Above commit add rtnl_lock() into wiphy_register(), what cause deadlock
when initializing ipw2x00 driver, which itself call wiphy_register()
from register_netdev() internal callback with rtnl mutex taken.

To fix move wiphy_register() outside register_netdev(). This solution
have side effect of not creating /sys/class/net/wlanX/phy80211 link,
but that's a minor issue we can live with.

Bisected-by: Witold Baryluk <baryluk@smp.if.uj.edu.pl>
Bisected-by: Michael Witten <mfwitten@gmail.com>
Tested-by: Witold Baryluk <baryluk@smp.if.uj.edu.pl>
Tested-by: Michael Witten <mfwitten@gmail.com>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-16 15:32:09 -04:00
Vasanthakumar Thiagarajan 170826dd0d ath6kl: Set the sme_state to disconnected in disconnect() callback
After a successful completion of disconnect() driver needs to set
it's sme_state to SME_DISCONNECTED to be in sync with cfg80211
state.

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-09-16 18:49:26 +03:00
Vasanthakumar Thiagarajan ac59a2b285 ath6kl: Remove auth type fall back in auto authentication mode
Target already tries with different authentication mechanism
when authentication type is configured to NL80211_AUTHTYPE_AUTOMATIC.
Remove this piece of code from driver. Having this code in driver
even affects auto + WEP authentication in some cases.

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-09-16 18:49:26 +03:00
Kalle Valo 97e0496d05 ath6kl: add firmware capabilities support
The new firmware format includes capability bits which make it
possible to check what features the firmware supports. Add infrastructure
to read the capabilities. For now it only provides
ATH6KL_FW_CAPABILITY_HOST_P2P which is not even used anywhere yet, but that
will be added later.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-09-16 18:48:34 +03:00
Kalle Valo 8a13748034 ath6kl: read reserved ram size from firmware file
A new version of firmware needs different reserved ram size so read that
from the firmware image.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-09-16 18:48:34 +03:00
Kalle Valo 639d0b8996 ath6kl: read firmware start address from hardware
It's actually possible to read the firmware start address from hardware,
that way there's no need to hardcode the address in hardware.

Thanks to Chilam Ng for the idea.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-09-16 18:48:34 +03:00
Kalle Valo 991b27eaf9 ath6kl: refactor firmware ext data addr and reserved ram handling size
Less if clauses this way and again easier to override the values.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-09-16 18:48:34 +03:00
Kalle Valo a01ac4144e ath6kl: refactor firmware load address code
Currently the load address was calculated everytime when it was needed,
and with a mess if clauses. Simplify this by adding a field to struct
ath6kl for each address and choose the address with simple switch
statements.

Also move the code just after target version is retrieved. That way it's
easier to override the values later in the boot process.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-09-16 18:48:34 +03:00
Kalle Valo 50d412346e ath6kl: add support for firmware API 2 format
In the new format all the format images are embedded into one file.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-09-16 18:48:34 +03:00
Kalle Valo cfc301edfb ath6kl: fix busy loop in ath6kl_bmi_get_rx_lkahd()
Brent reported that ath6kl busy loops if firmware doesn't boot for some
reason (in this case he was using an older firmware which wasn't supported
by ath6kl).

Investigation revealed that this was even on purpose,
ath6kl_bmi_get_rx_lkahd() had a parameter to disable the timeout check,
which is extremely evil. I didn't find any reason why the timeout needs
to be disabled so I just removed the feature. The function already busyloops
a maximum of one second if it doesn't get an answer, even that's too long.
If something takes longer than that a more friendly approach is needed.

Reported-by: Brent Taylor <btaylor1@motorolasolutions.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-09-16 18:48:34 +03:00
Kalle Valo 772c31ee43 ath6kl: separate firmware fetch from upload
In preparation for the new firmware image format.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-09-16 18:48:34 +03:00
Sam Leffler 92ecbff48e ath6kl: query device tree for firmware board-id
When no default board data file is present query the device tree for a
board-id setting to identify the board data to use.  If the FDT lacks the
necesary info fall back to the previous behaviour of using a compile-time
board filename.

Signed-off-by: Sam Leffler <sleffler@chromium.org>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-09-16 18:48:34 +03:00
John W. Linville 8ea9ac0a47 Merge branch 'master' of git://git.infradead.org/users/linville/wireless into for-davem 2011-09-15 15:37:02 -04:00
Jiri Kosina e060c38434 Merge branch 'master' into for-next
Fast-forward merge with Linus to be able to merge patches
based on more recent version of the tree.
2011-09-15 15:08:18 +02:00
Kartik Mohta 77cd769378 libertas_tf: deb_defs.h: Fix typo in include guard
Signed-off-by: Kartik Mohta <kartikmohta@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-09-15 14:34:14 +02:00
Justin P. Mattock f1ee39ff69 ipw2x00: comment typo fix encryptiong to encryption
The below patch fixes a typo.

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-09-15 14:20:31 +02:00
Vitaliy Ivanov fb914ebff5 treewide: typo 'interrrupt' word corrections.
Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Vitaliy Ivanov <vitalivanov@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-09-15 14:13:02 +02:00
Andres Salomon 55768fa6d9 libertas: prioritize usb8388_olpc.bin firmware on OLPC machines
Normally, the v9 firmware will be loaded if it's available.  However, on
OLPC XO-1 machines, the olpc-specific firmware supports extra functionality.
This makes the libertas driver attempt to load the custom firmware first
if the machine is an OLPC machine; if that fails (or it's not an OLPC
machine), fall back to attempting to load the other firmwares.

usb8388_olpc.bin is currently found in the linux-firmware repository.

Signed-off-by: Andres Salomon <dilinger@queued.net>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-14 13:57:00 -04:00
Helmut Schaa d7d259d3a5 rt2x00: Use the available helper functions to initialize the WCID table
Use rt2800_config_wcid and rt2800_delete_wcid_attr to initialize the
WCID table instead of writing to the registers directly.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-14 13:56:58 -04:00
Helmut Schaa af35323db6 rt2x00: Forbid aggregation for STAs not programmed into the hw
If a STA is not known by the hw (i.e. has no WCID assigned) don't allow
aggregation since this might mess up tx status reports and we won't be
able to distinguish the reports of multiple WCID-less STAs.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-14 13:56:57 -04:00
Helmut Schaa a2b1328a23 rt2x00: Make use of sta_add/remove callbacks in rt2800
This allows us to assign a WCID to each STA even for STAs without
crypto key.

To achieve this search for an unused WCID in the HW WCID table and
assign it to the according STA. When configuring a pairwise key for this
STA we don't need to write the MAC address and BSSIDX anymore but just
update the crypto related fields in the WCID_ATTR table.

This has two advantages:

1) Setting a new key for an already available STA (PTK rekeying) is
slightly less expensive and should improve performance in situations
where a lot of rekeying happens (e.g. a huge number of stations and/or
a small rekeying interval)

2) The TXWI now gets a WCID assigned for unencrypted frames which will
be reflected in the corresponding tx status report. This should make tx
status reports in unencrypted AP mode more reliable as we can
distinguish between multiple key-less STAs.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-14 13:56:56 -04:00
Helmut Schaa ead2bb64a3 rt2x00: Add WCID to HT TX descriptor
When sending an unencrypted frame to a STA the driver might want to pass
a suitable WCID since we don't have a key index to allow tx status
reports to get properly assigned to the correct STA.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-14 13:56:56 -04:00
Helmut Schaa f03fcfc110 rt2x00: Add WCID to crypto struct
When a WCID was already assigned to a STA the key configuration
functions need to use the same WCID for configuring the keys. Hence, add
the WCID to the crypo configuration structure.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-14 13:56:55 -04:00
Helmut Schaa b4943d8113 rt2x00: Introduce sta_add/remove callbacks
This implements a basic sta_add and sta_remove callback. Introduce a new
structure rt2x00_sta and ask mac80211 to allocate it as private part of
its ieee80211_sta. rt2x00_sta only contains the WCID for now.

The sta_add callback allows the driver to assign a WCID to a station
that is currently being added. The same wcid is also passed to the
sta_remove callback one mac80211 removes this STA.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-14 13:56:54 -04:00
Helmut Schaa 183255235a rt2x00: Move bssidx calculation into its own function
This will be used by a later patch. No functional changes.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-14 13:56:53 -04:00
Helmut Schaa 3de3d96600 rt2x00: Avoid unnecessary uncached
Reading the TX desciptor words from coherent memory is always uncached
and potentially slow. Hence, don't read the TX descriptor prior to
writing it since we update all fields anyway.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-14 13:56:48 -04:00
Helmut Schaa 5dada06cf1 rt2x00: Update some TX descriptor
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-14 13:56:47 -04:00
Helmut Schaa 550245b56c rt2x00: Remove incorrect led blink
rt2800 devices are not capable of configuring arbitrary LED on/off
periods. The LED_CFG register fields ON_PERIOD and OFF_PERIOD are only
used by the hw when the LED mode is set to "blink upon TX".

Hence, remove the blink callback. This will result in software emulation
for LED blinking.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-14 13:56:46 -04:00
Helmut Schaa 0f287b74a9 rt2x00: Add LED_CFG register description
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-14 13:56:45 -04:00
Helmut Schaa 31937c423e rt2x00: Minor optimizazion in txdone path
We can save an indirect function call + some instructions for fetching
the actual function pointer by passing the driver specific txwi pointer
directly from rt2800pci/rt2800usb to rt2800lib instead of using the
rt2800_drv_get_txwi callback.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-14 13:56:44 -04:00
Emmanuel Grumbach ff62084911 iwlagn: fix compilation when debug flags is unset
Trivial fixes to allow compilation without warnings when debug
compilation flag isn't set.
Also fix the compilation when debugfs flag isn't set.
Fix a warning: unused priv pointer on the way.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-14 13:56:42 -04:00
Wey-Yi Guy 1ad625ce74 iwlagn: remove lines from the wrong place
Few lines for program bt_ch_announce being place in the wrong place. Remove those.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-14 13:56:41 -04:00
Wey-Yi Guy ec8f734f1b iwlagn: enable 11n support for "_d" sku
"_d" SKU is 11n enabled device

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-14 13:56:41 -04:00
Wey-Yi Guy 05f8a09fae iwlagn: disply queue read/write pointer when stuck
When driver detect queue stuck, display current read/write pointer before
perform frimware reload.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-14 13:56:40 -04:00
Emmanuel Grumbach 7a10e3e407 iwlagn: iwl-trans.c can't dereference iwl_priv any more
This reaches encapsulation for this file. In order to reach this:
 * move priv->valid_context to iwl_shared
 * move the last_rejected initialization to the upper layer
 * define a wrapper iwl_nic_config in the upper layer that calls to
   cfg->lib->ops->nic_config

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-14 13:56:39 -04:00
Emmanuel Grumbach 41f5e0475c iwlagn: move traffic_log back to upper layer
The traffic log debugfs handlers were mistakenly moved to the
transport layer because they print the pointers of the Tx / Rx
queues. The pointers of the queues can be fetched by another debugfs
handler.
So bring the traffic log back to the upper layer and remove the part
that reads the Tx / Rx queues' pointers.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-14 13:56:38 -04:00
Emmanuel Grumbach 522376d206 iwlagn: clean up of transport layer
Move a few declarations needed by the transport layer to iwl-shared.h
Move iwl_cmd_meta, iwl_tx_queue and friends to the internal transport
header file.
Move iwl_device_cmd iwl_host_cmd and friends to iwl-trans.h since
these structs are used in the API to the transport layer.
Move get_cmd_string to the upper layer with a declaration in
iwl-shared.h.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-14 13:56:37 -04:00