]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/log
mirror_ubuntu-disco-kernel.git
13 years agortlwifi: rtl8192se: Merge hardware routines
Chaoming Li [Tue, 3 May 2011 14:48:15 +0000 (09:48 -0500)]
rtlwifi: rtl8192se: Merge hardware routines

Merge routines hw.c and hw.h for RTL8192SE.

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 agortlwifi: rtl8192se: Merge firmware routines
Chaoming Li [Tue, 3 May 2011 14:48:05 +0000 (09:48 -0500)]
rtlwifi: rtl8192se: Merge firmware routines

Merge routines fw.c and fw.h for RTL8192SE. In addition, make changes
to rtlwifi/wifi.h to support RTL8192SE.

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 agortlwifi: rtl8192se: Merge dynamic management routines
Chaoming Li [Tue, 3 May 2011 14:47:55 +0000 (09:47 -0500)]
rtlwifi: rtl8192se: Merge dynamic management routines

Merge routines dm.c and dm.h for RTL8192SE.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Chaoming_Li <chaoming_li@realsil.com.cn>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agortlwifi: rtl8192se: Merge def.h
Chaoming Li [Tue, 3 May 2011 14:47:45 +0000 (09:47 -0500)]
rtlwifi: rtl8192se: Merge def.h

Introduce routine def.h for rtl8192se.

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 agomac80211: Postpond ps timer if tx is stopped by others
Rajkumar Manoharan [Tue, 3 May 2011 11:33:59 +0000 (17:03 +0530)]
mac80211: Postpond ps timer if tx is stopped by others

Whenever the driver's queue depth reaches the max, the queues are
stopped by the driver till the driver can accept the frames.
At the mean time dynamic_ps_timer can be expired due to not
receiving packet from upper layer which could restart the transmission
at the end of ps work. Due to the mismatch with driver state,
mac80211 is unneccesarity buffering all the frames till the driver
wakes up the queue.

Check whether there is no transmit or the tx queues were stopped by some
reasons. If any of the queue was stopped, the postpond ps timer and
do not restart netif_tx.

Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: set TID of internal mgmt packets to 7
Arik Nemtsov [Tue, 3 May 2011 08:53:07 +0000 (11:53 +0300)]
mac80211: set TID of internal mgmt packets to 7

The queue mapping of internal mgmt packets is set to VO. Set the TID
value to match the queue mapping. Otherwise drivers that only look at
the TID might get confused.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: remove aggregation protection mode
Mohammed Shafi Shajakhan [Tue, 3 May 2011 07:44:06 +0000 (13:14 +0530)]
ath9k_hw: remove aggregation protection mode

when aggregation protection mode is enabled the hardware needs
to send RTS/CTS for each HT frame. Currently its disabled so
remove the unused call backs.

Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agolibertas: remove tx_timeout handler
Daniel Drake [Mon, 2 May 2011 20:38:16 +0000 (21:38 +0100)]
libertas: remove tx_timeout handler

As described at http://marc.info/?l=linux-netdev&m=130428493104730&w=2
libertas frequently generates spurious tx timeouts, because the tx
queue is brought down for extended periods during scanning. The net
layer takes a look and incorrectly assumes the queue has been down for
several seconds, and generates a tx_timeout.

One way to fix this is to bump the trans_start counter while scanning
so that the network layer knows that the device is still alive, but
I think the tx_timeout handler is implemented wrongly here and not of
any real use, so I vote to remove it.

As explained at http://marc.info/?l=linux-wireless&m=130430311115755&w=2
the watchdog is primarily meant to deal with lockup on the hardware TX
path (detected by the tx queue being stopped for an extended period of
time), but this is unlikely to happen with libertas. In this case, the tx
queue is stopped only while waiting for lbs_thread to send the queued frame
to the driver, and lbs_thread wakes up the queue immediately after, even
if the frame could not be sent correctly.

So, the only hardware-related possibility that this catches is if
hw_host_to_card hangs - this is something I have never seen. And if it
were to happen, nothing done by lbs_tx_timeout would actually wake up
lbs_thread any quicker than otherwise.

Removing this oddly-behaving spuriously-firing tx_timeout handler should
fix an occasional kernel crash during resume
(http://dev.laptop.org/ticket/10748)

Signed-off-by: Daniel Drake <dsd@laptop.org>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: use wake_queue to restart trasmit
Rajkumar Manoharan [Fri, 29 Apr 2011 09:18:45 +0000 (14:48 +0530)]
mac80211: use wake_queue to restart trasmit

netif_tx_start_all_queues is used to allow the upper layer
to transmit frames but it does not restart transmission.
To restart the trasmission use netif_tx_wake_all_queues.
Not doing so, sometimes stalls the transmission and the
application has to be restarted to proceed further.

This issue was originally found while sending udp traffic
in higer bandwidth in open environment without bgscan.

Cc: stable@kernel.org
Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: Fix drain txq failure in flush
Rajkumar Manoharan [Thu, 28 Apr 2011 10:01:57 +0000 (15:31 +0530)]
ath9k: Fix drain txq failure in flush

While draining the txq in flush, the buffers can be
added into the tx queue by tx_tasklet which leads to
unneccesary chip reset.

This issue was originially found with AR9382 and
running heavy uplink udp traffic with higher bandwidth
and doing frequent bgscan.

Cc: stable@kernel.org
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoMerge branch 'for-linville' of git://git.kernel.org/pub/scm/linux/kernel/git/luca...
John W. Linville [Thu, 5 May 2011 17:56:27 +0000 (13:56 -0400)]
Merge branch 'for-linville' of git://git.kernel.org/pub/scm/linux/kernel/git/luca/wl12xx

13 years agomac80211: Fix a warning due to skipping tailroom reservation for IV
Mohammed Shafi Shajakhan [Thu, 5 May 2011 05:29:24 +0000 (10:59 +0530)]
mac80211: Fix a warning due to skipping tailroom reservation for IV

The devices that require IV generation in software need tailroom
reservation  for ICVs used in TKIP or WEP encryptions.
Currently, decision to skip the tailroom reservation in the tx
path was taken only on whether driver wants MMIC to be generated
in software or not. Following patch appends IV generation check for
such decisions and fixes the following warning.

WARNING: at net/mac80211/wep.c:101 ieee80211_wep_add_iv+0x56/0xf3()
Hardware name: 64756D6
Modules linked in: ath9k ath9k_common ath9k_hw
Pid: 0, comm: swapper Tainted: G        W   2.6.39-rc5-wl
 Call Trace:
[<c102fd29>] warn_slowpath_common+0x65/0x7a
[<c1465c4e>] ? ieee80211_wep_add_iv+0x56/0xf3
[<c102fd4d>] warn_slowpath_null+0xf/0x13
[<c1465c4e>] ieee80211_wep_add_iv+0x56/0xf3
[<c1466007>] ieee80211_crypto_wep_encrypt+0x63/0x88
[<c1478bf3>] ieee80211_tx_h_encrypt+0x2f/0x63
[<c1478cba>] invoke_tx_handlers+0x93/0xe1
[<c1478eda>] ieee80211_tx+0x4b/0x6d
[<c147907c>] ieee80211_xmit+0x180/0x188
[<c147779d>] ? ieee80211_skb_resize+0x95/0xd9
[<c1479edf>] ieee80211_subif_start_xmit+0x64f/0x668
[<c13956fc>] dev_hard_start_xmit+0x368/0x48c
[<c13a8bd6>] sch_direct_xmit+0x4d/0x101
[<c1395ae1>] dev_queue_xmit+0x2c1/0x43f
[<c13a74a2>] ? eth_header+0x1e/0x90
[<c13a7400>] ? eth_type_trans+0x91/0xc2
[<c13a7484>] ? eth_rebuild_header+0x53/0x53
[<c139f079>] neigh_resolve_output+0x223/0x27e
[<c13c6b23>] ip_finish_output2+0x1d4/0x1fe
[<c13c6bc6>] ip_finish_output+0x79/0x7d
[<c13c6cbe>] T.1075+0x43/0x48
[<c13c6e6e>] ip_output+0x75/0x7b
[<c13c4970>] dst_output+0xc/0xe
[<c13c62c9>] ip_local_out+0x17/0x1a
[<c13c67bb>] ip_queue_xmit+0x2aa/0x2f8
[<c138b742>] ? sk_setup_caps+0x21/0x92
[<c13d95ea>] ? __tcp_v4_send_check+0x7e/0xb7
[<c13d5d2e>] tcp_transmit_skb+0x6a1/0x6d7
[<c13d533b>] ? tcp_established_options+0x20/0x8b
[<c13d6f28>] tcp_retransmit_skb+0x43a/0x527
[<c13d8d6d>] tcp_retransmit_timer+0x32e/0x45d
[<c13d8f23>] tcp_write_timer+0x87/0x16c
[<c103a030>] run_timer_softirq+0x156/0x1f9
[<c13d8e9c>] ? tcp_retransmit_timer+0x45d/0x45d
[<c1034d65>] __do_softirq+0x97/0x14a
[<c1034cce>] ? irq_enter+0x4d/0x4d

Cc: Yogesh Powar <yogeshp@marvell.com>
Reported-by: Fabio Rossi <rossi.f@inwind.it>
Tested-by: Fabio Rossi <rossi.f@inwind.it>
Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomwifiex: fix missing tsf_val TLV
Bing Zhao [Mon, 2 May 2011 18:00:45 +0000 (11:00 -0700)]
mwifiex: fix missing tsf_val TLV

In mwifiex_cmd_append_tsf_tlv(), two tsf_val TLVs should be
filled in the buffer and then sent to firmware.

The missing first TLV for tsf_val is added back in this patch.

Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agortlwifi: Fix typo in pci.c
Larry Finger [Mon, 2 May 2011 03:30:54 +0000 (22:30 -0500)]
rtlwifi: Fix typo in pci.c

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Add autowake support for USB hardware
Ivo van Doorn [Sat, 30 Apr 2011 15:18:18 +0000 (17:18 +0200)]
rt2x00: Add autowake support for USB hardware

The USB drivers don't support automatically waking up when in powersaving mode,
add a work object which will wakeup the device in time to receive the next beacon.
Based on that beacon, we either go back into powersaving mode, or we remain awake
to receive the buffered frames for our station.

Some part of the code, especially rt2x00lib_find_ie and rt2x00lib_rxdone_check_ps
are inspired on the code from carl9170.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Introduce capability flag for Bluetooth co-existence.
Gertjan van Wingerde [Sat, 30 Apr 2011 15:15:37 +0000 (17:15 +0200)]
rt2x00: Introduce capability flag for Bluetooth co-existence.

Use flag instead of re-reading the eeprom every time.

Signed-off-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: Streamline rt2800 eeprom initialisations.
Gertjan van Wingerde [Sat, 30 Apr 2011 15:15:13 +0000 (17:15 +0200)]
rt2x00: Streamline rt2800 eeprom initialisations.

In rt2800lib.c the rt2800_init_eeprom function the same eeprom
words were read multiple times, due to inefficient ordering of the
eeprom checks.

Reorder the checks so that each EEPROM word only has to be read once.

Signed-off-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 optimize register access for rt2800pci
Ivo van Doorn [Sat, 30 Apr 2011 15:14:49 +0000 (17:14 +0200)]
rt2x00: Fix optimize register access for rt2800pci

The patch
rt2x00: Optimize register access in rt2800pci
from Helmut Schaa missed one register call, namely
the rt2800_register_multiwrite which should be changed
to rt2x00pci_register_multiwrite.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Optimize TX_STA_FIFO register reading
Ivo van Doorn [Sat, 30 Apr 2011 15:14:23 +0000 (17:14 +0200)]
rt2x00: Optimize TX_STA_FIFO register reading

Add recycling functionality to rt2x00usb_register_read_async.
When the callback function returns true, resubmit the urb to
read the register again.

This optimizes the rt2800usb driver when multiple TX status reports
are pending in the register, because now we don't need to allocate
the rt2x00_async_read_data and urb structure each time.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Reduce tx status reading timeout
Ivo van Doorn [Sat, 30 Apr 2011 15:13:46 +0000 (17:13 +0200)]
rt2x00: Reduce tx status reading timeout

When no TX status was available, the default timeout
of 20ms is a bit high. The frame is highly likely already
send out, so the TX status should be available within
only a few milliseconds.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: consolidate MIC failure report handling
Christian Lamparter [Sat, 30 Apr 2011 13:24:30 +0000 (15:24 +0200)]
mac80211: consolidate MIC failure report handling

Currently, mac80211 handles MIC failures differently
depending on whenever they are detected by the stack's
own software crypto or when are handed down from the
driver.

This patch tries to unify both by moving the special
branch out of mac80211 rx hotpath and into into the
software crypto part. This has the advantage that we
can run a few more sanity checks on the data and verify
if the key type was TKIP. This is very handy because
several devices generate false postive MIC failure
reports. Like carl9170, ath9k and wl12xx:
<http://www.spinics.net/lists/linux-wireless/msg68494.html>
"mac80211: report MIC failure for truncated packets in AP mode"

Cc: Luciano Coelho <coelho@ti.com>
Cc: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agossb: cc: prepare clockmode support for cores rev 10+
Rafał Miłecki [Wed, 27 Apr 2011 15:40:11 +0000 (17:40 +0200)]
ssb: cc: prepare clockmode support for cores rev 10+

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoRevert "wl12xx: support FW TX inactivity triggers"
Luciano Coelho [Mon, 2 May 2011 09:37:33 +0000 (12:37 +0300)]
Revert "wl12xx: support FW TX inactivity triggers"

This reverts commit 47684808fd89d6809c0886e06f8ac324252499d8.

Conflicts:

drivers/net/wireless/wl12xx/conf.h
drivers/net/wireless/wl12xx/main.c

13 years agowl12xx: export driver state to debugfs
Arik Nemtsov [Mon, 18 Apr 2011 11:15:29 +0000 (14:15 +0300)]
wl12xx: export driver state to debugfs

By reading the "driver_state" debugfs value we get all the important
state information from the wl12xx driver. This helps testing and
debugging, particularly in situations where the driver seems "stuck".

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: fix race condition during recovery in AP mode
Arik Nemtsov [Mon, 18 Apr 2011 11:15:28 +0000 (14:15 +0300)]
wl12xx: fix race condition during recovery in AP mode

When operating as AP, the TX queues are not stopped when we start
recovery. mac80211 is notified only after the fact. When there is
pending TX, it will be queued even after the FW is down. This leads to
situations where the TX queues are stopped (because of the TX-watermark
mechanism), and are never woken up when we return from recovery.

Fix this by explicitly stopping the TX queues when before initiating
recovery.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: add debugfs entry for starting recovery
Arik Nemtsov [Mon, 18 Apr 2011 11:15:27 +0000 (14:15 +0300)]
wl12xx: add debugfs entry for starting recovery

This entry is useful for debugging the driver state machine during
recovery.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: AP-mode - reconfigure templates after basic rates change
Arik Nemtsov [Mon, 18 Apr 2011 11:15:26 +0000 (14:15 +0300)]
wl12xx: AP-mode - reconfigure templates after basic rates change

When there's a change in the basic rates of the AP, reconfigure relevant
templates with the new rates.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: AP-mode - overhaul rate policy configuration
Arik Nemtsov [Mon, 18 Apr 2011 11:15:25 +0000 (14:15 +0300)]
wl12xx: AP-mode - overhaul rate policy configuration

Use the minimal rate configured in the basic rates set as the AP
broadcast and multicast rate. The minimal rate is used to ensure weak
links can still communicate.

When the basic rates contains at least one OFDM rate, configure all
unicast TX rates to OFDM only.

Unify rate configuration on initialization and on change notification
into a single function.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: print firmware program counter during recovery
Arik Nemtsov [Mon, 18 Apr 2011 11:15:24 +0000 (14:15 +0300)]
wl12xx: print firmware program counter during recovery

When performing recovery, print the firmware version and program
counter (by reading the SCR_PAD4 register). The value of the firmware
program counter during assert can be useful for debugging.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: schedule recovery on command timeout
Arik Nemtsov [Mon, 18 Apr 2011 11:15:23 +0000 (14:15 +0300)]
wl12xx: schedule recovery on command timeout

We use a long timeout (2 seconds) when sending commands to the FW.
When a command times out, it means the FW is stuck, and we should
commence recovery.

This should make recovery times shorter as we'll recover on the first
timeout indication.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: AP-mode - disable beacon filtering on start up
Arik Nemtsov [Mon, 18 Apr 2011 11:15:22 +0000 (14:15 +0300)]
wl12xx: AP-mode - disable beacon filtering on start up

New AP-mode FWs filter external beacons by default. Disable this
filtering on start up so we can properly configure ERP protection.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: use wiphy values for setting rts, frag thresholds on init
Arik Nemtsov [Mon, 18 Apr 2011 11:15:21 +0000 (14:15 +0300)]
wl12xx: use wiphy values for setting rts, frag thresholds on init

Use the wiphy RTS and fragmentation thresholds for initializing the FW
when possible. This mitigates a bug where previously set values are
forgotten after interface down/up.

Add checks before settings these values to ensure they are valid. Use
default values when invalid thresholds are configured.

Update the default RTS threshold to the maximum value given by the
specification.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: add BT-coexistance for AP
Arik Nemtsov [Mon, 18 Apr 2011 11:15:20 +0000 (14:15 +0300)]
wl12xx: add BT-coexistance for AP

Initialize AP specific BT coexitance parameters to default values and
enable them in AP mode.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: strict_stroul introduced converted to kstrtoul
Luciano Coelho [Fri, 29 Apr 2011 19:25:28 +0000 (22:25 +0300)]
wl12xx: strict_stroul introduced converted to kstrtoul

One new patch applied added a couple of new strict_strtoul calls.
Converted those to kstroul().

Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: do not set queue_mapping directly
Hauke Mehrtens [Tue, 26 Apr 2011 21:27:44 +0000 (23:27 +0200)]
wl12xx: do not set queue_mapping directly

It is preferred to use the setter that to set queue_mapping directly.
This also helps backporting in compat-wireless.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: discard corrupted packets in RX
Arik Nemtsov [Tue, 26 Apr 2011 20:35:40 +0000 (23:35 +0300)]
wl12xx: discard corrupted packets in RX

When packets arrive with a RX descriptor indicating corruption, discard
them.

In general white-list the RX descriptor status to prevent rouge data
from being sent up.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: implement the tx_frames_pending mac80211 callback
Arik Nemtsov [Tue, 26 Apr 2011 20:35:39 +0000 (23:35 +0300)]
wl12xx: implement the tx_frames_pending mac80211 callback

Frames are considered pending when they reside in the driver TX queue or
already queued in the FW.

This notion of "pending" is appropriate for power save considerations in
STA mode, but not necessarily in other modes (for instance P2P-GO).

[Fixed a sparse warning about missing "static" in a function
declaration -- Luca]

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: Enable dynamic memory for 127x
Ido Yariv [Mon, 18 Apr 2011 13:45:10 +0000 (16:45 +0300)]
wl12xx: Enable dynamic memory for 127x

The FW can dynamically manage its internal TX & RX memory pools, moving
blocks from one pool to another when necessary. This can significantly
improve performance. Currently this feature is enabled only for 128x.

Enable dynamic memory for 127x as well. Other parameters in the memory
configuration structure may need to be fine tuned, as the optimal values
for these may change once dynamic memory is enabled.

Signed-off-by: Ido Yariv <ido@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: Restart TX when TX descriptors are available
Ido Yariv [Mon, 18 Apr 2011 13:44:11 +0000 (16:44 +0300)]
wl12xx: Restart TX when TX descriptors are available

The driver stops sending TX packets when either there aren't enough
memory blocks, or it runs out of TX descriptors. The driver continues to
send packets to the FW only when more memory blocks are available.

The FW might free TX descriptors without freeing the corresponding
memory blocks, especially when dynamic memory is enabled. In cases where
memory blocks are not freed at all, the driver will keep waiting for
more memory blocks indefinitely.

Fix this by clearing the WL1271_FLAG_FW_TX_BUSY flag when there are
available TX descriptors.

Signed-off-by: Ido Yariv <ido@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: Modify memory configuration for 128x/AP
Ido Yariv [Mon, 18 Apr 2011 13:40:14 +0000 (16:40 +0300)]
wl12xx: Modify memory configuration for 128x/AP

The 128x/AP firmware does not yet support dynamic memory. Temporarily,
the memory configuration for the 127x was used both for 127x/AP as well
as 128x/AP. Since the two chips don't have the same number of memory
blocks, TP was significantly degraded.

This hasn't been fine tuned yet, but using the base 128x numbers
(without dynamic memory) seems to yield much better results (around 30%
more). Additional fine tuning will be required in the future.

Signed-off-by: Ido Yariv <ido@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: add debugfs entries for dtim_interval and beacon_interval
Eliad Peller [Sun, 17 Apr 2011 08:20:47 +0000 (11:20 +0300)]
wl12xx: add debugfs entries for dtim_interval and beacon_interval

When configuring ACX_WAKE_UP_CONDITIONS (before entering psm), we
tell the firmware to wake up once in N DTIMs/beacons.

Allow control of this value via debugfs (for debugging purposes).

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: Update Power Save Exit Retries Packets
Shahar Levi [Wed, 13 Apr 2011 11:52:50 +0000 (14:52 +0300)]
wl12xx: Update Power Save Exit Retries Packets

Reducing the retries of sending PS exit packets to the peer AP.
That fix is to avoid sending unrealizable number of PS exit packets
in case of ap lost.

Signed-off-by: Shahar Levi <shahar_levi@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: FM WLAN coexistence
Shahar Levi [Mon, 11 Apr 2011 12:41:46 +0000 (15:41 +0300)]
wl12xx: FM WLAN coexistence

Add support to FM WLAN coexistence (STA only).  Some WiFi harmonics
may interfere with FM operation, to avoid this problem special
coexistence techniques are activated around some FM frequencies.

Signed-off-by: Shahar Levi <shahar_levi@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: configure rates when working in ibss mode
Eliad Peller [Thu, 7 Apr 2011 12:52:05 +0000 (15:52 +0300)]
wl12xx: configure rates when working in ibss mode

When working in ibss mode, we don't configure rate policy per station
(as we use the same link for multiple stations), so currently the
1mb/s rate is being used.

Instead, configure the firmware to use the whole 11b rates by default.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: avoid redundant join on interface reconfiguration
Eliad Peller [Tue, 5 Apr 2011 16:13:28 +0000 (19:13 +0300)]
wl12xx: avoid redundant join on interface reconfiguration

ieee80211_reconfig() sets most of the "changed" flags regardless
of the actual change (e.g. BSS_CHANGED_ASSOC will be set even if
the interface is still not associated). in this case the driver
will issue some unneeded commands.

Since the driver relies solely on the BSS_CHANGED_ASSOC flag,
without checking if there was an actual change, it will end up
issuing unjoin() and dummy_join() commands, although it was
never associated and should just remain idle.

Avoid it by checking the actual state change, in addition to the
"changed" flag.

(there seem to be more redundant configuration commands being
issued, but they shouldn't harm)

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: print actual rx packet size (without padding)
Eliad Peller [Tue, 5 Apr 2011 15:21:31 +0000 (18:21 +0300)]
wl12xx: print actual rx packet size (without padding)

When debugging, reduce the padding size from each rx packet, to
get the actual packet size (so comparing it against a cap file
will be easier)

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: Set correct REF CLK and TCXO CLK values to the FW
Shahar Levi [Sun, 3 Apr 2011 10:54:54 +0000 (13:54 +0300)]
wl12xx: Set correct REF CLK and TCXO CLK values to the FW

Fix mismatch between the REF CLK and TCXO CLK information that is
set in the platform data and the NVS, so we override what comes
from the NVS and replace it with what comes from the platform data.

[Small fix in a comment -- Luca]

Signed-off-by: Shahar Levi <shahar_levi@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: avoid premature elp entrance
Eliad Peller [Sat, 2 Apr 2011 23:01:59 +0000 (02:01 +0300)]
wl12xx: avoid premature elp entrance

The elp_work is being enqueued on wl1271_ps_elp_sleep, but doesn't get
cancelled on wl1271_ps_elp_wakeup. This might cause immediate entrance
to elp when the wl->mutex is being released, rather than using the delayed
enqueueing optimization.

Cancel elp_work on wakeup request, and add a new WL1271_FLAG_ELP_REQUESTED
flag to further synchronize the elp actions.

[Fixed a couple of typos in some comments -- Luca]

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: sleep instead of wakeup after tx work
Eliad Peller [Mon, 4 Apr 2011 07:38:47 +0000 (10:38 +0300)]
wl12xx: sleep instead of wakeup after tx work

commit d05c806 ("wl12xx: rearrange some ELP wake_up/sleep calls")
introduced a bug in which wl1271_ps_elp_wakeup() was called instead
of wl1271_ps_elp_sleep() after completing the tx work.

Reported-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: Set End-of-transaction Flag at Wl127x AP Mode
Shahar Levi [Mon, 4 Apr 2011 07:20:39 +0000 (10:20 +0300)]
wl12xx: Set End-of-transaction Flag at Wl127x AP Mode

End-of-transaction flag should be set when working with
wl127x chip on AP mode.

Thanks Ido Yariv <ido@wizery.com> for the guidance with that.

Signed-off-by: Shahar Levi <shahar_levi@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agoiwlagn: remove un-necessary debugfs callback
Wey-Yi Guy [Sat, 30 Apr 2011 16:10:53 +0000 (09:10 -0700)]
iwlagn: remove un-necessary debugfs callback

After driver split, no need for debugfs callback, remove those

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: prefer BSS context
Johannes Berg [Wed, 27 Apr 2011 12:19:34 +0000 (05:19 -0700)]
iwlagn: prefer BSS context

If an interface type changes from a type that is
only supported on the PAN context (e.g. P2P GO)
to a type that is supported on the BSS context,
and the BSS context is not in use, then we need
to use the BSS context instead of changing the
device type within the context. To achieve this,
refuse the type change, which causes a down/up
cycle that will allocate the BSS context for the
interface.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: improve RXON checking
Johannes Berg [Thu, 21 Apr 2011 17:57:23 +0000 (10:57 -0700)]
iwlagn: improve RXON checking

The current RXON checking doesn't verify that
the channel is valid (or at least non-zero),
so add that. Also, add a WARN() so we get a
stacktrace, and capture a bitmask of errors
in order to capture all necessary information
in the warning itself (in case the previous
messages are snipped off.)

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 spectrum measurement header
Johannes Berg [Thu, 21 Apr 2011 14:09:43 +0000 (07:09 -0700)]
iwlagn: remove spectrum measurement header

This header file isn't used, and if we ever need
these definitions they shouldn't be added to a
driver but rather to the common 802.11 include
file that has all frame definitions. Thus, just
remove it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: semaphore and calib cleanup
Don Fry [Wed, 20 Apr 2011 22:25:14 +0000 (15:25 -0700)]
iwlagn: semaphore and calib cleanup

All agn devices use the same eeprom semaphore and calib version routines.
Delete the indirection and move the semaphore routines to where they are
used and make static.

Signed-off-by: Don Fry <donald.h.fry@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: mod param cleanup
Don Fry [Wed, 20 Apr 2011 22:23:57 +0000 (15:23 -0700)]
iwlagn: mod param cleanup

All agn devices use the same module parameter structure.  Delete the
indirection and access the structure diretly.

Signed-off-by: Don Fry <donald.h.fry@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: new 105 series device
Wey-Yi Guy [Sat, 30 Apr 2011 15:55:16 +0000 (08:55 -0700)]
iwlagn: new 105 series device

Correction for new 105 series devices

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: use proper good CRC threshold behaviour
Johannes Berg [Wed, 20 Apr 2011 16:10:39 +0000 (09:10 -0700)]
iwlagn: use proper good CRC threshold behaviour

New microcode versions use the good CRC threshold
field differently, as a flag, and in that case we
should set it to 1/0 instead of 1/65535 for an
active/passive scan.

The new behaviour is advertised by the uCode with
a feature flag.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: connect and disconnect sequence for RXON
Wey-Yi Guy [Tue, 19 Apr 2011 23:52:59 +0000 (16:52 -0700)]
iwlagn: connect and disconnect sequence for RXON

No functional changes, separate the connect and disconnect sequences in
RXON commit function, easier to read and understand.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: remove 5000 from rxon_assoc structure
Wey-Yi Guy [Tue, 19 Apr 2011 23:52:58 +0000 (16:52 -0700)]
iwlagn: remove 5000 from rxon_assoc structure

The data structure is shared by all _agn devices, remove the reference to 5000

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: make rxon_assoc static function
Wey-Yi Guy [Tue, 19 Apr 2011 23:52:57 +0000 (16:52 -0700)]
iwlagn: make rxon_assoc static function

Move rxon_assoc to static function from ops

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: refactor restart
Johannes Berg [Tue, 19 Apr 2011 14:45:16 +0000 (07:45 -0700)]
iwlagn: refactor restart

The WoWLAN resume code will have to essentially
do a restart, but without going through the work
struct. To support that, refactor the restart by
splitting out the preparation code into a new
function.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: introduce silent grabbing of NIC access
Johannes Berg [Tue, 19 Apr 2011 14:42:03 +0000 (07:42 -0700)]
iwlagn: introduce silent grabbing of NIC access

There are a few cases like the WoWLAN support
I'm writing that require attempting to access
the NIC when it is known that it might not be
accessible, e.g. after the system woke up and
the platform might have reset the device.

To avoid messages in this case, introduce the
new function iwl_grab_nic_access_silent(), it
will only return an error status.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: avoid hangs when restarting device
Johannes Berg [Tue, 19 Apr 2011 14:38:23 +0000 (07:38 -0700)]
iwlagn: avoid hangs when restarting device

If a device error happens while the uCode is
being loaded or initialised, we will attempt
to restart the device (which will likely fail
again, but that's not the issue here). During
this new restart, we turn off the device, but
as the uCode failed to initialise it already
is turned off. As a consequence, grabbing NIC
access will fail and cause excessive messages
and hangs.

To fix this issue, introduce a new status bit
and only attempt to reprogram the device when
it isn't already disabled.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agomwl8k: Reducing extra_tx_headroom for tx optimization in AP mode
Yogesh Ashok Powar [Thu, 28 Apr 2011 12:04:48 +0000 (17:34 +0530)]
mwl8k: Reducing extra_tx_headroom for tx optimization in AP mode

The tx_headroom required for mwl8k driver is 32 bytes and it
can use the space for 802.11 header received from mac80211.
mwl8k considers the smallest 802.11 frame (CTS2self of 10
bytes) that can be received from mac80211  to compute the
extra_tx_headroom as 22 (32 - 10) bytes.

When the wireless interface is part of bridge, this
extra_tx_headroom requirement results in a memcpy in
mac80211 (in function pskb_expand_head) for all the data
frames needing L2 forwarding/bridging, when NET_SKB_PAD is
defined as 32. This patch reduces the extra_tx_headroom by
8 bytes so that memcpy of data frames in mac80211 is
avoided in this case.

The resize will be required in driver for frames with 802.11
header size of less than 18 bytes.

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Pradeep Nemavat <pnemavat@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Revamp LED management
Sujith Manoharan [Thu, 28 Apr 2011 10:44:05 +0000 (16:14 +0530)]
ath9k_htc: Revamp LED management

Remove all the convoluted hacks in the driver and simplify things
by making use of mac80211's LED triggers.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlegacy: remove sync_cmd_mutex
Stanislaw Gruszka [Thu, 28 Apr 2011 09:51:33 +0000 (11:51 +0200)]
iwlegacy: 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>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlegacy: more priv->mutex serialization
Stanislaw Gruszka [Thu, 28 Apr 2011 09:51:32 +0000 (11:51 +0200)]
iwlegacy: 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>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlegacy: fix enqueue hcmd race conditions
Stanislaw Gruszka [Thu, 28 Apr 2011 09:51:31 +0000 (11:51 +0200)]
iwlegacy: 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.

Do not change callback, I did (and fixed) that mistake in iwlagn.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlegacy: comment typo fix diable -> disable
Stanislaw Gruszka [Thu, 28 Apr 2011 09:51:30 +0000 (11:51 +0200)]
iwlegacy: comment typo fix diable -> disable

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlegacy: remove scan_tx_antennas
Stanislaw Gruszka [Thu, 28 Apr 2011 09:51:29 +0000 (11:51 +0200)]
iwlegacy: remove scan_tx_antennas

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlegacy: remove unneeded __packed
Stanislaw Gruszka [Thu, 28 Apr 2011 09:51:28 +0000 (11:51 +0200)]
iwlegacy: remove unneeded __packed

struct iwl_queue is not part of firmware interface, so __packed is not
needed. Remove it since is may affect performance.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlegacy: remove unneeded disable_hw_scan check
Stanislaw Gruszka [Thu, 28 Apr 2011 09:51:27 +0000 (11:51 +0200)]
iwlegacy: remove unneeded disable_hw_scan check

We never set STATUS_SCANNING in softwre scanning mode, disable_hw_scan
check is unneeded. Correct debug message while at it.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlegacy: simplify init geos
Stanislaw Gruszka [Thu, 28 Apr 2011 09:51:26 +0000 (11:51 +0200)]
iwlegacy: simplify init geos

Don't need to use conditional as ch->band is already assigned to
IEEE80211_BAND_5GHZ or IEEE80211_BAND_2GHZ

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlegacy: enable only rfkill interrupt when device is down
Stanislaw Gruszka [Thu, 28 Apr 2011 09:51:25 +0000 (11:51 +0200)]
iwlegacy: enable only rfkill interrupt when device is down

Add two below iwlwifi commits to iwlegacy:

commit 554d1d027b19265c4aa3f718b3126d2b86e09a08
Author: Stanislaw Gruszka <sgruszka@redhat.com>
Date:   Thu Dec 23 12:38:21 2010 +0100

    iwlagn: enable only rfkill interrupt when device is down

commit 3dd823e6b86407aed1a025041d8f1df77e43a9c8
Author: Don Fry <donald.h.fry@intel.com>
Date:   Sun Feb 6 09:29:45 2011 -0800

    iwlagn: Re-enable RF_KILL interrupt when down

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlegacy: remove duplicate initialization in iwl4956_down()
Stanislaw Gruszka [Thu, 28 Apr 2011 09:51:24 +0000 (11:51 +0200)]
iwlegacy: remove duplicate initialization in iwl4956_down()

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlagn: fix tx power initialization
Stanislaw Gruszka [Thu, 28 Apr 2011 09:12:10 +0000 (11:12 +0200)]
iwlagn: fix tx power initialization

Since

commit f844a709a7d8f8be61a571afc31dfaca9e779621
Author: Stanislaw Gruszka <sgruszka@redhat.com>
Date:   Fri Jan 28 16:47:44 2011 +0100

    iwlwifi: do not set tx power when channel is changing

we set device tx power during initialization to priv->tx_power_next,
which itself is initialized to minimum power. That changed
default behaviour of driver. Previously we initialized device to
transmit at maximum available power by default. Patch change again
to previous behaviour and cleanup tx power initialization.

Fortunately this is not critical fix, as mac80211 layer setup
tx power lately to 14dB, hence device does not operate at minimal
transmit power all the time.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Dump modal eeprom header for UB91/94/95
Sujith Manoharan [Thu, 28 Apr 2011 08:58:51 +0000 (14:28 +0530)]
ath9k_htc: Dump modal eeprom header for UB91/94/95

Debugfs file location: <debugfs_mnt>/ieee80211/phy#/ath9k_htc/modal_eeprom

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Dump base eeprom header for UB91/94/95
Sujith Manoharan [Thu, 28 Apr 2011 08:58:33 +0000 (14:28 +0530)]
ath9k_htc: Dump base eeprom header for UB91/94/95

Debugfs file location: <debugfs_mnt>/ieee80211/phy#/ath9k_htc/base_eeprom

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.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 [Fri, 29 Apr 2011 19:28:49 +0000 (15:28 -0400)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/padovan/bluetooth-next-2.6

13 years agop54: avoid uninitialized variable warning for freq
John W. Linville [Fri, 29 Apr 2011 19:09:39 +0000 (15:09 -0400)]
p54: avoid uninitialized variable warning for freq

  CC [M]  drivers/net/wireless/p54/eeprom.o
drivers/net/wireless/p54/eeprom.c: In function ‘p54_parse_rssical’:
drivers/net/wireless/p54/eeprom.c:494:8: warning: ‘freq’ may be used uninitialized in this function

Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomwifiex: fix copy-n-paste 'thinko' for tsf_val
John W. Linville [Fri, 29 Apr 2011 19:04:58 +0000 (15:04 -0400)]
mwifiex: fix copy-n-paste 'thinko' for tsf_val

  CC [M]  drivers/net/wireless/mwifiex/join.o
drivers/net/wireless/mwifiex/join.c: In function ‘mwifiex_cmd_802_11_associate’:
drivers/net/wireless/mwifiex/join.c:119:8: warning: ‘tsf_val’ may be used uninitialized in this function
drivers/net/wireless/mwifiex/join.c:103:12: note: ‘tsf_val’ was declared here

Looks like a copy-n-paste error, identical lines are a few lines below
the ones removed, with an actual memcpy to tsf_val in between...

Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: avoid uninitialized variable warnings in phy_n
John W. Linville [Fri, 29 Apr 2011 18:54:27 +0000 (14:54 -0400)]
b43: avoid uninitialized variable warnings in phy_n

  CC [M]  drivers/net/wireless/b43/phy_n.o
drivers/net/wireless/b43/phy_n.c: In function ‘b43_nphy_set_channel’:
drivers/net/wireless/b43/phy_n.c:3848:47: warning: ‘tabent_r2’ may be used uninitialized in this function
drivers/net/wireless/b43/phy_n.c:3849:47: warning: ‘tabent_r3’ may be used uninitialized in this function
drivers/net/wireless/b43/phy_n.c: In function ‘b43_nphy_poll_rssi.clone.14’:
drivers/net/wireless/b43/phy_n.c:2270:6: warning: ‘save_regs_phy$7’ may be used uninitialized in this function
drivers/net/wireless/b43/phy_n.c:2270:6: warning: ‘save_regs_phy$8’ may be used uninitialized in this function

FWIW, the usage of these variables is goverened by checks that match
their initializations.  So, I think these are actually false warnings.
Still, I would rather avoid the warning SPAM...

Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: fix uninitialized var warning for txf2txs
John W. Linville [Fri, 29 Apr 2011 18:35:14 +0000 (14:35 -0400)]
ath5k: fix uninitialized var warning for txf2txs

  CC [M]  drivers/net/wireless/ath/ath5k/reset.o
drivers/net/wireless/ath/ath5k/reset.c: In function ‘ath5k_hw_init_core_clock’:
drivers/net/wireless/ath/ath5k/reset.c:100:51: warning: ‘txf2txs’ may be used uninitialized in this function

Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoBluetooth: Fix updating conn->auth_type in hci_io_capa_request_evt
Johan Hedberg [Thu, 28 Apr 2011 18:29:04 +0000 (11:29 -0700)]
Bluetooth: Fix updating conn->auth_type in hci_io_capa_request_evt

In some circumstances hci_get_auth_req will return a value different
from the current conn->auth_type. In these cases update conn->auth_type
so that when a user confirm request comes it doesn't falsely trigger
auto-accept.

Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Add store_hint parameter to mgmt_new_key
Johan Hedberg [Thu, 28 Apr 2011 18:29:03 +0000 (11:29 -0700)]
Bluetooth: Add store_hint parameter to mgmt_new_key

Even for keys that shouldn't be stored some use cases require the
knowledge of a new key having been created so that the conclusion of a
successful pairing can be made. Therefore, always send the mgmt_new_key
event but add a store_hint parameter to it to indicate to user space
whether the key should be stored or not.

Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Remove old_key_type from mgmt_ev_new_key
Johan Hedberg [Thu, 28 Apr 2011 18:29:02 +0000 (11:29 -0700)]
Bluetooth: Remove old_key_type from mgmt_ev_new_key

User space shouldn't have any need for the old key type so remove it
from the corresponding Management interface event.

Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Fix connection key type updating for buggy controllers
Johan Hedberg [Thu, 28 Apr 2011 18:29:01 +0000 (11:29 -0700)]
Bluetooth: Fix connection key type updating for buggy controllers

If a controller generates a changed combination key as its first key the
connection key type will not be correctly set. In these situations make
sure the update the connection key type when such a buggy controller is
detected.

Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Fix old_key_type logic for non-persistent keys
Johan Hedberg [Thu, 28 Apr 2011 18:29:00 +0000 (11:29 -0700)]
Bluetooth: Fix old_key_type logic for non-persistent keys

Even if there's no previous key stored the connection might still be
secured with a non-persistent key and in that case the key type in the
hci_conn struct should be checked.

Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Fix link key persistent storage criteria
Johan Hedberg [Thu, 28 Apr 2011 18:28:59 +0000 (11:28 -0700)]
Bluetooth: Fix link key persistent storage criteria

Link keys should only be stored if very specific criteria of the
authentication process are fulfilled. This patch essentially copies the
criteria that user space has so far been using to the kernel side so
that the management interface works properly.

Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Fix logic in hci_pin_code_request_evt
Johan Hedberg [Thu, 28 Apr 2011 18:28:58 +0000 (11:28 -0700)]
Bluetooth: Fix logic in hci_pin_code_request_evt

The mgmt_ev_pin_code_request event should not be sent to user space if
the request gets rejected by the kernel due to the pairable flag not
being set.

Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Fix reason code for pairing rejection
Johan Hedberg [Thu, 28 Apr 2011 18:28:57 +0000 (11:28 -0700)]
Bluetooth: Fix reason code for pairing rejection

"Pairing not allowed" is 0x18 and not 0x16.

Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Add confirm_hint parameter to user confirmation requests
Johan Hedberg [Thu, 28 Apr 2011 18:28:56 +0000 (11:28 -0700)]
Bluetooth: Add confirm_hint parameter to user confirmation requests

When accepting a pairing request which fulfills the SSP auto-accept
criteria we need to push the request all the way to the user for
confirmation. This patch adds a new hint to the user_confirm_request
management event so user space can know when to show a numeric
comparison dialog and when to show a simple yes/no confirmation dialog.

Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Fix HCI_CONN_AUTH_PEND flag for all authentication requests
Johan Hedberg [Thu, 28 Apr 2011 18:28:55 +0000 (11:28 -0700)]
Bluetooth: Fix HCI_CONN_AUTH_PEND flag for all authentication requests

The HCI_CONN_AUTH_PEND flag should be set whenever requesting
authentication so that multiple pending requests can't occur.

Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Add variable SSP auto-accept delay support
Johan Hedberg [Thu, 28 Apr 2011 18:28:54 +0000 (11:28 -0700)]
Bluetooth: Add variable SSP auto-accept delay support

Some test systems require an arbitrary delay to the auto-accept test
cases for Secure Simple Pairing in order for the tests to pass.
Previously when this was handled in user space it was worked around by
code modifications and recompilation, but now that it's on the kernel
side it's more convenient if there's a debugfs interface for it.

Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Add automated SSP user confirmation responses
Johan Hedberg [Thu, 28 Apr 2011 18:28:53 +0000 (11:28 -0700)]
Bluetooth: Add automated SSP user confirmation responses

This patch adds automated negative and positive (auto-accept) responses
for Secure Simple Pairing user confirmation requests. The responses are
only sent if the HCI_MGMT flag is set in order not to confuse older user
space versions (without management interface support).

Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agomwifiex: fix bug in mwifiex_save_curr_bcn()
Amitkumar Karwar [Thu, 28 Apr 2011 02:13:13 +0000 (19:13 -0700)]
mwifiex: fix bug in mwifiex_save_curr_bcn()

Since timestamp in beacon buffer keeps changing all the time,
the memcmp check in mwifiex_save_curr_bcn() is redundant.
Remove that memcmp check and also avoid freeing and allocation
of buffer if required beacon buffer size is same as previous one.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomwifiex: HT capability information handling
Amitkumar Karwar [Thu, 28 Apr 2011 02:13:12 +0000 (19:13 -0700)]
mwifiex: HT capability information handling

1) Initialise HT capabilities in cfg80211 properly.
2) Cfg80211 stack may modify "sband->ht_cap" to disable
40Mhz operation in 2.4GHz band (after recent patch
"cfg80211: module_param to disable HT40 in 2.4GHz band")
Therefore read "sband->ht_cap" instead of an adapter variable
"hw_dot_11n_dev_cap" to get HT capabilities.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomwifiex: check firmware capabilities while initialising 5GHz band parameters
Amitkumar Karwar [Thu, 28 Apr 2011 02:13:11 +0000 (19:13 -0700)]
mwifiex: check firmware capabilities while initialising 5GHz band parameters

There are some SD8787 cards which don't support 5GHz band.
Therefore initialise 5GHz band parameters only if hardware
supports the band.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomwl8k: replace rateinfo bitfields with mask and shift macros
John W. Linville [Wed, 27 Apr 2011 19:04:28 +0000 (15:04 -0400)]
mwl8k: replace rateinfo bitfields with mask and shift macros

AFAICT, this driver is claiming that 24 bits of rate info fit into a
16-bit field in the Tx descriptor.  Anyway, the use of bitfields is
frowned-upon for a variety of well-documented reasons...

Signed-off-by: John W. Linville <linville@tuxdriver.com>