Ido Yariv [Tue, 1 Mar 2011 13:14:42 +0000 (15:14 +0200)]
wl12xx: Switch to level trigger interrupts
The interrupt of the wl12xx is a level interrupt in nature, since the
interrupt line is not auto-reset. However, since resetting the interrupt
requires bus transactions, this cannot be done from an interrupt
context. Thus, requesting a level interrupt would require to disable the
irq and re-enable it after the HW is acknowledged. Since we now request
a threaded irq, this can also be done by specifying the IRQF_ONESHOT
flag.
Triggering on an edge can be problematic in some platforms, if the
sampling frequency is not sufficient for detecting very frequent
interrupts. In case an interrupt is missed, the driver will hang as the
interrupt line will stay high until it is acknowledged by the driver,
which will never happen.
Fix this by requesting a level triggered interrupt, with the
IRQF_ONESHOT flag.
Signed-off-by: Ido Yariv <ido@wizery.com>
Reviewed-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Ido Yariv [Tue, 1 Mar 2011 13:14:41 +0000 (15:14 +0200)]
wl12xx: Switch to a threaded interrupt handler
To achieve maximal throughput, it is very important to react to
interrupts as soon as possible. Currently the interrupt handler wakes up
a worker for handling interrupts in process context. A cleaner and more
efficient design would be to request a threaded interrupt handler. This
handler's priority is very high, and can do blocking operations such as
SDIO/SPI transactions.
Some work can be deferred, mostly calls to mac80211 APIs
(ieee80211_rx_ni and ieee80211_tx_status). By deferring such work to a
different worker, we can keep the irq handler thread more I/O
responsive. In addition, on multi-core systems the two threads can be
scheduled on different cores, which will improve overall performance.
The use of WL1271_FLAG_IRQ_PENDING & WL1271_FLAG_IRQ_RUNNING was
changed. For simplicity, always query the FW for more pending
interrupts. Since there are relatively long bursts of interrupts, the
extra FW status read overhead is negligible. In addition, this enables
registering the IRQ handler with the ONESHOT option.
Signed-off-by: Ido Yariv <ido@wizery.com>
Reviewed-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Ido Yariv [Tue, 1 Mar 2011 13:14:40 +0000 (15:14 +0200)]
wl12xx: Change claiming of the SDIO bus
The SDIO bus is claimed and released for each SDIO transaction. In
addition to the few CPU cycles it takes to claim and release the bus, it
may also cause undesired side effects such as the MMC host stopping its
internal clocks.
Since only the wl12xx_sdio driver drives this SDIO card, it is safe to
claim the SDIO host once (on power on), and release it only when turning
the power off.
This patch was inspired by Juuso Oikarinen's (juuso.oikarinen@nokia.com)
patch "wl12xx: Change claiming of the (SDIO) bus".
Signed-off-by: Ido Yariv <ido@wizery.com>
Reviewed-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Ido Yariv [Tue, 1 Mar 2011 13:14:39 +0000 (15:14 +0200)]
wl12xx: Do end-of-transactions transfers only if needed
On newer hardware revisions, there is no need to write the host's
counter at the end of a RX transaction. The same applies to writing the
number of packets at the end of a TX transaction.
It is generally a good idea to avoid unnecessary SDIO/SPI transfers.
Throughput and CPU usage are improved when avoiding these.
Send the host's RX counter and the TX packet count only if needed, based
on the hardware revision.
[Changed WL12XX_QUIRK_END_OF_TRANSACTION to use BIT(0) -- Luca]
Signed-off-by: Ido Yariv <ido@wizery.com>
Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
Reviewed-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Ido Yariv [Tue, 1 Mar 2011 13:14:38 +0000 (15:14 +0200)]
wl12xx: Reorder data handling in irq_work
The FW has a limited amount of memory for holding frames. In case it
runs out of memory reserved for RX frames, it'll have no other choice
but to drop packets received from the AP. Thus, it is important to
handle RX data interrupts as soon as possible, before handling anything
else.
In addition, since there are enough TX descriptors to go around, it is
better to first send TX frames, and only then handle TX completions.
Fix this by changing the order of function calls in wl1271_irq_work.
Signed-off-by: Ido Yariv <ido@wizery.com>
Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
Reviewed-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Ido Yariv [Sun, 27 Feb 2011 22:16:13 +0000 (00:16 +0200)]
wl12xx: Remove private headers in wl1271_tx_reset
Frames in the tx_frames array include extra private headers, which must
be removed before passing the skbs to ieee80211_tx_status.
Fix this by removing any private headers in wl1271_tx_reset, similar to
how this is done in wl1271_tx_complete_packet.
Signed-off-by: Ido Yariv <ido@wizery.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Ido Yariv [Sun, 27 Feb 2011 22:13:58 +0000 (00:13 +0200)]
wl12xx: Don't rely on runtime PM for toggling power
Runtime PM might not always be enabled. Even if it is enabled in the
running kernel, it can still be temporarily disabled, for instance
during suspend. Runtime PM is opportunistic in nature, and should not be
relied on for toggling power.
In case the interface is removed and re-added while runtime PM is
disabled, the FW will fail to boot, as it is mandatory to toggle power
between boots. For instance, this can happen during suspend in case one
of the devices fails to suspend before the MMC host suspends, but after
mac80211 was suspended. The interface will be removed and reactivated
without toggling the power.
Fix this by calling mmc_power_save_host/mmc_power_restore_host in
wl1271_sdio_power_on/off functions. It will toggle the power to the chip
even if runtime PM is disabled. The runtime PM functions should still be
called to make sure runtime PM does not opportunistically power the chip
off (e.g. after resuming from system suspend).
Signed-off-by: Ido Yariv <ido@wizery.com>
Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Sebastien Jan [Wed, 23 Feb 2011 13:25:16 +0000 (14:25 +0100)]
wl12xx: fix the path to the wl12xx firmwares
In the linux-firmware git tree, the firmwares and the NVS are inside
the ti-connectivity directory. Fix the filenames that the driver
looks for accordingly.
[Fixed commit message and merged with the latest changes. -- Luca]
Signed-off-by: Sebastien Jan <s-jan@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Johannes Berg [Tue, 1 Mar 2011 16:18:26 +0000 (17:18 +0100)]
mac80211: make rate control Kconfig warning depend on mac80211
... Otherwise it is displayed when mac80211 isn't
even turned on, which is completely pointless.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Tue, 1 Mar 2011 12:28:36 +0000 (13:28 +0100)]
b43: N-PHY: rev3+: add static tables
This finally makes TX on OFDM rates possible on my dev with PHY rev 4.
We still have lower performance than wl, but at least speeds around 15M
become possible.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Chaoming Li [Mon, 28 Feb 2011 22:40:28 +0000 (16:40 -0600)]
rtlwifi: Fix error registering rate-control
When a second module such as rtl8192ce or rtl8192cu links to rtlwifi, the attempt
to register a rate-control mechanism fails with the warning shown below. The fix is to
select the RC mechanism when rtlwifi is initialized.
WARNING: at net/mac80211/rate.c:42 ieee80211_rate_control_register+0xc9/0x100 [mac80211]()
Hardware name: HP Pavilion dv2700 Notebook PC
Modules linked in: arc4 ecb rtl8192ce rtl8192cu(+) rtl8192c_common rtlwifi snd_hda_codec_conexant amd74xx(+) ide_core sg mac80211 snd_hda_intel snd_hda_codec i2c_nforce2 snd_pcm snd_timer cfg80211 snd k8temp hwmon serio_raw joydev i2c_core soundcore snd_page_alloc rfkill forcedeth video ac battery button ext3 jbd mbcache sd_mod ohci_hcd ahci libahci libata scsi_mod ehci_hcd usbcore fan processor thermal
Pid: 2227, comm: modprobe Not tainted 2.6.38-rc6-wl+ #468
Call Trace:
[<
ffffffff8104a3da>] ? warn_slowpath_common+0x7a/0xb0
[<
ffffffff8104a425>] ? warn_slowpath_null+0x15/0x20
[<
ffffffffa02de409>] ? ieee80211_rate_control_register+0xc9/0x100 [mac80211]
[<
ffffffffa03b3790>] ? rtl_rate_control_register+0x10/0x20 [rtlwifi]
[<
ffffffffa03ab9c9>] ? rtl_init_core+0x189/0x620 [rtlwifi]
[<
ffffffff811cfff8>] ? __raw_spin_lock_init+0x38/0x70
[<
ffffffffa03b9dea>] ? rtl_usb_probe+0x709/0x82e [rtlwifi]
[<
ffffffffa002a7fd>] ? usb_match_one_id+0x3d/0xc0 [usbcore]
[<
ffffffffa002aae9>] ? usb_probe_interface+0xb9/0x160 [usbcore]
[<
ffffffff8126ed19>] ? driver_probe_device+0x89/0x1a0
[<
ffffffff8126eed3>] ? __driver_attach+0xa3/0xb0
[<
ffffffff8126ee30>] ? __driver_attach+0x0/0xb0
[<
ffffffff8126dd4e>] ? bus_for_each_dev+0x5e/0x90
[<
ffffffff8126e9d9>] ? driver_attach+0x19/0x20
[<
ffffffff8126e5e8>] ? bus_add_driver+0x158/0x290
[<
ffffffff8126f151>] ? driver_register+0x71/0x140
[<
ffffffff811cfff8>] ? __raw_spin_lock_init+0x38/0x70
[<
ffffffffa002a2cc>] ? usb_register_driver+0xdc/0x190 [usbcore]
[<
ffffffffa0013000>] ? rtl8192cu_init+0x0/0x20 [rtl8192cu]
[<
ffffffffa001301e>] ? rtl8192cu_init+0x1e/0x20 [rtl8192cu]
[<
ffffffff810002cf>] ? do_one_initcall+0x3f/0x180
[<
ffffffff8108fd4b>] ? sys_init_module+0xbb/0x200
[<
ffffffff81002c7b>] ? system_call_fastpath+0x16/0x1b
---[ end trace
726271c07a47439e ]---
rtlwifi:rtl_init_core():<0-0> rtl: Unable to register rtl_rc,use default RC !!
ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
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>
Felix Fietkau [Sun, 27 Feb 2011 21:08:01 +0000 (22:08 +0100)]
mac80211: add support for showing the last rx bitrate
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Sun, 27 Feb 2011 21:08:00 +0000 (22:08 +0100)]
cfg80211: add a field for the bitrate of the last rx data packet from a station
Also fix a typo in the STATION_INFO_TX_BITRATE description
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith Manoharan [Sun, 27 Feb 2011 03:50:40 +0000 (09:20 +0530)]
ath9k_htc: Handle BSSID/AID for multiple interfaces
The AID and BSSID should be set in the HW only for the
first station interface or adhoc interface. Also, cancel
the ANI timer in stop() for multi-STA scenario. And finally
configure the HW beacon timers only for the first station
interface.
Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Stanislaw Gruszka [Mon, 28 Feb 2011 13:33:17 +0000 (14:33 +0100)]
iwlwifi: move remaining iwl-agn-rx.c code into iwl-rx.c
There is no need to have separate iwl-agn-rx.c file after iwlegacy
split.
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>
Stanislaw Gruszka [Mon, 28 Feb 2011 13:33:16 +0000 (14:33 +0100)]
iwlwifi: move check health code into iwl-rx.c
Remove check_plcp_health and check_ack_health ops methods, they are
unneeded after iwlegacy driver split. Merge check health code into to
iwl-rx.c and make functions static.
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>
Stanislaw Gruszka [Mon, 28 Feb 2011 13:33:15 +0000 (14:33 +0100)]
iwlwifi: add {ack,plpc}_check module parameters
Add module ack_check, and plcp_check parameters. Ack_check is disabled
by default since is proved that check ack health can cause troubles.
Plcp_check is enabled by default.
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>
Stanislaw Gruszka [Mon, 28 Feb 2011 13:33:14 +0000 (14:33 +0100)]
iwlegacy: fix dma mappings and skbs leak
Fix possible dma mappings and skbs introduced by commit
470058e0ad82fcfaaffd57307d8bf8c094e8e9d7 "iwlwifi: avoid Tx queue
memory allocation in interface down".
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>
Stanislaw Gruszka [Mon, 28 Feb 2011 13:33:13 +0000 (14:33 +0100)]
iwlwifi: fix dma mappings and skbs leak
Since commit commit
470058e0ad82fcfaaffd57307d8bf8c094e8e9d7
"iwlwifi: avoid Tx queue memory allocation in interface down" we do
not unmap dma and free skbs when down device and there is pending
transfer. What in consequence may cause that system hung (waiting
for free skb's) when performing shutdown at iptables module unload.
DMA leak manifest itself following warning:
WARNING: at lib/dma-debug.c:689 dma_debug_device_change+0x15a/0x1b0()
Hardware name: HP xw8600 Workstation
pci 0000:80:00.0: DMA-API: device driver has pending DMA allocations while released from device [count=240]
Modules linked in: iwlagn(-) aes_x86_64 aes_generic fuse cpufreq_ondemand acpi_cpufreq freq_table mperf xt_physdev ipt_REJECT nf_conntrack_ipv4 nf_defrag_ipv4 iptable_filter ip_tables ip6t_REJECT nf_conntrack_ipv6 nf_defrag_ipv6 xt_state nf_conntrack ip6table_filter ip6_tables ipv6 ext3 jbd dm_mirror dm_region_hash dm_log dm_mod uinput hp_wmi sparse_keymap sg wmi microcode serio_raw tg3 arc4 ecb shpchp mac80211 cfg80211 rfkill ext4 mbcache jbd2 sr_mod cdrom sd_mod crc_t10dif firewire_ohci firewire_core crc_itu_t mptsas mptscsih mptbase scsi_transport_sas pata_acpi ata_generic ata_piix ahci libahci floppy nouveau ttm drm_kms_helper drm i2c_algo_bit i2c_core video [last unloaded: iwlagn]
Pid: 9131, comm: rmmod Tainted: G W 2.6.38-rc6-wl+ #33
Call Trace:
[<
ffffffff810649ef>] ? warn_slowpath_common+0x7f/0xc0
[<
ffffffff81064ae6>] ? warn_slowpath_fmt+0x46/0x50
[<
ffffffff812320ab>] ? dma_debug_device_change+0xdb/0x1b0
[<
ffffffff8123212a>] ? dma_debug_device_change+0x15a/0x1b0
[<
ffffffff8149dc18>] ? notifier_call_chain+0x58/0xb0
[<
ffffffff8108e370>] ? __blocking_notifier_call_chain+0x60/0x90
[<
ffffffff8108e3b6>] ? blocking_notifier_call_chain+0x16/0x20
[<
ffffffff812f570c>] ? __device_release_driver+0xbc/0xe0
[<
ffffffff812f5808>] ? driver_detach+0xd8/0xe0
[<
ffffffff812f45d1>] ? bus_remove_driver+0x91/0x100
[<
ffffffff812f6022>] ? driver_unregister+0x62/0xa0
[<
ffffffff8123d5d4>] ? pci_unregister_driver+0x44/0xa0
[<
ffffffffa05632d1>] ? iwl_exit+0x15/0x1c [iwlagn]
[<
ffffffff810ab492>] ? sys_delete_module+0x1a2/0x270
[<
ffffffff81498da9>] ? trace_hardirqs_on_thunk+0x3a/0x3f
[<
ffffffff8100bf42>] ? system_call_fastpath+0x16/0x1b
I still can observe above warning after apply patch, but it is very
hard to reproduce it, and have count=1. Whereas that one is easy to
reproduce using debugfs force_reset while transmitting data, and have
very big counts eg. 240, like quoted here. So count=1 WARNING seems
to be different issue that need to be resolved separately.
v1 -> v2: fix infinity loop bug I made during "for" to "while" loop transition.
v2 -> v3: remove unneeded EXPORT_SYMBOL
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>
Senthil Balasubramanian [Mon, 28 Feb 2011 09:46:47 +0000 (15:16 +0530)]
ath9k: Fix incorrect GPIO LED pin for AR9485
AR9485 doesn't use the default GPIO pin for LED and GPIO 6 is actually
used for this.
Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Sun, 27 Feb 2011 21:26:40 +0000 (22:26 +0100)]
ath9k: use generic mac80211 LED blinking code
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Sun, 27 Feb 2011 21:19:22 +0000 (22:19 +0100)]
p54: fix a NULL pointer dereference bug
If the RSSI calibration table was not found or not parsed properly,
priv->rssi_db will be NULL, p54_rssi_find needs to be able to deal
with that.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Acked-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Alessio Igor Bogani [Mon, 28 Feb 2011 08:11:55 +0000 (09:11 +0100)]
rtlwifi: fix places where uninitialized data is used
drivers/net/wireless/rtlwifi/rtl8192ce/trx.c: In function ‘rtl92ce_rx_query_desc’:
drivers/net/wireless/rtlwifi/rtl8192ce/trx.c:255:5: warning: ‘rf_rx_num’ may be used uninitialized in this function
drivers/net/wireless/rtlwifi/rtl8192ce/trx.c:257:12: warning: ‘total_rssi’ may be used uninitialized in this function
drivers/net/wireless/rtlwifi/rtl8192ce/trx.c:466:6: warning: ‘weighting’ may be used uninitialized in this function
This work was supported by a hardware donation from the CE Linux Forum.
Signed-off-by: Alessio Igor Bogani <abogani@kernel.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Alessio Igor Bogani [Mon, 28 Feb 2011 17:46:44 +0000 (18:46 +0100)]
rtlwifi: Add the missing rcu_read_lock/unlock
===================================================
[ INFO: suspicious rcu_dereference_check() usage. ]
---------------------------------------------------
net/mac80211/sta_info.c:125 invoked rcu_dereference_check() without protection!
other info that might help us debug this:
rcu_scheduler_active = 1, debug_locks = 0
5 locks held by wpa_supplicant/468:
#0: (rtnl_mutex){+.+.+.}, at: [<
c1465d84>] rtnl_lock+0x14/0x20
#1: (&rdev->mtx){+.+.+.}, at: [<
f84b8c2b>] cfg80211_mgd_wext_siwfreq+0x6b/0x170 [cfg80211]
#2: (&rdev->devlist_mtx){+.+.+.}, at: [<
f84b8c37>] cfg80211_mgd_wext_siwfreq+0x77/0x170 [cfg80211]
#3: (&wdev->mtx){+.+.+.}, at: [<
f84b8c44>] cfg80211_mgd_wext_siwfreq+0x84/0x170 [cfg80211]
#4: (&rtlpriv->locks.conf_mutex){+.+.+.}, at: [<
f8506476>] rtl_op_bss_info_changed+0x26/0xc10 [rtlwifi]
stack backtrace:
Pid: 468, comm: wpa_supplicant Not tainted 2.6.38-rc6+ #79
Call Trace:
[<
c108806a>] ? lockdep_rcu_dereference+0xaa/0xb0
[<
f8523d2c>] ? sta_info_get_bss+0x19c/0x1b0 [mac80211]
[<
f8523d62>] ? ieee80211_find_sta+0x22/0x40 [mac80211]
[<
f850661c>] ? rtl_op_bss_info_changed+0x1cc/0xc10 [rtlwifi]
[<
c153671c>] ? __mutex_unlock_slowpath+0x14c/0x160
[<
c153673d>] ? mutex_unlock+0xd/0x10
[<
f8507180>] ? rtl_op_config+0x120/0x310 [rtlwifi]
[<
c10896db>] ? trace_hardirqs_on+0xb/0x10
[<
f8522169>] ? ieee80211_bss_info_change_notify+0xf9/0x1f0 [mac80211]
[<
f8506450>] ? rtl_op_bss_info_changed+0x0/0xc10 [rtlwifi]
[<
f853646f>] ? ieee80211_set_channel+0xbf/0xd0 [mac80211]
[<
f84b5f41>] ? cfg80211_set_freq+0x121/0x180 [cfg80211]
[<
f85363b0>] ? ieee80211_set_channel+0x0/0xd0 [mac80211]
[<
f84b8ceb>] ? cfg80211_mgd_wext_siwfreq+0x12b/0x170 [cfg80211]
[<
f84b87eb>] ? cfg80211_wext_siwfreq+0x9b/0x100 [cfg80211]
[<
c153b98b>] ? sub_preempt_count+0x7b/0xb0
[<
c150f874>] ? ioctl_standard_call+0x74/0x3b0
[<
c1465d84>] ? rtnl_lock+0x14/0x20
[<
f84b8750>] ? cfg80211_wext_siwfreq+0x0/0x100 [cfg80211]
[<
c14568bd>] ? __dev_get_by_name+0x8d/0xb0
[<
c150fddb>] ? wext_handle_ioctl+0x16b/0x180
[<
f84b8750>] ? cfg80211_wext_siwfreq+0x0/0x100 [cfg80211]
[<
c145bc7a>] ? dev_ioctl+0x5ba/0x720
[<
c108a947>] ? __lock_acquire+0x3e7/0x19b0
[<
c1443b0b>] ? sock_ioctl+0x1eb/0x290
[<
c108bfa5>] ? lock_release_non_nested+0x95/0x2f0
[<
c1443920>] ? sock_ioctl+0x0/0x290
[<
c114d74d>] ? do_vfs_ioctl+0x7d/0x5c0
[<
c1112232>] ? might_fault+0x62/0xb0
[<
c113e3c6>] ? fget_light+0x226/0x390
[<
c1112278>] ? might_fault+0xa8/0xb0
[<
c114dd17>] ? sys_ioctl+0x87/0x90
[<
c1002f9f>] ? sysenter_do_call+0x12/0x38
This work was supported by a hardware donation from the CE Linux Forum.
Signed-off-by: Alessio Igor Bogani <abogani@kernel.org>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Dan Carpenter [Sat, 26 Feb 2011 01:56:53 +0000 (04:56 +0300)]
iwlwifi: remove duplicate initialization
rate_mask is initialized again later so this can be removed. Btw, if
rate_control_send_low(sta, priv_sta, txrc) returns false, that means
that "sta" is non-NULL. That's why the second initialization of
rate_mask is a little simpler than the first.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Gustavo F. Padovan [Sat, 26 Feb 2011 01:41:25 +0000 (22:41 -0300)]
Bluetooth: Fix BT_L2CAP and BT_SCO in Kconfig
If we want something "bool" built-in in something "tristate" it can't
"depend on" the tristate config option.
Report by DaveM:
I give it 'y' just to make it happen, for both, and afterways no
matter how many times I rerun "make oldconfig" I keep seeing things
like this in my build:
scripts/kconfig/conf --silentoldconfig Kconfig
include/config/auto.conf:986:warning: symbol value 'm' invalid for BT_SCO
include/config/auto.conf:3156:warning: symbol value 'm' invalid for BT_L2CAP
Reported-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
John W. Linville [Mon, 28 Feb 2011 19:05:38 +0000 (14:05 -0500)]
Merge branch 'wireless-next-2.6' of git://git./linux/kernel/git/iwlwifi/iwlwifi-2.6
John W. Linville [Fri, 25 Feb 2011 20:38:09 +0000 (15:38 -0500)]
at76c50x-usb: fix warning caused by at76_mac80211_tx now returning void
CC [M] drivers/net/wireless/at76c50x-usb.o
drivers/net/wireless/at76c50x-usb.c: In function ‘at76_mac80211_tx’:
drivers/net/wireless/at76c50x-usb.c:1759:4: warning: ‘return’ with a value, in function returning void
This is fallout from commit
7bb4568372856688bc070917265bce0b88bb7d4d
("mac80211: make tx() operation return void").
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Wey-Yi Guy [Sat, 19 Feb 2011 01:23:54 +0000 (17:23 -0800)]
iwlagn: enable BT session 2 type UART for 2000 series
For 2000 series device, use session 2 type of BT UART message
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Wey-Yi Guy [Tue, 22 Feb 2011 16:24:22 +0000 (08:24 -0800)]
iwlagn: split BT page and inquiry UART msg
Both inquiry and page was combine in frame7 of UART message, separate it
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Wey-Yi Guy [Sat, 19 Feb 2011 01:23:52 +0000 (17:23 -0800)]
iwlagn: add BT Session Activity 2 UART message (BT -> WiFi)
additional UART message defines
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Wey-Yi Guy [Sat, 19 Feb 2011 01:23:51 +0000 (17:23 -0800)]
iwlagn: add bt config structure support for 2000 series
2000 series has different bt config command structure, add support for it
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Wey-Yi Guy [Sat, 19 Feb 2011 01:23:50 +0000 (17:23 -0800)]
iwlagn: name change for BT config command
No functional changes, name changes to reflect the structure used by
6000 series.
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
John W. Linville [Fri, 25 Feb 2011 20:51:01 +0000 (15:51 -0500)]
iwlegacy: change some symbols duplicated from iwlwifi directory
drivers/net/wireless/iwlegacy/built-in.o:(.rodata+0x29f0): multiple definition of `iwl_rates'
drivers/net/wireless/iwlwifi/built-in.o:(.rodata+0xa68): first defined here
powerpc64-linux-ld: Warning: size of symbol `iwl_rates' changed from 143 in drivers/net/wireless/iwlwifi/built-in.o to 130 in drivers/net/wireless/iwlegacy/built-in.o
drivers/net/wireless/iwlegacy/built-in.o:(.data+0x0): multiple definition of `bt_coex_active'
drivers/net/wireless/iwlwifi/built-in.o:(.data+0x668): first defined here
drivers/net/wireless/iwlegacy/built-in.o:(.rodata+0x750): multiple definition of `iwl_eeprom_band_1'
drivers/net/wireless/iwlwifi/built-in.o:(.rodata+0x27d0): first defined here
drivers/net/wireless/iwlegacy/built-in.o:(.rodata+0x3f0): multiple definition of `iwl_bcast_addr'
drivers/net/wireless/iwlwifi/built-in.o:(.rodata+0x24f8): first defined here
drivers/net/wireless/iwlegacy/built-in.o:(.bss+0x3d48): multiple definition of `iwl_debug_level'
drivers/net/wireless/iwlwifi/built-in.o:(.bss+0x21950): first defined here
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Fri, 25 Feb 2011 14:36:57 +0000 (15:36 +0100)]
mac80211: support direct offchannel TX offload
For devices supported by iwlwifi sometimes
off-channel transmissions need to be handled
by the device completely. To support this
mac80211 needs to pass the frame directly
to the driver and not through the TX path
as the driver needs the frame and channel
information at the same time.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Stanislaw Gruszka [Fri, 25 Feb 2011 13:46:02 +0000 (14:46 +0100)]
mac80211: better fix for conn_mon_timer running after disassociate
Is still possible to schedule conn_mon_timer after disassociate from
ieee80211_sta_tx_notify() and ieee80211_offchannel_ps_disable().
Move disassociate check to ieee80211_sta_reset_conn_monitor() to cover
all these cases, and add unlikely since in most the time we call
ieee80211_sta_reset_conn_monitor() when associated.
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Vivek Natarajan [Fri, 25 Feb 2011 12:01:03 +0000 (17:31 +0530)]
ath9k: Fix compilation warning.
Initialize txq to avoid this warning:
drivers/net/wireless/ath/ath9k/main.c: In function ‘ath9k_flush’:
drivers/net/wireless/ath/ath9k/main.c:2138: warning: ‘txq’ may be used uninitialized in this function
Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Vivek Natarajan [Fri, 25 Feb 2011 12:01:02 +0000 (17:31 +0530)]
ath9k: Cancel pll_work while disabling radio.
pll_work should be cancelled on full_sleep or it may cause
redundant chip reset.
Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Vivek Natarajan [Fri, 25 Feb 2011 12:01:01 +0000 (17:31 +0530)]
ath9k_hw: Fix pcie_serdes setting for AR9485 1.1 version.
Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Fri, 25 Feb 2011 11:34:11 +0000 (12:34 +0100)]
b43: fill PHY ctl word1 in TX header for N-PHY
This patch fixes tramissing on OFDM rates for PHYs 1 and 2. There is
still something wrong with PHYs 3+. Tests has shown decreasing of
performance on CCK rates by 1-2%, we have to live with that.
Additionaly this noticeably reduces amount of PHY errors. They were
mostly produced by auto-switching to higher rate for better
performanced, which resulted in no transmit at all and PHY errors.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Fri, 25 Feb 2011 11:24:11 +0000 (12:24 +0100)]
iwlagn: fix iwlagn_check_needed_chains
This function was intended to calculate the
number of RX chains needed, but could only
work where the AP's streams were asymmetric,
i.e. 2 TX and 3 RX or similar. In the case
where IEEE80211_HT_MCS_TX_RX_DIFF was not
set, this function would calculate the wrong
information.
Additionally, mac80211 didn't pass through
the required values at all, so it couldn't
work anyway.
Rewrite the logic in this function and add
appropriate comments to make it readable.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Fri, 25 Feb 2011 11:24:10 +0000 (12:24 +0100)]
mac80211: copy peer MCS TX parameters
We need to copy this to allow drivers to look
at the information where needed.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Joe Gunn [Fri, 25 Feb 2011 10:08:49 +0000 (02:08 -0800)]
orinoco: Drop scan results with unknown channels
If the frequency can not be mapped to a channel structure log it and drop it.
Signed-off-by: Joseph J. Gunn <armadefuego@yahoo.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Thu, 24 Feb 2011 13:46:13 +0000 (14:46 +0100)]
mac80211: remove IBSS merge delay
This reverts
4a332a38
("mac80211: Give it some time to do the TSF sync").
There's no point in waiting with a new IBSS merge
just because the hardware hasn't merged up with
the old IBSS yet, and since
34e8f082 we no longer
attempt to merge with the IBSS we're already in.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Thu, 24 Feb 2011 13:42:06 +0000 (14:42 +0100)]
mac80211: make tx() operation return void
The return value of the tx operation is commonly
misused by drivers, leading to errors. All drivers
will drop frames if they fail to TX the frame, and
they must also properly manage the queues (if they
didn't, mac80211 would already warn).
Removing the ability for drivers to return a BUSY
value also allows significant cleanups of the TX
TX handling code in mac80211.
Note that this also fixes a bug in ath9k_htc, the
old "return -1" there was wrong.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Tested-by: Sedat Dilek <sedat.dilek@googlemail.com> [ath5k]
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> [rt2x00]
Acked-by: Larry Finger <Larry.Finger@lwfinger.net> [b43, rtl8187, rtlwifi]
Acked-by: Luciano Coelho <coelho@ti.com> [wl12xx]
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Stanislaw Gruszka [Thu, 24 Feb 2011 13:23:55 +0000 (14:23 +0100)]
iwlegacy: do not set tx power when channel is changing
Same fix as
f844a709a7d8f8be61a571afc31dfaca9e779621
"iwlwifi: do not set tx power when channel is changing".
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>
Christian Lamparter [Thu, 24 Feb 2011 13:12:20 +0000 (14:12 +0100)]
p54: implement set_coverage_class
The callback sets slot time as specified in IEEE 802.11-2007
section 17.3.8.6 and raises round trip delay accordingly.
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Thu, 24 Feb 2011 19:39:05 +0000 (20:39 +0100)]
rtl8192c: fix compilation errors
On my G5 this fails to compile with
drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c:701: error: __ksymtab__rtl92c_phy_txpwr_idx_to_dbm causes a section type conflict
drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c:701: error: __ksymtab__rtl92c_phy_txpwr_idx_to_dbm causes a section type conflict
drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c:677: error: __ksymtab__rtl92c_phy_dbm_to_txpwr_Idx causes a section type conflict
drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c:677: error: __ksymtab__rtl92c_phy_dbm_to_txpwr_Idx causes a section type conflict
since you can't export static functions.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Larry Finger [Wed, 23 Feb 2011 16:24:58 +0000 (10:24 -0600)]
rtlwifi: rtl8192ce: rtl8192cu: Fix multiple def errors for allyesconfig build
As noted by Stephan Rothwell, an allyesconfig build fails since rtl8192cu
was merged with failures such as:
drivers/net/wireless/rtlwifi/rtl8192cu/built-in.o: In function `rtl92c_phy_sw_chnl':
(.opd+0xf30): multiple definition of `rtl92c_phy_sw_chnl'
drivers/net/wireless/rtlwifi/rtl8192ce/built-in.o:(.opd+0xb70): first defined here
drivers/net/wireless/rtlwifi/rtl8192cu/built-in.o: In function `rtl92c_fill_h2c_cmd':
(.opd+0x288): multiple definition of `rtl92c_fill_h2c_cmd'
drivers/net/wireless/rtlwifi/rtl8192ce/built-in.o:(.opd+0x288): first defined here
These are caused because the code shared between rtl8192ce and rtl8192cu
is included in both drivers. This has been fixed by creating a new modue that
contains the shared code.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Willy Tarreau [Sun, 20 Feb 2011 10:43:36 +0000 (11:43 +0100)]
rtlwifi: Eliminate udelay calls with too large values
On ARM, compilation of rtlwifi/efuse.c fails with the message:
ERROR: "__bad_udelay" [drivers/net/wireless/rtlwifi/rtlwifi.ko] undefined!
On inspection, the faulty calls are in routine efuse_reset_loader(), a
routine that is never used, and the faulty routine is deleted.
Signed-off-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Willy Tarreau [Sun, 20 Feb 2011 10:43:07 +0000 (11:43 +0100)]
rtlwifi: Let rtlwifi build when PCI is not enabled
On systems where PCI does not exist, a build of rtlwifi will fail.
Apply the same fix in case there are systems with PCI but not USB.
Signed-off-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Willy Tarreau [Sun, 20 Feb 2011 10:35:48 +0000 (11:35 +0100)]
rtl8192cu: fix build error (vmalloc/vfree undefined)
On the ARM system, a build fails due to missing include.
Signed-off-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Willy Tarreau [Sun, 20 Feb 2011 10:35:26 +0000 (11:35 +0100)]
rtlwifi: Fix build when RTL8192CU is selected, but RTL8192CE is not
The wireless Makefile does not build rtlwifi for rtl8192cu unless
rtl8192ce is selected.
Signed-off-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Wed, 23 Feb 2011 14:06:08 +0000 (15:06 +0100)]
mac80211: rename RX_FLAG_TSFT
The flag isn't very descriptive -- the intention
is that the driver provides a TSF timestamp at
the beginning of the MPDU -- make that clearer
by renaming the flag to RX_FLAG_MACTIME_MPDU.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Vivek Natarajan [Wed, 23 Feb 2011 07:34:32 +0000 (13:04 +0530)]
mac80211: Fix a race on enabling power save.
There is a race on sending a data frame before the tx completion
of nullfunc frame for enabling power save. As the data quickly
follows the nullfunc frame, the AP thinks that the station is out
of power save and continues to send the frames. Whereas in the
station, the nullfunc ack will be processed after the tx completion
of data frame and mac80211 goes to powersave. Thus the power
save state mismatch between the station and the AP causes some
data loss and some applications fail because of that. This patch
fixes this issue.
Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Mon, 21 Feb 2011 18:45:35 +0000 (19:45 +0100)]
b43: N-PHY: rev1: restore PHY state after RSSI operations
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Mon, 21 Feb 2011 18:45:34 +0000 (19:45 +0100)]
b43: N-PHY: rev1: enable some gain ctl workarounds
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Mon, 21 Feb 2011 18:38:58 +0000 (19:38 +0100)]
b43: N-PHY: fix 0x2055 radio workaround condition
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith Manoharan [Mon, 21 Feb 2011 02:20:38 +0000 (07:50 +0530)]
ath9k_htc: Fix error path in URB allocation
ath9k_hif_usb_alloc_urbs() takes care of freeing
all the allocated URBs for the various endpoints when
an error occurs. Calling ath9k_hif_usb_dealloc_urbs() would
cause a panic since the URBs have already been freed.
Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith Manoharan [Mon, 21 Feb 2011 02:20:30 +0000 (07:50 +0530)]
ath9k_htc: Add debug code to print endpoint mapping
Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith Manoharan [Mon, 21 Feb 2011 02:20:23 +0000 (07:50 +0530)]
ath9k_htc: Fix RX filters
Add ATH9K_RX_FILTER_UNCOMP_BA_BAR and ATH9K_RX_FILTER_PSPOLL
when mac80211 requires it.
Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith Manoharan [Mon, 21 Feb 2011 02:20:15 +0000 (07:50 +0530)]
ath9k_htc: Fix host RX initialization
There is no need to set the BSSID mask or opmode when
initializing RX, they would be set correctly in the HW reset
routine.
Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith Manoharan [Mon, 21 Feb 2011 02:20:01 +0000 (07:50 +0530)]
ath9k_htc: Fix TBTT calculation for IBSS mode
The target beacon transmission time has to be synced with the HW
TSF when configuring beacon timers in Adhoc mode. Failing to do this
would cause erroneous beacon transmission, for example, on completion
of a scan run to check for IBSS merges.
Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith Manoharan [Mon, 21 Feb 2011 02:19:53 +0000 (07:49 +0530)]
ath9k_htc: Configure beacon timers in AP mode
Handle multi-interface situations by checking if
AP interfaces are already present.
Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith Manoharan [Mon, 21 Feb 2011 02:19:38 +0000 (07:49 +0530)]
ath9k_htc: Add ANI for AP mode
The time granularity for the ANI task is different for AP and
station mode.
Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith Manoharan [Mon, 21 Feb 2011 02:19:31 +0000 (07:49 +0530)]
ath9k_htc: Calculate and set the HW opmode
Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith Manoharan [Mon, 21 Feb 2011 02:19:23 +0000 (07:49 +0530)]
ath9k_htc: Allow AP interface to be created
Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith Manoharan [Mon, 21 Feb 2011 02:19:15 +0000 (07:49 +0530)]
ath9k_htc: Maintain individual counters for interfaces
This is required for allowing only one IBSS interface to be
configured.
Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith Manoharan [Mon, 21 Feb 2011 02:19:08 +0000 (07:49 +0530)]
ath9k_htc: Protect ampdu_action with a mutex
This is required when issuing commands to the firmware.
Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith Manoharan [Mon, 21 Feb 2011 02:19:00 +0000 (07:49 +0530)]
ath9k_htc: Use VIF from the packet's control data
There is no need to use a locally stored reference.
Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith Manoharan [Mon, 21 Feb 2011 02:18:53 +0000 (07:48 +0530)]
ath9k_htc: Make sequence number calculation per-VIF
Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith Manoharan [Mon, 21 Feb 2011 02:18:46 +0000 (07:48 +0530)]
ath9k_htc: Set the BSSID mask for multiple interfaces
Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith Manoharan [Mon, 21 Feb 2011 02:18:39 +0000 (07:48 +0530)]
ath9k_htc: Remove OP_ASSOCIATED variable
mac80211 stores the association state in ieee80211_bss_conf.
Use this and remove the local state, which is incorrect anyway
since it is stored globally and not on a per-VIF basis.
Restarting ANI and reconfiguration of HW beacon timers when a
scan run ends requires more work. This is handled by iterating
over the active interfaces.
Finally, remove the useless check for associated status in RX
processing.
Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith Manoharan [Mon, 21 Feb 2011 02:18:31 +0000 (07:48 +0530)]
ath9k_htc: Remove OP_PROTECT_ENABLE
CTS protection can be obtained from mac80211 directly.
Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith Manoharan [Mon, 21 Feb 2011 02:18:24 +0000 (07:48 +0530)]
ath9k_htc: Remove OP_PREAMBLE_SHORT
mac80211's BSS info can be used for this.
Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith Manoharan [Mon, 21 Feb 2011 02:18:16 +0000 (07:48 +0530)]
ath9k_htc: Fix error handling in add_interface
Addition of a station might fail - handle this error
properly by removing the VAP on the target.
Also, bail out immediately if the max. no of interfaces
has been reached.
Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith Manoharan [Mon, 21 Feb 2011 02:18:09 +0000 (07:48 +0530)]
ath9k_htc: Unify target capability updating
Update capabilites on the target once, when
start() is called, there is no need for redundant
updating on adding an interface.
Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith Manoharan [Mon, 21 Feb 2011 02:18:00 +0000 (07:48 +0530)]
ath9k_htc: Allow upto two simultaneous interfaces
Multiple interfaces can be configured if a slot is free
on the target. Monitor mode also requires a slot.
The maximum number of stations that can be handled in
the firmware is 8, manage the station slots accordingly.
Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith Manoharan [Mon, 21 Feb 2011 02:17:52 +0000 (07:47 +0530)]
ath9k_htc: Handle storage devices
Some AR7010 based devices are recognized as storage media.
Sending a CD-EJECT command to the device will 'convert' it into
a WLAN device. Do this within the driver itself, removing the
dependancy on an external program (usb_modeswitch).
Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Nishant Sarmukadam [Thu, 17 Feb 2011 22:45:18 +0000 (14:45 -0800)]
mwl8k: Invert tx queues for set_hw_spec and set_edca_params
mac80211 and mwl8k FW tx queue priorities map inversely to each other.
Fix this.
Signed-off-by: Pradeep Nemavat <pnemavat@marvell.com>
Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Tested-by: Pradeep Nemavat <pnemavat@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Nishant Sarmukadam [Thu, 17 Feb 2011 22:45:17 +0000 (14:45 -0800)]
mwl8k: Tell mac80211 we have rate adaptation in FW
All mwl8k parts perform rate control in firmware. Make this known to
mac80211 so that it does not launch minstrel. Also, because actual tx
rate information is not available from the firmware, invalidate the
rate status before returning the skb to mac80211.
Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Nishant Sarmukadam [Thu, 17 Feb 2011 22:45:16 +0000 (14:45 -0800)]
mwl8k: fix rf_antenna rx argument for AP
When configuring rx antennas using CMD_RF_ANTENNA, the argument input is
the number of antennas to be enabled. For AP, we support 3 rx antennas
and hence set the field to 3. For tx antennas, value is a bitmap, so 0x7
enables all three.
Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: Pradeep Nemavat <pnemavat@marvell.com>
Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
John W. Linville [Wed, 23 Feb 2011 21:23:00 +0000 (16:23 -0500)]
Merge branch 'for-linville' of git://git./linux/kernel/git/luca/wl12xx
John W. Linville [Wed, 23 Feb 2011 21:22:36 +0000 (16:22 -0500)]
Merge branch 'wireless-next-2.6' of git://git./linux/kernel/git/iwlwifi/iwlwifi-2.6
Arik Nemtsov [Tue, 22 Feb 2011 22:22:31 +0000 (00:22 +0200)]
wl12xx: AP-mode - management of links in PS-mode
Update the PS mode of each link according to a bitmap polled from
fw_status. Manually notify mac80211 about PS mode changes in connected
stations.
mac80211 will only be notified about PS start when the station is in PS
and there is a small number of TX blocks from this link ready in HW.
This is required for waking up the remote station since the TIM is
updated entirely by FW.
When a station enters mac80211-PS-mode, we drop all the skbs in the
low-level TX queues belonging to this sta with STAT_TX_FILTERED
to keep our queues clean.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Arik Nemtsov [Tue, 22 Feb 2011 22:22:30 +0000 (00:22 +0200)]
wl12xx: AP-mode - count free FW TX blocks per link
Count the number of FW TX blocks allocated per link. We add blocks to a
link counter when allocated for a TX descriptor. We remove blocks
according to counters in fw_status indicating the number of freed blocks
in FW. These counters are polled after each IRQ.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Arik Nemtsov [Tue, 22 Feb 2011 22:22:29 +0000 (00:22 +0200)]
wl12xx: AP mode - fix bug in cleanup of wl1271_op_sta_add()
Remove an active hlid when chip wakeup fails. In addition rename the
involved functions.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Arik Nemtsov [Tue, 22 Feb 2011 22:22:28 +0000 (00:22 +0200)]
wl12xx: AP-mode - support HW based link PS monitoring
When operating in AP mode the wl1271 hardware filters out null-data
packets as well as management packets. This makes it impossible for
mac80211 to monitor the PS mode by using the PM bit of incoming frames.
Disable mac80211 automatic link PS-mode handling by supporting
IEEE80211_HW_AP_LINK_PS in HW flags.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Arik Nemtsov [Tue, 22 Feb 2011 22:22:27 +0000 (00:22 +0200)]
wl12xx: report invalid TX rate when returning non-TX-ed skbs
Report a TX rate idx of -1 and count 0 when returning untransmitted
skbs to mac80211 using ieee80211_tx_status(). Otherwise mac80211
tries to use the returned (essentially garbage) status.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Arik Nemtsov [Tue, 22 Feb 2011 22:22:26 +0000 (00:22 +0200)]
wl12xx: AP-mode - TX queue per link in AC
When operating in AP-mode we require a per link tx-queue.
This allows us to implement HW assisted PS mode for links,
as well as regulate per-link FW TX blocks consumption.
Split each link into ACs to support future QoS for AP-mode.
AC queues are emptied in priority and per-link queues are
scheduled in a simple round-robin fashion.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Arik Nemtsov [Tue, 22 Feb 2011 22:22:25 +0000 (00:22 +0200)]
wl12xx: AP-mode - fix race condition on sta connection
If a sta starts transmitting immediately after authentication, sometimes
the FW deauthenticates it. Fix this by marking the sta "in-connection"
in FW before sending the autentication response.
The "in-connection" entry is automatically removed when connection
succeeds or after a timeout.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Arik Nemtsov [Tue, 22 Feb 2011 22:22:24 +0000 (00:22 +0200)]
wl12xx: fix potential race condition with TX queue watermark
Check the conditions for the high/low TX queue watermarks when the
spin-lock is taken. This prevents race conditions as tx_queue_count and
the flag checked are only modified when the spin-lock is taken.
The following race was in mind:
- Queues are almost full and wl1271_op_tx() will stop the queues, but it
doesn't get the spin-lock yet.
- (on another CPU) tx_work_locked() dequeues 15 skbs from this queue and
tx_queue_count is updated to reflect this
- wl1271_op_tx() does not check tx_queue_count after taking the
spin-lock and incorrectly stops the queue.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Eliad Peller [Tue, 22 Feb 2011 22:27:07 +0000 (00:27 +0200)]
wl12xx: always set mac_address when configuring ht caps
The mac_address should be set also when ht caps are disabled.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Eliad Peller [Tue, 22 Feb 2011 22:27:06 +0000 (00:27 +0200)]
wl12xx: use standard ALIGN() macro
Use the standard ALIGN() macro instead of redefining similar macros.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Eliad Peller [Wed, 2 Feb 2011 09:20:05 +0000 (11:20 +0200)]
wl12xx: declare support for IEEE80211_HW_REPORTS_TX_ACK_STATUS
The wl12xx fw supports ack status reporting for tx frames, so
add the IEEE80211_HW_REPORTS_TX_ACK_STATUS flag to our supported
features.
Since we do the rate control in the fw, we'll probably want
to adjust the STA_LOST_PKT_THRESHOLD heuristics in the future, to
account for retransmissions as well.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Luciano Coelho [Tue, 22 Feb 2011 12:19:28 +0000 (14:19 +0200)]
wl12xx: fix MODULE_AUTHOR email address
Change my old email address to the new one in MODULE_AUTHOR.
Signed-off-by: Luciano Coelho <coelho@ti.com>
Arik Nemtsov [Sat, 12 Feb 2011 21:24:20 +0000 (23:24 +0200)]
wl12xx: avoid blocking while holding rcu lock on bss info change
Some blocking functions were called while holding the rcu lock for
accessing STA information. This can lead to a deadlock.
Save the required info beforehand and release the rcu without
blocking.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Eliad Peller [Wed, 9 Feb 2011 10:25:14 +0000 (12:25 +0200)]
wl12xx: fix identification of beacon packets (debug)
for debugging purposes, wl12xx determines whether a rx packet
is a beacon packet.
however, it checks only the frame_control subtype without checking
the actual packet type, which leads to false identification in some
cases.
use ieee80211_is_beacon instead.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Gery Kahn [Tue, 1 Feb 2011 09:03:08 +0000 (03:03 -0600)]
wl12xx: update PLT initialization for new firmware
In revision > 6.1.3.0.0 the firmware expects memory configuration command
as part of boot. This was missing if driver boots in PLT mode.
The patch adds the memory configuration command, which fixes PLT commands
tx continuous and rx statistics.
Signed-off-by: Gery Kahn <geryk@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Dan Carpenter [Mon, 7 Feb 2011 16:47:42 +0000 (19:47 +0300)]
wl12xx: change type from u8 to int
ret is used to store int types. Using an u8 will break the error
handling.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>