GitHub/MotorolaMobilityLLC/kernel-slsi.git
13 years agoath9k_htc: Queue WMI events
Sujith Manoharan [Wed, 13 Apr 2011 05:53:52 +0000 (11:23 +0530)]
ath9k_htc: Queue WMI events

Use a queue to handle WMI events and schedule a tasklet
to process the events. This fixes the race between the
WMI event ISR and the SWBA tasklet when the arrival of
WMI events in quick succession could overwrite the SWBA
data before the tasklet from a previous iteration could
have been scheduled. Also, drain the WMI queue properly.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Fix beacon miss under heavy load
Sujith Manoharan [Wed, 13 Apr 2011 05:53:44 +0000 (11:23 +0530)]
ath9k_htc: Fix beacon miss under heavy load

Transmission of beacons becomes erratic when TX load
is high, since the latency involved in the generation
of a SWBA interrupt on the target to the actual sending
of a beacon is quite high for USB devices.

Fix this by adjusting the beacon response time.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Handle buffered frames in AP mode
Sujith Manoharan [Wed, 13 Apr 2011 05:53:34 +0000 (11:23 +0530)]
ath9k_htc: Handle buffered frames in AP mode

Use the CAB endpoint to send buffered multicast or
broadcast frames after each SWBA event.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Configure the beacon queue
Sujith Manoharan [Wed, 13 Apr 2011 05:53:26 +0000 (11:23 +0530)]
ath9k_htc: Configure the beacon queue

Set operating parameters (cwmin, cwmax) for the beacon queue
in AP mode.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Add TSF adjust capability
Sujith Manoharan [Wed, 13 Apr 2011 05:53:17 +0000 (11:23 +0530)]
ath9k_htc: Add TSF adjust capability

In multi-interface mode, beacons/probe responses that are
sent out must have their timestamp field updated. Calculate
the TSF adjustment value for each beaconing interface and set it
in the frame properly.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Add beacon slots
Sujith Manoharan [Wed, 13 Apr 2011 05:53:08 +0000 (11:23 +0530)]
ath9k_htc: Add beacon slots

Beacon transmission is now handled through a slot mechanism.
This allows multiple beaconing interfaces to be be present.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Fix WMI and beacon header
Sujith Manoharan [Wed, 13 Apr 2011 05:52:59 +0000 (11:22 +0530)]
ath9k_htc: Fix WMI and beacon header

Match the beacon header with that of the firmware.
Also, the firmware reports the TSF for an SWBA, so
store it.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Add a WMI command to get the firmware version
Sujith Manoharan [Wed, 13 Apr 2011 05:52:51 +0000 (11:22 +0530)]
ath9k_htc: Add a WMI command to get the firmware version

Also, update the wiphy information and use the correct
device pointer when registering. This would fix ethtool.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Rename firmware
Sujith Manoharan [Wed, 13 Apr 2011 05:52:42 +0000 (11:22 +0530)]
ath9k_htc: Rename firmware

Since the new FW requires backward incompatible host driver changes,
rename the FW to allow older driver versions to work with the
older FW.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Remove AR7010 v1.0 support
Sujith Manoharan [Wed, 13 Apr 2011 05:52:33 +0000 (11:22 +0530)]
ath9k_htc: Remove AR7010 v1.0 support

All the AR7010 devices supoprted by ath9k_htc are based
on version v1.1, so remove support for v1.0.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomwl8k: use traffic threshold to decide when to start ampdu
Brian Cavagnolo [Tue, 12 Apr 2011 18:06:28 +0000 (11:06 -0700)]
mwl8k: use traffic threshold to decide when to start ampdu

Currently, ampdu stream is created on the first qos packet to an
HT sta. The overhead of setting up the BA session may not be
justified if the outgoing packet rate is minimal (e.g., ping). So
we only allow ampdu streams after seeing a critical number of
packets in an arbitrary one-second interval.

Based on work by Nishant Sarmukadam <nishants@marvell.com>

Signed-off-by: Brian Cavagnolo <brian@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: receive EAP frames from a station in an AP VLAN on the main AP
Felix Fietkau [Tue, 12 Apr 2011 17:15:22 +0000 (19:15 +0200)]
mac80211: receive EAP frames from a station in an AP VLAN on the main AP

This makes it easier to handle moving stations to VLAN interfaces that are
part of a different bridge.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: introduce ATH9K_{PCI,AHB} config options
Gabor Juhos [Tue, 12 Apr 2011 16:23:16 +0000 (18:23 +0200)]
ath9k: introduce ATH9K_{PCI,AHB} config options

Currently ath9k only available in menuconfig if PCI bus
support is enabled. However the driver is required for
the built-in wireless MACs of the Atheros AR9130/AR9132
SoCs. These SoCs have no PCI controller, the wireless
MAC is connected to the AHB bus on them.

Introduce separated config options for the supported
buses, in order to allow building of ath9h without PCI
bus support.

As a bonus, this patch removes the cross-reference of
the ATHEROS_AR71XX option which is not present in the
kernel.

Cc: Luis R. Rodriguez <lrodriguez@atheros.com>
Cc: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomwl8k: interrupt handling changes
Nishant Sarmukadam [Fri, 8 Apr 2011 09:08:27 +0000 (14:38 +0530)]
mwl8k: interrupt handling changes

We do not need to enable all the interrupts in mwl8k_probe_hw.
We need to enable only MWL8K_A2H_INT_OPC_DONE interrupt for sending
commands to the firmware. Keep the other interrupts masked in
mwl8k_probe_hw. Also, in mwl8k_start, where we expect other interrupts,
enable only those interrupts we are interested in.

Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: improve comments for optimized tx descriptor setup
John W. Linville [Wed, 13 Apr 2011 12:47:32 +0000 (08:47 -0400)]
ath5k: improve comments for optimized tx descriptor setup

Comment the use of local variables to reduce the number of load/store
operations on uncached memory, in hopes of not losing this optimization
accidentally in the future.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: Register id table for platform device
Vasanthakumar Thiagarajan [Tue, 12 Apr 2011 07:12:22 +0000 (12:42 +0530)]
ath9k: Register id table for platform device

Currently the device id in the platform driver is hardcoded to an id
which is specific to AR9130/AR9132 SOCs as it supports only wmac (wireless mac)
of these SOCs. But this needs to be dynamic when we want to support different
wmac of SOCs. So add id_table to driver to make it extendable to more SOCs.

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Acked-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2800usb: Add seven new USB IDs
Mark Davis [Tue, 12 Apr 2011 04:19:10 +0000 (00:19 -0400)]
rt2800usb: Add seven new USB IDs

Adds USB IDs for seven previously missing devices. Additionally, all
instances of 'Conceptronic' have been replaced by the OEM name.

Devices added are..
0411:01a2 - Buffalo WLI-UC-GNM, RT3070V
0586:341e - ZyXEL NWD2105, RT3070
13b1:002f - Linksys AE1000, RT3572
13b1:0031 - Cisco / Linksys AM10, RT3072
14b2:3c2c - Keebox W150NU / Alpha Networks WUS-N12, RT3070
157e:3013 - TRENDnet TEW-645UB, RT2770+RT2720
15a9:0012 - Airlink AWLL7025 / Gemtek WUBR-208N, RT2870+RT2850

Signed-off-by: Mark Davis <marked86@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: update AR9003 low_ob_db_tx_gain to improve spur performance
Rajkumar Manoharan [Mon, 11 Apr 2011 14:52:30 +0000 (20:22 +0530)]
ath9k_hw: update AR9003 low_ob_db_tx_gain to improve spur performance

Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: update Ar9003 intervals to fix carrier leak
Rajkumar Manoharan [Mon, 11 Apr 2011 14:52:29 +0000 (20:22 +0530)]
ath9k_hw: update Ar9003 intervals to fix carrier leak

Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: Remove unused code in AR9287 eeprom
Rajkumar Manoharan [Mon, 11 Apr 2011 14:52:28 +0000 (20:22 +0530)]
ath9k_hw: Remove unused code in AR9287 eeprom

Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: Implement integer mode for AR9485
Vasanthakumar Thiagarajan [Mon, 11 Apr 2011 11:09:40 +0000 (16:39 +0530)]
ath9k: Implement integer mode for AR9485

This fixes random disconnect.

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agortlwifi: rtl8192ce: Fix LED initialization
Chaoming Li [Sun, 10 Apr 2011 23:30:23 +0000 (18:30 -0500)]
rtlwifi: rtl8192ce: Fix LED initialization

Driver rtl8192ce does not initialize the LED correctly.

Signed-off-by: Chaoming Li <chaoming_li@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: index out of bounds
roel [Sun, 10 Apr 2011 19:09:55 +0000 (21:09 +0200)]
ath9k: index out of bounds

Check whether index is within bounds before testing the element

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: index out of bounds
roel [Sun, 10 Apr 2011 19:09:50 +0000 (21:09 +0200)]
ath9k_hw: index out of bounds

Check whether index is within bounds before testing the element

Both spurChans arrays in modalHeader5G and modalHeader2G have 5 elements,
AR_EEPROM_MODAL_SPURS is defined 5. So unless a break occurs, in the
last iteration (i=5) we tried to access spurChansPtr[5] before testing
whether i was within bounds. Fix this.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: reduce interrupt load caused by rx/tx interrupts
Felix Fietkau [Sun, 10 Apr 2011 16:32:19 +0000 (18:32 +0200)]
ath5k: reduce interrupt load caused by rx/tx interrupts

While the rx/tx tasklet is pending, new unnecessary interrupts may arrive.
Decrease the load by temporarily disabling the interrupts until the tasklet
has completed.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: clean up debugfs code
Felix Fietkau [Sun, 10 Apr 2011 16:32:18 +0000 (18:32 +0200)]
ath5k: clean up debugfs code

The pointers to the debugfs entries do not need to be saved, because they
will be recursively removed when the wiphy is unregistered.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: remove ts_retry from ath5k_tx_status
Felix Fietkau [Sun, 10 Apr 2011 16:32:17 +0000 (18:32 +0200)]
ath5k: remove ts_retry from ath5k_tx_status

Reusing the configured retry counts from the skb cb is more efficient than
reloading the data from uncached memory.
Replace ts_longretry (unused) with ts_final_retry which contains the retry
count for the final rate only

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: optimize rx status processing
Felix Fietkau [Sun, 10 Apr 2011 16:32:16 +0000 (18:32 +0200)]
ath5k: optimize rx status processing

Use ACCESS_ONCE to reduce the number of redundant loads on uncached memory

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: optimize tx status processing
Felix Fietkau [Sun, 10 Apr 2011 16:32:15 +0000 (18:32 +0200)]
ath5k: optimize tx status processing

Use ACCESS_ONCE to reduce the number of variable reloads on uncached memory

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: remove ts_rate from ath5k_tx_status
Felix Fietkau [Sun, 10 Apr 2011 16:32:14 +0000 (18:32 +0200)]
ath5k: remove ts_rate from ath5k_tx_status

It is no longer necessary for preparing mac80211 tx status

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: optimize tx descriptor setup
Felix Fietkau [Sun, 10 Apr 2011 16:32:13 +0000 (18:32 +0200)]
ath5k: optimize tx descriptor setup

Use local variables to reduce the number of load/store operations on uncached
memory.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: fix slot time handling
Felix Fietkau [Sat, 9 Apr 2011 21:10:21 +0000 (23:10 +0200)]
ath5k: fix slot time handling

Set the slot time based on the mac80211 short slot vs long slot setting
instead of just forcing long slot for all CCK-enabled channels.
This slightly improves 802.11g mode performance in in my tests.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: fix SIFS time handling
Felix Fietkau [Sat, 9 Apr 2011 21:10:20 +0000 (23:10 +0200)]
ath5k: fix SIFS time handling

ath5k uses 8 usec as a sifs time, extracted from the initvals, whereas the
standard requires a sifs time of 10. The difference originates from the fact
that the SIFS register has an offset of 2 usec.
Fix the SIFS time definition to use the standard value of 10 usec and subtract
2 usecs when writing the SIFS register.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: fix short preamble rate duration value
Felix Fietkau [Sat, 9 Apr 2011 21:10:19 +0000 (23:10 +0200)]
ath5k: fix short preamble rate duration value

Subtract the difference in preamble duration (in usec) from the value
returned by ieee80211_generic_frame_duration.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: fix tx status reporting issues
Felix Fietkau [Sat, 9 Apr 2011 19:37:14 +0000 (21:37 +0200)]
ath5k: fix tx status reporting issues

During normal operation, minstrel was showing suspicious EWMA probabilities
exceeding 100%. It looks like the tx status reporting in ath5k was not
properly clearing the rate index for rates which were never attempted.

This is caused by uninitialized stale data in the on-stack tx status
information, which is reused when more frames are received.

To fix this, rely on ts->ts_final_idx to select the last attempted rate,
instead of checking whether ts->ts_rate is set.

Additionally, the conversion from the driver rate index back to the
mac80211 rate index can be dropped, as the mac80211 tx status will still
have the original rate index which was used to set up the descriptor.

Additionally, one more inaccuracy was fixed - the final rate attempt
count only needs to be increased by one if the transmission attempt was
successful.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: improve pcal error handling for ENOMEM case
John W. Linville [Fri, 8 Apr 2011 19:33:12 +0000 (15:33 -0400)]
ath5k: improve pcal error handling for ENOMEM case

The ath5k driver does kmalloc allocations for pcal info in a loop.
But, if one fails it was simply returning -ENOMEM without freeing
already allocated memory.  This patch corrects that oversight.

Reported-by: Eugene A. Shatokhin <dame_eugene@mail.ru>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Reviewed-by: Bob Copeland <me@bobcopeland.com>
13 years agomwl8k: Fix checkpatch.pl and sparse warnings and errors
Yogesh Ashok Powar [Fri, 8 Apr 2011 18:55:37 +0000 (00:25 +0530)]
mwl8k: Fix checkpatch.pl and sparse warnings and errors

Fix checkpatch errors and warnings comprising of indent errors, spaces and
__packed warnings. Also fix 'make C = 2' warnings.

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: remove unnecessary parts of the AR9380 SREV check
Felix Fietkau [Fri, 8 Apr 2011 18:49:16 +0000 (20:49 +0200)]
ath9k_hw: remove unnecessary parts of the AR9380 SREV check

Older versions have not been sold and the driver does not explicitly
check for them anyway, so we can simply ignore the macRev here.
Reduces ath9k_hw size on mips by more than 2 KB.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years ago{mac|nl}80211: Add station connected time
Mohammed Shafi Shajakhan [Fri, 8 Apr 2011 15:54:24 +0000 (21:24 +0530)]
{mac|nl}80211: Add station connected time

Add station connected time in debugfs. This will be helpful to get a
measure of stability of the connection and for debugging stress issues

Cc: Senthilkumar Balasubramanian <Senthilkumar.Balasubramanian@Atheros.com>
Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: Fix kernel panic on module unload
Rajkumar Manoharan [Fri, 8 Apr 2011 11:36:25 +0000 (17:06 +0530)]
ath9k: Fix kernel panic on module unload

The commit "ath9k: configure beacons based on hw opmode" introduced
a regression which leads to kernel panic. Failed to stop ani timer
during the driver unload while any of the beaconing vif is running.

Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: Update gain table for AR9485
Senthil Balasubramanian [Fri, 8 Apr 2011 10:00:35 +0000 (15:30 +0530)]
ath9k: Update gain table for AR9485

Update Tx gain 23 for all tx gain table.

Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: Add RSSI information from control and extension chains
Senthil Balasubramanian [Fri, 8 Apr 2011 10:00:34 +0000 (15:30 +0530)]
ath9k: Add RSSI information from control and extension chains

Export RSSI information from all the control and extension
channel chains to debugfs. Also add rx antenna information
to debugfs. This will be useful for debugging purpose.

Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: send notification on new peer candidate for our secure mesh
Javier Cardona [Thu, 7 Apr 2011 22:08:35 +0000 (15:08 -0700)]
mac80211: send notification on new peer candidate for our secure mesh

Also, advertise support for mesh authentication.

Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agonl80211: New notification to discover mesh peer candidates.
Javier Cardona [Thu, 7 Apr 2011 22:08:34 +0000 (15:08 -0700)]
nl80211: New notification to discover mesh peer candidates.

Notify userspace when a beacon/presp is received from a suitable mesh
peer candidate for whom no sta information exists.  Userspace can then
decide to create a sta info for the candidate.  If userspace is not
ready to authenticate the peer right away, it can create the sta info
with the authenticated flag unset and set it later.

Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agonl80211/mac80211: Perform PLINK_ACTION on new station
Javier Cardona [Thu, 7 Apr 2011 22:08:33 +0000 (15:08 -0700)]
nl80211/mac80211: Perform PLINK_ACTION on new station

Modify the NEW_STATION command to accept PLINK_ACTIONS, in case
userspace wants to create stations and initiate a peer link right away
(for authenticated stations) or create a blocked station (for
debugging).

Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: ignore peer link requests from unauthenticated stations.
Javier Cardona [Thu, 7 Apr 2011 22:08:32 +0000 (15:08 -0700)]
mac80211: ignore peer link requests from unauthenticated stations.

Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: Let user space receive and send mesh auth/deauth frames
Javier Cardona [Thu, 7 Apr 2011 22:08:31 +0000 (15:08 -0700)]
mac80211: Let user space receive and send mesh auth/deauth frames

Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agonl80211/mac80211: let userspace authenticate stations
Javier Cardona [Thu, 7 Apr 2011 22:08:30 +0000 (15:08 -0700)]
nl80211/mac80211: let userspace authenticate stations

Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: ignore peers if security is enabled for this mesh
Javier Cardona [Thu, 7 Apr 2011 22:08:29 +0000 (15:08 -0700)]
mac80211: ignore peers if security is enabled for this mesh

Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agocfg80211/nl80211: Add userspace authentication flag to mesh setup
Javier Cardona [Thu, 7 Apr 2011 22:08:28 +0000 (15:08 -0700)]
cfg80211/nl80211: Add userspace authentication flag to mesh setup

During mesh setup, use NL80211_MESH_SETUP_USERSPACE_AUTH flag to create
a secure mesh and route management frames to userspace.

Also, NL80211_CMD_GET_WIPHY now returns a flag NL80211_SUPPORT_MESH_AUTH
if the wiphy's mesh implementation supports routing of mesh auth frames
to userspace.  This is useful for forward compatibility between old
kernels and new userspace tools.

Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agonl80211: rename NL80211_MESH_SETUP_VENDOR_PATH_SEL_IE
Javier Cardona [Thu, 7 Apr 2011 22:08:27 +0000 (15:08 -0700)]
nl80211: rename NL80211_MESH_SETUP_VENDOR_PATH_SEL_IE

To NL80211_MESH_SETUP_IE. This reflects our ability to insert any ie
into a mesh beacon, not simply path selection ies.

Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwl4965: drop a lone pr_err()
Paul Bolle [Thu, 7 Apr 2011 18:40:32 +0000 (20:40 +0200)]
iwl4965: drop a lone pr_err()

iwl4965_rate_control_register() prints a message at KERN_ERR level. It
looks like it's just a debugging message, so pr_err() seems to be
overdone. But none of the similar functions in drivers/net/wireless
print a message, so let's just drop it.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: fix too early enabling of rx during ath_startrecv()
Felix Fietkau [Thu, 7 Apr 2011 17:30:32 +0000 (19:30 +0200)]
ath9k: fix too early enabling of rx during ath_startrecv()

rx should only be enabled after enough rx buffers have been given to the
hardware, however ath_rx_buf_link was calling ath9k_hw_rxena after every
single added buffer.
Fix this by calling ath9k_hw_rxena directly from the rx tasklet after
completion instead.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: fix PS-Poll reception on AR9160 and earlier
Felix Fietkau [Thu, 7 Apr 2011 17:24:23 +0000 (19:24 +0200)]
ath9k: fix PS-Poll reception on AR9160 and earlier

I can't find any valid reason for not setting the ATH9K_RX_FILTER_PSPOLL
flag on older hardware and neither the documentation nor the reference
code mention any reason for excluding older hardware here.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomwifiex: use common keyinfo bitmap for different key types
Yogesh Ashok Powar [Wed, 6 Apr 2011 23:46:56 +0000 (16:46 -0700)]
mwifiex: use common keyinfo bitmap for different key types

Instead of having separate key information definitions for
each type of key, a common key information bitmap is used.

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomwifiex: fix cmd_skb headroom decreasing issue
Bing Zhao [Wed, 6 Apr 2011 23:46:55 +0000 (16:46 -0700)]
mwifiex: fix cmd_skb headroom decreasing issue

Before calling host_to_card() to send the cmd to firmware,
we use skb_push() to add 4 bytes SDIO interface header at
the start of the data buffer. Since cmd_skb data structure
will be re-used at a later time, we need to restore its
headroom by removing the 4 bytes header.

Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Marc Yang <yangyang@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: Fix instable target power control b/w CCK/OFDM
Rajkumar Manoharan [Wed, 6 Apr 2011 16:12:52 +0000 (21:42 +0530)]
ath9k_hw: Fix instable target power control b/w CCK/OFDM

The problem is that when the attenuation is increased,
the rate will start to drop from MCS7 -> MCS6, and finally
will see MCS1 -> CCK_11Mbps. When the rate is changed b/w
CCK and OFDM, it will use register desired_scale to calculate
how much tx gain need to change.

The output power with the same tx gain for CCK and OFDM modulated
signals are different. This difference is constant for AR9280
but not AR9285/AR9271. It has different PA architecture
a constant. So it should be calibrated against this PA
characteristic.

The driver has to read the calibrated values from EEPROM and set
the tx power registers accordingly.

Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Acked-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: Implement dev_tx_frames_pending callback.
Vivek Natarajan [Wed, 6 Apr 2011 06:11:11 +0000 (11:41 +0530)]
ath9k: Implement dev_tx_frames_pending callback.

This function returns true if there is atleast one frame
in any one of the tx queues.

Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: Check for queued frames before entering power save.
Vivek Natarajan [Wed, 6 Apr 2011 06:11:10 +0000 (11:41 +0530)]
mac80211: Check for queued frames before entering power save.

In a highly noisy environment, the tx rate of the driver drops and
the application slows down since it has not yet received ACKs for
the frames already queued in the hardware. Since this ACK may take
more than 100ms, stopping the dev queues for entering PS at this
stage breaks applications, WMM test cases in my testing.
If there are frames already pending in the tx queue, postponing the
PS logic helps to avoid redundant queue stops. When power save is
enabled by default and in a noisy environment, this API certainly
helps in improving the average throughput.

Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlagn: downgrade warning on unknown TLV
Johannes Berg [Mon, 4 Apr 2011 13:16:29 +0000 (06:16 -0700)]
iwlagn: downgrade warning on unknown TLV

If we maintain API properly, then there isn't
really a reason to warn about this since we'll
just be adding things that are safe to ignore,
so downgrade the warning to debug info level.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: clean up & autodetect statistics
Johannes Berg [Fri, 8 Apr 2011 15:14:56 +0000 (08:14 -0700)]
iwlagn: clean up & autodetect statistics

There's no need to keep both normal and BT statistics
versions around all the time in memory when we only
use a subset of both. So keep only the subsets that
we need in memory, depending on the debug config).

Also, in doing so, we can remove all the calls to
iwl_bt_statistics() in the driver as we'll just
access the copied statistics now.

Finally, also remove this call from the one place
where it might still be needed and automatically
detect what kind of statistics the device is sending
based on their size. This way, we don't need to keep
track of which devices do what any more, which is
good since this is subject to change based on the
ucode version (as some ucode even for non-BT devices
will in fact use BT statistics).

Warn upon encountering a statistics command from the
ucode that isn't known, so we will find such issues
earlier in the future.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Tested-by: Don Fry <donald.h.fry@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: sensitivity and chain noise done by driver
Wey-Yi Guy [Sun, 3 Apr 2011 15:14:41 +0000 (08:14 -0700)]
iwlagn: sensitivity and chain noise done by driver

_agn driver should perform both sensitivity and chain noise calib.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: tx power calib always done in firmware
Wey-Yi Guy [Fri, 1 Apr 2011 23:29:54 +0000 (16:29 -0700)]
iwlagn: tx power calib always done in firmware

Remove the config flag for tx power calib

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: all _agn devices support power save mode
Wey-Yi Guy [Fri, 1 Apr 2011 23:29:53 +0000 (16:29 -0700)]
iwlagn: all _agn devices support power save mode

Remove broken_power_save checking

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: more cleanup to remove unused reference
Wey-Yi Guy [Fri, 1 Apr 2011 23:29:52 +0000 (16:29 -0700)]
iwlagn: more cleanup to remove unused reference

More cleanup code, no functional changes

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: remove un-needed configuration
Wey-Yi Guy [Fri, 1 Apr 2011 23:29:51 +0000 (16:29 -0700)]
iwlagn: remove un-needed configuration

After driver split, set_l0s config is no longer needed, remove it

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: remove more reference to legacy devices
Wey-Yi Guy [Fri, 1 Apr 2011 23:29:50 +0000 (16:29 -0700)]
iwlagn: remove more reference to legacy devices

Remove the reference to both 3945 and 4965 in LED code

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: cleanup to remove the reference for 3945
Wey-Yi Guy [Fri, 1 Apr 2011 23:35:10 +0000 (16:35 -0700)]
iwlagn: cleanup to remove the reference for 3945

More clean up after driver split

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: remove unused 3945 define
Wey-Yi Guy [Fri, 1 Apr 2011 23:35:09 +0000 (16:35 -0700)]
iwlagn: remove unused 3945 define

3945 no longer apply

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: no 3945 define needed
Wey-Yi Guy [Fri, 1 Apr 2011 23:29:47 +0000 (16:29 -0700)]
iwlagn: no 3945 define needed

Remove 3945 define

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: PAPD read for 2000 series devices
Wey-Yi Guy [Fri, 1 Apr 2011 20:20:44 +0000 (13:20 -0700)]
iwlagn: PAPD read for 2000 series devices

For 2000 series NICs, disable OTP refresh in order to read correct
PAPD table from high OTP block

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlwifi: fix bugs in change_interface
Johannes Berg [Tue, 29 Mar 2011 13:29:37 +0000 (06:29 -0700)]
iwlwifi: fix bugs in change_interface

If change_interface gets invoked during a firmware
restart, it may crash; prevent that from happening
by checking if ctx->vif is assigned.

Additionally, in my initial commit I forgot to set
the vif->p2p variable correctly, so fix that too.

Cc: stable@kernel.org [2.6.38+]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: fix radar frame rejection
Garen Tamrazian [Wed, 30 Mar 2011 09:29:32 +0000 (02:29 -0700)]
iwlagn: fix radar frame rejection

The microcode may sometimes reject TX frames when
on a radar channel even after we associated as it
clears information during association and needs to
receive a new beacon before allowing that channel
again. This manifests itself as a TX status value
of TX_STATUS_FAIL_PASSIVE_NO_RX. So in this case,
stop the corresponding queue and give the frame
back to mac80211 for retransmission. We start the
queue again when a beacon from the AP is received
which will make the regulatory enforcement in the
device allow transmitting again.

Signed-off-by: Garen Tamrazian <garenx.tamrazian@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: remove un-necessary function pointer
Wey-Yi Guy [Wed, 30 Mar 2011 00:53:15 +0000 (17:53 -0700)]
iwlagn: remove un-necessary function pointer

After driver split, no need to use function pointer for those event and
register dump function.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlwifi: remove extranious macro from firmware define
root [Mon, 28 Mar 2011 23:12:43 +0000 (16:12 -0700)]
iwlwifi: remove extranious macro from firmware define

define of firmware filenames use extra macro to build the files name.

Signed-off-by: Jay Sternberg <jay.e.sternberg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
John W. Linville [Thu, 7 Apr 2011 20:45:40 +0000 (16:45 -0400)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-2.6

Conflicts:
drivers/net/wireless/rtlwifi/efuse.c
drivers/net/wireless/rtlwifi/rtl8192c/fw_common.c
net/bluetooth/mgmt.c

13 years agocfg80211: add a timer for invalid user reg hints
Luis R. Rodriguez [Tue, 5 Apr 2011 17:49:04 +0000 (10:49 -0700)]
cfg80211: add a timer for invalid user reg hints

We have no other option but to inform userspace that we
have queued up their regulatory hint request when we are
given one given that nl80211 operates atomically on user
requests. The best we can do is accept the request, and
add a delayed work item for processing failure and cancel it
if we succeeed. Upon failure we restore the regulatory
settings and ignore the user input.

This fixes this reported bug:

https://bugzilla.kernel.org/show_bug.cgi?id=28112

Reported-by: gregoryx.alagnou@intel.com
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agocfg80211: fix regulatory restore upon user hints
Luis R. Rodriguez [Tue, 5 Apr 2011 17:49:03 +0000 (10:49 -0700)]
cfg80211: fix regulatory restore upon user hints

When we restore regulatory settings its possible CRDA
will not reply because of a bogus user entry. In this
case the bogus entry will prevent any further processing
on cfg80211 for regulatory domains even if we restore
regulatory settings.

To prevent this we suck out all pending requests when
restoring regulatory settings and add them back into the
queue after we have queued up the reset work.

The impact of not having this applied is that a user
with privileges can issue a userspace regulatory hint
while we are disasocciating and this would prevent any
further processing of regulatory domains.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlagn: move IO functions out of line
Johannes Berg [Tue, 5 Apr 2011 16:42:12 +0000 (09:42 -0700)]
iwlagn: move IO functions out of line

This generates a massive reduction in module size:
with debug:
   text    data     bss     dec     hex filename
 670300   13136     420  683856   a6f50 iwlagn.ko (before)
 388347   13136     408  401891   621e3 iwlagn.ko (after)

without debug:
   text    data     bss     dec     hex filename
 528575   13072     420  542067   84573 iwlagn.ko (before)
 294192   13072     408  307672   4b1d8 iwlagn.ko (after)

This also removes all the IO debug functionality since
it can easily be replaced by tracing, and makes the
code unnecessarily complex.

I haven't done any CPU utilisation measurements, but
given that the hotpaths don't use much IO it is not
likely to have a negative impact; in fact, the size
reduction will reduce cache pressure which possibly
improves performance.

Finally, an unused function or two were removed.

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>
13 years agoiwlagn: remove ISR ops
Johannes Berg [Tue, 5 Apr 2011 16:42:11 +0000 (09:42 -0700)]
iwlagn: remove ISR ops

The ISR (interrupt service routine) ops are now
no longer necessary since they are the same for
all devices this driver now handles.

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>
13 years agoiwlagn: remove rxb page bookkeeping
Johannes Berg [Tue, 5 Apr 2011 16:42:10 +0000 (09:42 -0700)]
iwlagn: remove rxb page bookkeeping

We never use the value in alloc_rxb_page,
so there's no point in keeping it either.

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>
13 years agoiwlagn: remove rev_id
Johannes Berg [Tue, 5 Apr 2011 16:42:09 +0000 (09:42 -0700)]
iwlagn: remove rev_id

The rev_id variable is only printed, we
don't need to store 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>
13 years agoiwlagn: remove hw_rev
Johannes Berg [Tue, 5 Apr 2011 16:42:08 +0000 (09:42 -0700)]
iwlagn: remove hw_rev

The hw_rev variable is used only during init,
so there's no need to keep it around.

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>
13 years agoiwlagn: remove hw_wa_rev
Johannes Berg [Tue, 5 Apr 2011 16:42:07 +0000 (09:42 -0700)]
iwlagn: remove hw_wa_rev

The variable is never used.

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>
13 years agoiwlagn: remove BSM clock setting
Johannes Berg [Tue, 5 Apr 2011 16:42:06 +0000 (09:42 -0700)]
iwlagn: remove BSM clock setting

Again, a 4965 specific code path that we no
longer need in iwlagn.

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>
13 years agoiwlagn: init cmd_queue earlier
Johannes Berg [Tue, 5 Apr 2011 16:42:05 +0000 (09:42 -0700)]
iwlagn: init cmd_queue earlier

We know after loading the ucode whether it will
support PAN or not, so we can also initialise
the cmd_queue variable much earlier.

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>
13 years agoiwlagn: clean up alive handling
Johannes Berg [Tue, 5 Apr 2011 16:42:04 +0000 (09:42 -0700)]
iwlagn: clean up alive handling

Devices newer than 4965 don't actually send
two different versions of the ALIVE command,
so we always had a bug here since before this
patch we copy more data than we got. Remove
the iwl_init_alive_resp struct and don't use
it.

Since we also really don't need to track all
the data received in ALIVE as we only use the
error and log event tables later, we can also
save space by just keeping those and not more
data around in memory.

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>
13 years agoiwlagn: fix ucode verify message
Johannes Berg [Tue, 5 Apr 2011 16:42:03 +0000 (09:42 -0700)]
iwlagn: fix ucode verify message

My previous patch left a message talking about
bootstrap, but that's clearly bogus.

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>
13 years agoiwlagn: add feature flags
Johannes Berg [Tue, 5 Apr 2011 16:42:02 +0000 (09:42 -0700)]
iwlagn: add feature flags

Some new devices and microcode files will a greater
variety of features, so the TLV-per-feature approach
we took before will quickly make things harder to
manage and increase the file size.

Add a new TLV that has feature flags. Currently, it
will contain:
 1) a PAN feature flag, which moves from a separate
    TLV
 2) a new BT stats bit that indicates whether the
    microcode image uses bluetooth statistics
 3) a new MFP flag for management frame protection
    which can be enabled once the device/microcode
    supports 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>
13 years agoiwlagn: check more error return code
Wey-Yi Guy [Tue, 5 Apr 2011 16:42:01 +0000 (09:42 -0700)]
iwlagn: check more error return code

In alive notify, we should check return code instead of assume everything ok

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlagn: change Copyright to 2011
Wey-Yi Guy [Tue, 5 Apr 2011 16:42:00 +0000 (09:42 -0700)]
iwlagn: change Copyright to 2011

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlagn: remove ucode_data_backup
Johannes Berg [Tue, 5 Apr 2011 16:41:59 +0000 (09:41 -0700)]
iwlagn: remove ucode_data_backup

This was used only on 4965 in conjunction with
the bootstrap ucode.

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>
13 years agoiwlagn: centralize and fix ucode restart
Johannes Berg [Tue, 5 Apr 2011 16:41:58 +0000 (09:41 -0700)]
iwlagn: centralize and fix ucode restart

The ucode restart has to take into account a number
of things, like clearing the HCMD_ACTIVE and other
status bits, and waking up the wait_command_queue.
Currently, however, there are a number of places
that neither do that, nor actually set the FW error
bit that leads to proper restart handling, which
means that in those cases things will probably just
hang completely.

To clean this up, make all ucode restart go through
a single function, except for the cases where it's
called during firmware loading.

Also fix a bug in wimax coexist restart avoidance,
it needs to first clear the status bits (and it has
to clear the HCMD_ACTIVE one as well) and then wake
up anything waiting on wait_command_queue.

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>
13 years agoiwlagn: remove bootstrap code
Johannes Berg [Tue, 5 Apr 2011 16:41:57 +0000 (09:41 -0700)]
iwlagn: remove bootstrap code

Only 4965 had a bootstrap microcode image, so
the agn driver can completely ignore that and
we can remove some code from 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>
13 years agoiwlagn: verify specific ucode
Johannes Berg [Tue, 5 Apr 2011 16:41:56 +0000 (09:41 -0700)]
iwlagn: verify specific ucode

When we loaded a ucode, there's no point in
checking any one that is present, we know
which one is supposed to be present so also
verify that it is exactly the right one.

That also simplifies the code and makes it
faster since it doesn't have to check all.

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>
13 years agoiwlagn: simplify ucode check code
Johannes Berg [Tue, 5 Apr 2011 16:41:55 +0000 (09:41 -0700)]
iwlagn: simplify ucode check code

The code in iwlcore_verify_inst_sparse really
doesn't need to keep track of the number of
errors it encountered since a single one is
fatal.

Also, the code in iwl_verify_inst_full is just
used to print out some things, so rename it to
iwl_print_inst and don't give it a return code
and just make it print out the values.

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>
13 years agoiwlagn: return send calibration result
Wey-Yi Guy [Tue, 5 Apr 2011 16:41:54 +0000 (09:41 -0700)]
iwlagn: return send calibration result

In alive notification call, return the status from iwl_send_calib_results()

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlagn: remove pointless return variables
Johannes Berg [Tue, 5 Apr 2011 16:41:53 +0000 (09:41 -0700)]
iwlagn: remove pointless return variables

A number of places just use a variable to return
it right away, which is useless, so let's remove
the variables there.

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>
13 years agoiwlagn: remove more 3945/4965 related defines
Wey-Yi Guy [Tue, 5 Apr 2011 16:41:52 +0000 (09:41 -0700)]
iwlagn: remove more 3945/4965 related defines

After driver split, remove unused #defines

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlagn: clean up ucode loading
Johannes Berg [Tue, 5 Apr 2011 16:41:51 +0000 (09:41 -0700)]
iwlagn: clean up ucode loading

All agn devices behave the same, so there's no
need to go through function pointers for any
of the ucode loading functionality.

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>