Commit Graph

249437 Commits (b3c2ce131c7cd8c53b72b0cc04241cde17ce0c1d)

Author SHA1 Message Date
Emmanuel Grumbach b3c2ce131c iwlagn: add tx start API to transport layer
tx start will start the tx queues: basically configure the SCD
Remove the IWLAGN prefix to SCD defines on the way.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.guy@intel.com>
2011-07-16 07:39:42 -07:00
Emmanuel Grumbach 1a361cd838 iwlagn: move all the ICT related functions to iwl-trans-rx-pcie.c
Since the ICT is transport related, move all its functions to the transport
layer.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-16 07:39:34 -07:00
Emmanuel Grumbach ab6cf8e816 iwlagn: move iwlagn_stop_device to transport layer
Since iwlagn_stop_device was the only caller to the rx_stop / tx_stop,
these two don't need to be API any more.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.guy@intel.com>
2011-07-16 07:39:28 -07:00
Emmanuel Grumbach 253a634ccd iwlagn: move tx transport functions to iwl-trans-tx-pcie.c
There are still a few functions here and there that should be
put in the transport layer. Mainly the functions that are related to the reclaim flow.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-16 07:38:59 -07:00
Emmanuel Grumbach ab697a9f1e iwlagn: move rx transport functions to iwl-trans-rx-pcie.c
Also create a new file: iwl-trans-int-pcie.h which will include
the non static functions that are shared among the current pcie transport layer.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-16 07:38:46 -07:00
Fry, Donald H 4caab328ee iwlagn: remove indirection for iwlagn_hw_valid_rtc_data_addr
Not needed since the driver split.

Signed-off-by: Don Fry <donald.h.fry@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-16 07:38:36 -07:00
Wey-Yi Guy 45d50024a7 iwlagn: calibration bitmap
Define bitmap for calibration

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-16 07:38:25 -07:00
Hsu, Kenny 6ff88a6414 iwlagn: set default of uCode ownership to driver
The driver should take the ownership of the uCode as default setting
for later operations after interface up.

Signed-off-by: Kenny Hsu <kenny.hsu@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-16 07:38:18 -07:00
Johannes Berg 2c2def10d0 iwlagn: simplify TX flags assignments
The first assignment of TX_CMD_FLG_SEQ_CTL_MSK for
ack-expected mgmt frames is overwritten later in
the function, so it's useless. Also, probe response
frames, BACK request and others there are mutually
exclusive so can be moved into an else branch.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-16 07:38:09 -07:00
Emmanuel Grumbach 47365ab858 iwlagn: add comment to tx and get_tx_cmd in iwl_trans_ops
Those comments were missed in a previous commit.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-16 07:37:58 -07:00
Wey-Yi Guy 7ed9af7168 iwlagn: comments for iwl_cfg
Modify the comments for iwl_cfg, no functional changes

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-16 07:37:42 -07:00
Wey-Yi Guy e4305fe91f iwlagn: another double indirect removed
Another clean up work after driver split

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-16 07:37:35 -07:00
Wey-Yi Guy 90c300cbd8 iwlagn: remove dual-indirect call to simply the code
After driver split, no need to make the code so complex

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-16 07:37:28 -07:00
Wey-Yi Guy e505c433d3 iwlagn: remove un-necessary file
Most of the functions in iwl-agn-hcmd are move to other files, no point to
keep the file anymore.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-16 07:37:21 -07:00
Emmanuel Grumbach 1ab9f6c11b iwlagn: move the Rx dispatching to the upper layer
The upper layer receives a pointer to an iwl_rx_mem_buffer. I would prefer the
upper layer to receive a pointer to an iwl_rx_packet, but this is impossible
since the Rx path needs to add the address of the page to the skb.
I may find a solution later.

All the pre_rx_handler and notification code has been moved to the upper layer.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-16 07:37:06 -07:00
Emmanuel Grumbach a27367d25d iwlagn: move sync_irq to transport layer
Since all the irq / tasklet is now handled in the transport layer, it should
give an API to ensure that all the irq / tasklet have finished running. This
will allow the upper layer to release all its resources.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-16 07:36:56 -07:00
Emmanuel Grumbach 34c1b7ba12 iwlagn: move the tasklet / irq to the transport layer
PCIe doesn't provide any ISR registration API, whereas other buses do.
Hence, we need to move the tasklet and irq to the transport layer to allow this
flexibility.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-16 07:36:49 -07:00
Emmanuel Grumbach 47c1b49601 iwlagn: move Tx datapath to transport layer
Split the Tx datapath in two parts:
* the first deals with the Tx cmd composition
* the second attaches the skb + Tx cmd to the queues

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-16 07:36:36 -07:00
Johannes Berg 94f9b97be5 mac80211: be more careful in suspend/resume
When suspending with all netdevs down, the device
is stopped but we still call a number of driver
callbacks that the driver might not expect. The
same happens during resume, we might call a few
callbacks without starting the driver. Fix this
by checking open_count around more things and
exiting quickly if it is 0.

Also, while at this I noticed that the coverage
class isn't reprogrammed after resume, so add
that.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-15 13:39:42 -04:00
Pavel Roskin 3f29c52218 carl9170: fix formatting issues found by checkpatch
Signed-off-by: Pavel Roskin <proski@gnu.org>
Acked-By: christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-15 13:38:34 -04:00
Bing Zhao fcad584d12 MAINTAINERS: add entry for Marvell mwifiex wireless driver
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-15 13:38:33 -04:00
Johannes Berg f850e00fcd mac80211: let key iteration get keys in install order
ieee80211_iter_keys() currently returns keys in
the backward order they were installed in, which
is a bit confusing. Add them to the tail of the
key list to make sure iterations go in the same
order that keys were originally installed in.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-15 13:38:33 -04:00
Johannes Berg 8bca5d8153 mac80211: allow driver access to TKIP RX P1K
When the driver wants to pre-program the TKIP
RX phase 1 key, it needs to be able to obtain
it for the peer's TA. Add API to allow it to
generate it.

The generation uses a dummy on-stack context
since it doesn't know the RX queue.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-15 13:38:32 -04:00
Felix Fietkau 66760eac00 ath9k: improve reliability of MIC error detection
For unicast the hardware sometimes reports MIC errors even though the
frame that it received actually contains a valid MIC - on some chips this
can happen frequently enough to trigger TKIP countermeasures.
Fix this issue by not reporting MIC errors for unicast frames with a
valid key, letting mac80211 validate the MIC instead.

Additionally, strip the MIC for all frames that the hardware considers
valid to avoid wasting CPU cycles re-validating it.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-15 13:38:32 -04:00
Pavel Roskin 933d594313 orinoco: minor fixes for problems found by checkpatch.pl
Eliminate spaces before tabs.  Eliminate typedefs.  Add spaces around
operators.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-15 13:38:31 -04:00
Yogesh Ashok Powar 16c929df08 mwl8k: Fixing sta dereference when ieee80211_tx_info->control.sta is NULL
Following oops was seen on SMP machine

>BUG: unable to handle kernel NULL pointer dereference at 00000012
>IP: [<f8c56691>] mwl8k_tx+0x20e/0x561 [mwl8k]
>*pde = 00000000
>Oops: 0000 [#1] SMP
>Modules linked in: mwl8k mac80211 cfg80211 [last unloaded: cfg80211]

As ieee80211_tx_info->control.sta may be NULL during ->tx call, avoiding sta
dereference in such scenario with the following patch.

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-15 13:38:30 -04:00
Luciano Coelho 5a865bad44 nl80211/cfg80211: add max_sched_scan_ie_len in the hw description
Some chips may support different lengths of user-supplied IEs with a
single scheduled scan command than with a single normal scan command.

To support this, this patch creates a separate hardware description
element that describes the maximum size of user-supplied information
element data supported in scheduled scans.

Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-15 13:38:30 -04:00
Luciano Coelho 93b6aa693a nl80211/cfg80211: add max_sched_scan_ssids in the hw description
Some chips can scan more SSIDs with a single scheduled scan command
than with a single normal scan command (eg. wl12xx chips).

To support this, this patch creates a separate hardware description
element that describes the amount of SSIDs supported in scheduled
scans.

Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-15 13:38:29 -04:00
Johannes Berg 77dbbb1389 nl80211: advertise GTK rekey support, new triggers
Since we now have the necessary API in place to support
GTK rekeying, applications will need to know whether it
is supported by a device. Add a pseudo-trigger that is
used only to advertise that capability. Also, add some
new triggers that match what iwlagn devices can do.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-15 13:38:28 -04:00
Johannes Berg 95acac61ba mac80211: allow driver to disconnect after resume
In WoWLAN, devices may use crypto keys for TX/RX
and could also implement GTK rekeying. If the
driver isn't able to retrieve replay counters and
similar information from the device upon resume,
or if the device isn't responsive due to platform
issues, it isn't safe to keep the connection up
as GTK rekey messages from during the sleep time
could be replayed against it.

The only protection against that is disconnecting
from the AP. Modifying mac80211 to do that while
it is resuming would be very complex and invasive
in the case that the driver requires a reconfig,
so do it after it has resumed completely. In that
case, however, packets might be replayed since it
can then only happen after TX/RX are up again, so
mark keys for interfaces that need to disconnect
as "tainted" and drop all packets that are sent
or received with those keys.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-13 14:49:43 -04:00
Mohammed Shafi Shajakhan 2fcf282471 mac80211: remove a redundant check
is_valid_ether_addr itself checks for is_zero_ether_addr

Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-13 14:49:42 -04:00
Yogesh Ashok Powar 5d82c53a38 mwifiex: add cfg80211 handler for set_bitrate_mask
Currently, setting only legacy bitrates on 2.4GHz band
are supported. Mode 802.11b/g/bg is enabled based on
bitrates selection. If only CCK bitrates selected then
802.11b mode is enabled. If only OFDM bitrates are
selected then 802.11g mode is enabled. For both: CCK
and OFDM rates 802.11bg mixed mode is enabled.

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-07-13 14:49:42 -04:00
Felix Fietkau 4e868796bb ath5k: do not call ieee80211_stop_queue for queues not managed by mac80211
Instead of using ieee80211_stop_queue, check the configured tx queue
limit before calling ieee80211_get_buffered_bc.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-13 14:49:41 -04:00
Felix Fietkau 6340211c5f ath5k: disable 32KHz sleep clock operation by default
While 32 KHz sleep clock might provide some power saving benefits,
it is also a major source of stability issues, on OpenWrt it produced
some reproducible data bus errors on register accesses on several
different MIPS platforms.

All the Atheros drivers that I can find do not enable this feature,
so it makes sense to leave it disabled in ath5k as well.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-13 14:49:40 -04:00
Felix Fietkau f00643888c ath5k: fix reference clock usec duration setting restore
enabling the sleep clock alters the AR5K_USEC_32 field, but disabling
it didn't restore it.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-13 14:49:40 -04:00
Felix Fietkau fe00deb3e4 ath5k: delay full calibration after reset
During scans the full calibration usually does not make much sense,
PAPD probing and IQ calibration should be deferred until there is
enough time to complete them. Adding 100 ms to the initial full
calibration delay should be enough to do this.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-13 14:49:39 -04:00
Felix Fietkau 26d16d23e6 ath5k: initialize common->clockrate
Fixes a division by zero when setting distance before activating the
device for the first time.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-13 14:49:38 -04:00
Felix Fietkau 2d2cf471d5 ath5k: fix reference clock frequency for spur mitigation on AR2413
AR2413 uses the same reference clock as AR5413

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-13 14:49:37 -04:00
Felix Fietkau ca8bfd94bb ath5k: apply the synth voltage tweak only on AR5112 rev 2
Might fix some stability issues on newer chips

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-13 14:49:37 -04:00
Felix Fietkau b613c7262d ath5k: add missing checks for rfgain probe
rfgain probe is only necessary for OFDM operation on AR5111 and AR5112.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-13 14:49:36 -04:00
Senthil Balasubramanian 0472ade031 ath9k_hw: Fix incorrect key_miss handling
Decryping frames on key_miss handling shouldn't be done for Michael
MIC failed frames as h/w would have already decrypted such frames
successfully anyway.

Also leaving CRC and PHY error(where the frame is going to be dropped
anyway), we are left to prcoess Decrypt error for which s/w decrypt is
selected anway and so having key_miss as a separate check doesn't serve
anything. So making key_miss handling mutually exlusive with other RX
status handling makes much more sense.

This patch addresses an issue with STA not reporting MIC failure events
resulting in STA being disconnected immediately.

Cc: stable@kernel.org
Signed-off-by: Senthil Balasubramanian <senthilb@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-13 14:49:35 -04:00
Joe Perches 2a897d41a3 iwlagn: Add missing comma between constant string array
Multiple quoted strings are concatenated without comma separators.

Make the array const while there.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-13 14:49:35 -04:00
Joe Perches 861d9c3f25 iwlegacy: Add missing comma between constant string array
Multiple quoted strings are concatenated without comma separators.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-13 14:49:34 -04:00
Wey-Yi Guy a677927898 iwlagn: fix warning in testmode attribute table
Fix the compile warning cause by [IWL_TM_ATTR_MAX - 1]

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-11 15:02:46 -04:00
Mohammed Shafi Shajakhan 9dff387046 ath9k: remove an unnecessary function declaration
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-11 15:02:21 -04:00
Eduardo Bacchi Kienetz 43bf8c2452 rt2800usb: Add new device ID for Belkin
Belkin's Connect N150 Wireless USB Adapter, model F7D1101 version 2, uses ID 0x945b.
Chipset info: rt: 3390, rf: 000b, rev: 3213.
I have just bought one, which started to work perfectly after the ID was added through this patch.

Signed-off-by: Eduardo Bacchi Kienetz <eduardo@kienetz.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-07-11 15:02:21 -04:00
Joe Perches 3ffca4fc40 ath5k: Add missing breaks in switch/case
Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-11 15:02:20 -04:00
Larry Finger 1288aa4e80 rtlwifi: rtl8192cu: Fix duplicate if test
A typo causes routine rtl92cu_phy_rf6052_set_cck_txpower() to test the
same condition twice. The problem was found using cppcheck-1.49, and the
proper fix was verified against the pre-mac80211 version of the code.

Reported-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: stable <stable@kernel.org>  [back to 2.6.39]
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-11 15:02:20 -04:00
Daniel Drake df90d84382 libertas: fix handling of command timeout, completion and interruption
When commands time out, corruption ensues. As lbs_complete_command()
is called without locking, the command node is mistakenly freed twice.
Also fixed up locking here in a few other places.

The nature of command timeout may be that the card didn't even
acknowledge receipt of the request. Detect this case and reset dnld_sent
so that other commands don't hang forever.

When cmdnodes are moved between the free list and the pending list,
their list heads should be reinitialized. Fixed this.

Sometimes commands are completed without actually submitting them or
removing them from cmdpendingq. We must remember to remove them from
cmdpendingq in these cases, so handle this in lbs_complete_command().

Harmless signals generated during suspend/resume were interrupting
lbs_cmd. Convert to an uninterruptible sleep to avoid this.

lbs_thread must be woken up every time there is some new work to do.
I found that when 2 commands are queued, ther completion of the first
command would not wake up lbs_thread to submit the second. Poke lbs_thread
at the end of lbs_complete_command() to fix this.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-11 15:02:19 -04:00
Johannes Berg 55d990592f mac80211: allocate only one RX queue
We don't have multiple RX queues, so there's no use
in allocating multiple, use alloc_netdev_mqs() to
allocate multiple TX but only one RX queue.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-11 15:02:19 -04:00