]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/log
mirror_ubuntu-disco-kernel.git
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.kernel.org/pub/scm/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>
13 years agoiwlagn: make mac80211 handlers static
Johannes Berg [Tue, 5 Apr 2011 16:41:50 +0000 (09:41 -0700)]
iwlagn: make mac80211 handlers static

Now that these handlers are no longer shared
between 4965 and agn, they can be static.

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 some 3945/4965 remnants
Johannes Berg [Tue, 5 Apr 2011 16:41:49 +0000 (09:41 -0700)]
iwlagn: clean up some 3945/4965 remnants

When the driver was split, a bunch of definitions
for the 3945 and 4965 devices stayed around, but
they're now useless so remove (some of) them.

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 unused variable
Johannes Berg [Tue, 5 Apr 2011 16:41:48 +0000 (09:41 -0700)]
iwlagn: remove unused variable

Some code was removed, but a variable it used
and that is now unused stayed around, kill 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 agort2x00: Drop __TIME__ usage
Michal Marek [Tue, 5 Apr 2011 14:59:06 +0000 (16:59 +0200)]
rt2x00: Drop __TIME__ usage

The kernel already prints its build timestamp during boot, no need to
repeat it in random drivers and produce different object files each
time.

Signed-off-by: Michal Marek <mmarek@suse.cz>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Cc: linux-wireless@vger.kernel.org
Cc: netdev@vger.kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomwl8k: Do not configure tx power unconditionally
Nishant Sarmukadam [Tue, 5 Apr 2011 08:48:09 +0000 (14:18 +0530)]
mwl8k: Do not configure tx power unconditionally

Instead of configuring tx power unconditionally, check for
IEEE80211_CONF_CHANGE_POWER and configure it only when stack
sets this flag

Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: configure beacons based on hw opmode
Rajkumar Manoharan [Mon, 4 Apr 2011 17:26:19 +0000 (22:56 +0530)]
ath9k: configure beacons based on hw opmode

Current ath9k code does not handle beacon timers on opmode
specific. One such example is that a STA beacon config overwrites
already configured AP vif's beacon timers during scan.

On multi station vif case, configure beacon timers beased
on primary vif selected. This also helps while moving back
to single STA vif from multi STA vifs, where the power save
is enabled and hw has to be reconfigured with proper
beacon and bssid/aid. Otherwise connection poll will be triggered
so frequently due to beacon loss.

Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: Handle BSSID/AID for multiple interfaces
Rajkumar Manoharan [Mon, 4 Apr 2011 17:26:18 +0000 (22:56 +0530)]
ath9k: Handle BSSID/AID for multiple interfaces

As of now bssid/aid is overridden with recently changed vif's
bss config. This may cause improper beacon updation due to
bssid/aid mismatch. On station mode, select an associated
sta vif as primary vif and configure that vif's bss into hw.
Update the primary vif on interface change and bss info change.

Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: Cleanup ath_vif struct
Rajkumar Manoharan [Mon, 4 Apr 2011 17:26:17 +0000 (22:56 +0530)]
ath9k: Cleanup ath_vif struct

Remove unused bssid from ath_vif and set av_bslot on beacon
alloc/return.

Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: deny new interface addtion on IBSS mode
Rajkumar Manoharan [Mon, 4 Apr 2011 17:26:16 +0000 (22:56 +0530)]
ath9k: deny new interface addtion on IBSS mode

The present check denies the IBSS interface addtion if we
already have any other vifs. But it fails to deny interface
addition if IBSS was already present.

Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agowl1251: Add support for idle mode
Jarkko Nikula [Mon, 4 Apr 2011 08:04:58 +0000 (11:04 +0300)]
wl1251: Add support for idle mode

On Nokia N900 the wl1251 consumes the most power when the interface is up
but not associated to access point (that supports PSM). In terms of battery
current consumption, the consumption is ~180 mA higher when the interface is
up but not associated and only ~5 mA higher when associated compared to
interface down and driver not loaded cases.

This patch adds support for the mac80211 idle notifications. Chip is put into
idle very much the same way when entering into PSM by utilizing the Extreme
Low Power (ELP) mode. I.e. idle is entered by setting necessary conditions
in wl1251_ps_set_mode followed by a call to wl1251_ps_elp_sleep.

It seems it is just enough the authorize ELP mode followed by
CMD_DISCONNECT (thanks to Kalle Valo about the idea to use it).
Without disconnect command the chip remains somewhat active and stays
consuming ~20 mA. Idle mode is left by same way than PSM. The wl1251_join
call is used to revert the CMD_DISCONNECT. Without it association to AP
doesn't work when trying second time.

With this patch the interface up but not associated case the battery current
consumption is less than 1 mA higher compared to interface down case.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Kalle Valo <kvalo@adurom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agowl1251: Prepare for idle mode support
Jarkko Nikula [Mon, 4 Apr 2011 08:04:57 +0000 (11:04 +0300)]
wl1251: Prepare for idle mode support

RFC for WL1251 idle mode support brought a few issues that are worth to
update before adding the idle mode support.

Since the idle mode can reuse the code that is now used in Power Save Mode
(PSM), the flag psm in struct wl1251 is changed to variable station_mode
to be able to distinguish between PSM and idle modes.

As the station mode is different than the power power save mode command
that is sent to chip, the enum wl1251_cmd_ps_mod values are used only when
communicating with the chip and new enum wl1251_station_mode values are used
inside the driver.

Confusing comment about psm and elp relation is removed since the PSM is
actually activated by putting the chip into Entreme Low Power (ELP) mode.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Kalle Valo <kvalo@adurom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: remove few obsolete flags
Mohammed Shafi Shajakhan [Sun, 3 Apr 2011 13:35:28 +0000 (19:05 +0530)]
mac80211: remove few obsolete flags

Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agozd1211rw: rename CR* macros to ZD_CR*
Jussi Kivilinna [Sat, 2 Apr 2011 08:25:54 +0000 (11:25 +0300)]
zd1211rw: rename CR* macros to ZD_CR*

With compat-wireless CR* macros in zd_usb.h conflict with CR macros in
include/asm-generic/termbits.h. So rename CR* macros to ZD_CR*.

Conversion was done with using sed and then 'over 80 character line'
checkpatch.pl warnings and comment indents were fixed.

Reported-by: Walter Goldens <goldenstranger@yahoo.com>
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: use the hw opmode to select the beacon timer mode
Felix Fietkau [Sat, 2 Apr 2011 01:39:48 +0000 (03:39 +0200)]
ath9k: use the hw opmode to select the beacon timer mode

Since the beacon timers are global, the individual vif type should not
be used to determine the beacon timer configuration mode, use the
global opmode instead.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: fix beacon slot processing in ad-hoc mode
Felix Fietkau [Sat, 2 Apr 2011 01:39:47 +0000 (03:39 +0200)]
ath9k: fix beacon slot processing in ad-hoc mode

The recent cleanups in the beacon code fixed SWBA backoff calculation,
however it did not remove a line of code that worked around the issues
from the earlier version of the code.
After the cleanup, the initial TSF based slot calculation now always
returns 0 instead of ATH_BCBUF-1, so the previous hack that reversed the
slot order needs to be removed, as ad-hoc mode does not use staggered
beacons.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomwifiex: remove redundant encryption_mode mapping
Yogesh Ashok Powar [Sat, 2 Apr 2011 01:36:47 +0000 (18:36 -0700)]
mwifiex: remove redundant encryption_mode mapping

remove MWIFIEX_ENCRYPTION_MODE_ and use WLAN_CIPHER_SUITE_
macros directly

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: return success in set_default_key for WPA/WPA2
Amitkumar Karwar [Sat, 2 Apr 2011 01:36:46 +0000 (18:36 -0700)]
mwifiex: return success in set_default_key for WPA/WPA2

When testing wpa_supplicant with 'nl80211' driver to connect
to an AP with WPA/WPA2 security, we notice the followings:

1) add_key is called firstly with the key from cfg80211
2) set_defaut_key is called next

set_default_key() is specific to WEP keys and should not be
called in case of WPA/WPA2 security. The set_default_key()
won't be called if wpa_supplicant uses "-Dwext" option,
but it's been called if "-Dnl80211" option is specified.

We can fix this issue by adding a check to return from
set_default_key() if WEP key is not configured.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Marc Yang <yangyang@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agonl80211: Add BSS parameters to station
Paul Stewart [Thu, 31 Mar 2011 16:25:41 +0000 (09:25 -0700)]
nl80211: Add BSS parameters to station

This allows user-space monitoring of BSS parameters for the associated
station.  This is useful for debugging and verifying that the paramaters
are as expected.

[Exactly the same as before but bundled into a single message]

Signed-off-by: Paul Stewart <pstew@chromium.org>
Cc: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlwifi: remove sync_cmd_mutex
Stanislaw Gruszka [Thu, 31 Mar 2011 15:36:28 +0000 (17:36 +0200)]
iwlwifi: remove sync_cmd_mutex

We now use priv->mutex to serialize sync command, remove old
priv->sync_cmd_mutex and add assertion that priv->mutex must be locked.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlwifi: more priv->mutex serialization
Stanislaw Gruszka [Thu, 31 Mar 2011 15:36:27 +0000 (17:36 +0200)]
iwlwifi: more priv->mutex serialization

Check status bits with mutex taken, because when we wait for mutex
unlock, status can change. Patch should also make remaining sync
commands be send with priv->mutex taken. That will prevent execute
these commands when we are currently reset firmware, what could
possibly cause troubles.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlwifi: fix enqueue hcmd race conditions
Stanislaw Gruszka [Thu, 31 Mar 2011 15:36:26 +0000 (17:36 +0200)]
iwlwifi: fix enqueue hcmd race conditions

We mark command as huge by using meta->flags from other (non huge) command,
but flags can be possibly overridden, when non huge command is enqueued,
what can lead to:

WARNING: at lib/dma-debug.c:696 dma_debug_device_change+0x1a3/0x1f0()
DMA-API: device driver has pending DMA allocations while released from device [count=1]

To fix introduce additional CMD_MAPPED to mark command as mapped and
serialize iwl_enqueue_hcmd() with iwl_tx_cmd_complete() using
hcmd_lock. Serialization will also fix possible race conditions,
because q->read_ptr, q->write_ptr are modified/used in parallel.

On the way fix whitespace.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agowireless: rt2x00: rt{2500,73}usb.c fix duplicate ids
Xose Vazquez Perez [Sun, 27 Mar 2011 00:15:53 +0000 (01:15 +0100)]
wireless: rt2x00: rt{2500,73}usb.c fix duplicate ids

based on the Ralink drivers:

W = Windows_ralink_driver
L = Linux_ralink_driver

USB_IDs         W_73  W_2500 L_73  L_2500
=============   ====  ====== ====  ======
0x050d,0x7050   -     -      -     YES
0x050d,0x705a   -     -      YES   -
0x1371,0x9022   -     YES    YES   -
0x148f,0x2573   YES   -      YES   -

Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/padovan/blueto...
John W. Linville [Thu, 7 Apr 2011 19:30:53 +0000 (15:30 -0400)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/padovan/bluetooth-next-2.6

13 years agoar9170usb: purge obsolete driver
Christian Lamparter [Fri, 25 Mar 2011 19:21:55 +0000 (20:21 +0100)]
ar9170usb: purge obsolete driver

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath: add missing regdomain pair 0x5c mapping
Christian Lamparter [Wed, 6 Apr 2011 18:40:31 +0000 (20:40 +0200)]
ath: add missing regdomain pair 0x5c mapping

Joe Culler reported a problem with his AR9170 device:

> ath: EEPROM regdomain: 0x5c
> ath: EEPROM indicates we should expect a direct regpair map
> ath: invalid regulatory domain/country code 0x5c
> ath: Invalid EEPROM contents

It turned out that the regdomain 'APL7_FCCA' was not mapped yet.
According to Luis R. Rodriguez [Atheros' engineer] APL7 maps to
FCC_CTL and FCCA maps to FCC_CTL as well, so the attached patch
should be correct.

Cc: <stable@kernel.org>
Reported-by: Joe Culler <joe.culler@gmail.com>
Acked-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomwl8k: do not free unrequested irq
Brian Cavagnolo [Wed, 6 Apr 2011 08:48:46 +0000 (14:18 +0530)]
mwl8k: do not free unrequested irq

When the mwl8k driver attempts and fails to switch from sta to ap
firmware (or vice-versa) in the mwl8k_add_interface routine, the
mwl8k_stop routine will be called. This routine must not attempt
to free the irq if it was not requested.

Signed-off-by: Brian Cavagnolo <brian@cozybit.com>
Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlagn: override 5300 EEPROM # of chains
Johannes Berg [Tue, 5 Apr 2011 15:55:05 +0000 (08:55 -0700)]
iwlagn: override 5300 EEPROM # of chains

At least EEPROM version 0x11A has the wrong
number of chains programmed into it for some
reason, so we need to override in the driver.

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 agoBluetooth: convert net/bluetooth/ to kstrtox
Alexey Dobriyan [Sat, 2 Apr 2011 11:19:41 +0000 (14:19 +0300)]
Bluetooth: convert net/bluetooth/ to kstrtox

Convert from strict_strto*() interfaces to kstrto*() interfaces.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Use GFP_KERNEL in user context
Gustavo F. Padovan [Mon, 4 Apr 2011 21:56:53 +0000 (18:56 -0300)]
Bluetooth: Use GFP_KERNEL in user context

The allocation in mgmt_control() code are in user context and not locked
by any spinlock, so it's not recommended the use of GFP_ATOMIC there.

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Don't use spin_lock_bh in user context
Gustavo F. Padovan [Mon, 4 Apr 2011 22:06:05 +0000 (19:06 -0300)]
Bluetooth: Don't use spin_lock_bh in user context

spin_lock() and spin_unlock() are more apropiated for user context.

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Use kthread API in cmtp
Szymon Janc [Mon, 21 Mar 2011 13:20:06 +0000 (14:20 +0100)]
Bluetooth: Use kthread API in cmtp

kernel_thread() is a low-level implementation detail and
EXPORT_SYMBOL(kernel_thread) is scheduled for removal.
Use the <linux/kthread.h> API instead.

Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Use kthread API in bnep
Szymon Janc [Mon, 21 Mar 2011 13:20:00 +0000 (14:20 +0100)]
Bluetooth: Use kthread API in bnep

kernel_thread() is a low-level implementation detail and
EXPORT_SYMBOL(kernel_thread) is scheduled for removal.
Use the <linux/kthread.h> API instead.

Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Use kthread API in hidp
Szymon Janc [Tue, 5 Apr 2011 13:37:45 +0000 (15:37 +0200)]
Bluetooth: Use kthread API in hidp

kernel_thread() is a low-level implementation detail and
EXPORT_SYMBOL(kernel_thread) is scheduled for removal.
Use the <linux/kthread.h> API instead.

Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Add mgmt_remote_name event
Johan Hedberg [Wed, 30 Mar 2011 10:18:12 +0000 (13:18 +0300)]
Bluetooth: Add mgmt_remote_name event

This patch adds a new remote_name event to the Management interface
which is sent every time the name of a remote device is resolved (over
BR/EDR).

Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Add mgmt_device_found event
Johan Hedberg [Wed, 30 Mar 2011 20:57:16 +0000 (23:57 +0300)]
Bluetooth: Add mgmt_device_found event

This patch adds a device_found event to the Management interface. For
now the event only maps to BR/EDR inquiry result HCI events, but in the
future the plan is to also use it for the LE device discovery process.

Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Remove gfp_mask param from hci_reassembly()
Gustavo F. Padovan [Mon, 4 Apr 2011 21:25:14 +0000 (18:25 -0300)]
Bluetooth: Remove gfp_mask param from hci_reassembly()

It is unnecessary, once we are always in interrupt context.

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agomac80211: clean up station cleanup timer
Johannes Berg [Fri, 1 Apr 2011 11:52:48 +0000 (13:52 +0200)]
mac80211: clean up station cleanup timer

We currently run this timer exactly once when
a new mac80211 device is registered, but that
is completely pointless since it will have no
work to do at all. Therefore, remove that and
also simplify some code using the timer.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agossb: pci: implement serdes workaround
Rafał Miłecki [Fri, 1 Apr 2011 11:26:52 +0000 (13:26 +0200)]
ssb: pci: implement serdes workaround

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agossb: pci: implement mdio reading
Rafał Miłecki [Fri, 1 Apr 2011 10:07:34 +0000 (12:07 +0200)]
ssb: pci: implement mdio reading

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agossb: pci: fix mdio writes on newer cores (rev 10+)
Rafał Miłecki [Fri, 1 Apr 2011 10:07:33 +0000 (12:07 +0200)]
ssb: pci: fix mdio writes on newer cores (rev 10+)

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agossb: pci: trivial: drop useless pointer
Rafał Miłecki [Fri, 1 Apr 2011 10:07:32 +0000 (12:07 +0200)]
ssb: pci: trivial: drop useless pointer

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agossb: trivial: use u8 for chip_rev (it's mask is 0xF)
Rafał Miłecki [Fri, 1 Apr 2011 10:06:48 +0000 (12:06 +0200)]
ssb: trivial: use u8 for chip_rev (it's mask is 0xF)

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: Use appropriate rx gain table for AR9485
Vasanthakumar Thiagarajan [Fri, 1 Apr 2011 10:02:16 +0000 (15:32 +0530)]
ath9k_hw: Use appropriate rx gain table for AR9485

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomwifiex: remove unused macros in decl.h and main.h
Bing Zhao [Fri, 1 Apr 2011 02:50:14 +0000 (19:50 -0700)]
mwifiex: remove unused macros in decl.h and main.h

These macros are leftover of previous cleanup patches.

Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomwifiex: remove struct mwifiex_802_11_fixed_ies
Bing Zhao [Thu, 31 Mar 2011 01:12:45 +0000 (18:12 -0700)]
mwifiex: remove struct mwifiex_802_11_fixed_ies

struct mwifiex_802_11_fixed_ies is not necessary.
struct mwifiex_event_wep_icv_err is not used any more.

Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomwifiex: cleanup power save related struct and macros
Marc Yang [Thu, 31 Mar 2011 01:12:44 +0000 (18:12 -0700)]
mwifiex: cleanup power save related struct and macros

remove redundant structures and unused macros

Signed-off-by: Marc Yang <yangyang@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoieee80211: add HT extended capabilities masks
Bing Zhao [Thu, 31 Mar 2011 01:01:15 +0000 (18:01 -0700)]
ieee80211: add HT extended capabilities masks

IEEE Std 802.11n, Oct. 29, 2009:
7.3.2.56.5 HT Extended Capabilities field

Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomwifiex: remove unused macros in fw.h
Marc Yang [Tue, 29 Mar 2011 00:55:44 +0000 (17:55 -0700)]
mwifiex: remove unused macros in fw.h

These definitions are no longer used after previous cleanups.

Signed-off-by: Marc Yang <yangyang@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomwifiex: remove unused radio_on variable and macros
Marc Yang [Tue, 29 Mar 2011 00:55:43 +0000 (17:55 -0700)]
mwifiex: remove unused radio_on variable and macros

The radio_on variable is defined but never used.

Signed-off-by: Marc Yang <yangyang@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomwifiex: remove MWIFIEX_AUTH_MODE_ macros
Marc Yang [Tue, 29 Mar 2011 00:55:42 +0000 (17:55 -0700)]
mwifiex: remove MWIFIEX_AUTH_MODE_ macros

replace them with NL80211_AUTHTYPE_ macros

Signed-off-by: Marc Yang <yangyang@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomwifiex: remove MWIFIEX_BSS_MODE_ macros
Bing Zhao [Tue, 29 Mar 2011 00:55:41 +0000 (17:55 -0700)]
mwifiex: remove MWIFIEX_BSS_MODE_ macros

replace them with NL80211_IFTYPE_ macros

Also remove redundant functions mwifiex_drv_get_mode()
and mwifiex_bss_ioctl_mode().

Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Add an error message when trying to send on a full queue
Helmut Schaa [Mon, 28 Mar 2011 11:35:51 +0000 (13:35 +0200)]
rt2x00: Add an error message when trying to send on a full queue

We already tell mac80211 to stop the queue when we hit a certain
threshold. Hence, it shouldn't happen at all that a frame gets queued
for tx on a full queue. Add an error message for this case.

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>
13 years agort2x00: Fix tx aggregation problems with some clients
Helmut Schaa [Mon, 28 Mar 2011 11:35:21 +0000 (13:35 +0200)]
rt2x00: Fix tx aggregation problems with some clients

Some clients seem to rely upon the reception of BlockAckReqs to flush
their rx reorder buffer. In order to fix aggregation for these clients
rt2x00 should send a BlockAckReq if the transmission of an AMPDU
subframe fails.

Introduce a new flag TXDONE_AMPDU to indicate that this is an AMPDU
subframe and pass IEEE80211_TX_STAT_AMPDU_NO_BACK to mac80211 if an
AMPDU subframe failed during transmission.

This fixes aggregation problems with Intel 5100 Windows STAs (and maybe
others as well).

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>
13 years agort2x00: Add support for the ZyXEL NWD-211AN USB
Ivo van Doorn [Mon, 28 Mar 2011 11:34:50 +0000 (13:34 +0200)]
rt2x00: Add support for the ZyXEL NWD-211AN USB

Add new USB ID

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Fix STBC transmissions to STAs with Rx STBC > 1
Helmut Schaa [Mon, 28 Mar 2011 11:34:15 +0000 (13:34 +0200)]
rt2x00: Fix STBC transmissions to STAs with Rx STBC > 1

For STBC transmissions rt2x00 used the number of RxSTBC streams the
destination STA indicates in its HT capabilities as STBC value in
the TXWI.

However, the legacy drivers and our own comment in rt2800.h suggest
that the STBC field in the TXWI only allows a value of 0 or 1.
The values 2 and 3 are reserved (probably for future devices).

And indeed, STBC transmissions to STAs indicating more then 1
RxSTBC stream fail when the STBC field is set to something >1.

Fix this by only setting the STBC field to 1 when STBC should be
used.

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>
13 years agort2x00: Implement tx power temperature compensation
Helmut Schaa [Mon, 28 Mar 2011 11:33:40 +0000 (13:33 +0200)]
rt2x00: Implement tx power temperature compensation

rt2800 devices should adjust their tx power in accordance with the
eeproms temperature calibration values. Add a new driver callback
gain_calibration that is called every 4 seconds.

The rt2800 gain calibration routine simply runs the tx power
configuration that takes care of calculating the temperature
compensation delta.

We don't need to synchronize the calls to rt2800_config_txpower
as they should all happen from mac80211's single threaded workqueue.

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>