1
0
Fork 0
Commit Graph

173633 Commits (209c671db7a917740ab9873d442b10ae7e369937)

Author SHA1 Message Date
Felix Fietkau b4d57adb72 mac80211: fix sta lookup with AP VLAN interfaces and injected frames
When injecting frames, mac80211 currently looks for the first AP
interface that matches the source address of the injected frame.
This breaks when such a frame is directed at a STA that has been moved
to a VLAN. This patch fixes it by using sta_info_get_bss instead of
sta_info_get, which also finds stations belonging to a VLAN interface
of the same BSS as the AP interface.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-01 15:40:08 -05:00
Felix Fietkau 17ad353b8d mac80211: fix monitor mode tx radiotap header handling
When an injected frame gets buffered for a powersave STA or filtered
and retransmitted, mac80211 attempts to parse the radiotap header
again, which doesn't work because it's gone at that point.
This patch adds a new flag for checking the availability of a radiotap
header, so that it only attempts to parse it once, reusing the tx info
on the next call to ieee80211_tx().
This fixes severe issues with rekeying in AP mode.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Cc: stable@kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-01 15:40:08 -05:00
Felix Fietkau 4754ffd68b mac80211: fix sta lookup for received action frames on an AP VLAN
When looking for a matching interface, __ieee80211_rx_handle_packet
loops over all active interfaces, looking for matching stations.
Because AP VLAN interfaces are not processed as part of this loop, it
needs to use sta_info_get_bss instead of sta_info_get in order to find
a STA that has been moved to a VLAN.
This fixes issues with aggregation setup/teardown.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-01 15:40:08 -05:00
Pavel Roskin e0b20f1c67 mac80211: reduce stack usage in sta_agg_status_read()
Use a more compact and readable format for "agg_status" to reduce the
stack frame to less than 1024 bytes.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-01 15:40:07 -05:00
Pavel Roskin 4c82bf8e56 mac80211: reduce stack usage in sta_ht_capa_read()
The maximal size of the "ht_capa" file is 430 bytes.  In most cases,
it's much shorter.  Use a 512 byte long buffer.  1024 bytes is too much
and causes a warning with CONFIG_FRAME_WARN=1024.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-01 15:40:07 -05:00
Rafał Miłecki 9501fefec6 b43: N-PHY: implement setting RF sequence
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-01 15:40:07 -05:00
Rafał Miłecki 52cb5e978f b43: N-PHY: add TX radio setup for newer PHYs
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-01 15:40:06 -05:00
Rafał Miłecki 38bb902921 b43: N-PHY: fix Cal TX IQ LO for newer PHYs
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-01 15:40:06 -05:00
Rafał Miłecki 6e3b15a9e7 b43: N-PHY: add RSSI selection for newer PHYs
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-01 15:40:06 -05:00
Rafał Miłecki 99b82c419b b43: N-PHY: split RSSI selection into two per-PHY-revision functions
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-01 15:40:06 -05:00
Luis R. Rodriguez 09d989d179 cfg80211: add regulatory hint disconnect support
This adds a new regulatory hint to be used when we know all
devices have been disconnected and idle. This can happen
when we suspend, for instance. When we disconnect we can
no longer assume the same regulatory rules learned from
a country IE or beacon hints are applicable so restore
regulatory settings to an initial state.

Since driver hints are cached on the wiphy that called
the hint, those hints are not reproduced onto cfg80211
as the wiphy will respect its own wiphy->regd regardless.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-01 15:40:06 -05:00
Luis R. Rodriguez a2bff2694b cfg80211: avoid flushing the global workqueue for core reg hints
When cfg80211 starts it will send a core regulatory hint. This is
sent to the global workqueue but we force processing of it by
flushing the global workqueue. The flushing was done since
cfg80211 needs last_request to always be populated.

Avoid flushing the global workqueue by processing the work
required immediately instead of putting it into a linked
list and processing it after the flush.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-01 15:40:05 -05:00
Rafał Miłecki ef5127a4d2 b43: N-PHY: add workarounds for gain control
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-01 15:40:05 -05:00
Rafał Miłecki 28fd7daabf b43: N-PHY: update general workarounds
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-01 15:40:05 -05:00
Pavel Roskin 991a0987d9 ath9k: allocate string buffer in read_file_dma() by kmalloc()
Using stack for that causes warnings with CONFIG_FRAME_WARN=1024

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-01 15:40:04 -05:00
Pavel Roskin f643e51d71 ath: make gcc check format arguments of ath_print(), fix all misuses
Numeric channel is hard to get, so it won't be printed.  Replace Mhz
with MHz on the affected lines and add commas as needed.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-01 15:40:04 -05:00
John W. Linville c6c97bdaa3 ps3_gelic_wireless: fix format warning
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-01 09:55:56 -05:00
Reinette Chatre d3a571971e iwlwifi: iwl_power_update_mode always hold mutex
iwl_power_update_mode expects to be called with mutex held, for example to
protect priv->vif. Only one caller currently does not do this, fix this.
Also, add a comment to iwl_power_update_mode to indicate this requirement.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-01-29 11:13:59 -08:00
Johannes Berg 7ae810776a iwlwifi: fix typo in IWL_CCK_RATES_MASK
Due to a typo, the variable contains OFDM
rates as well. The only user doesn't care,
so this change doesn't really do anything
but fix up my confusion.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2010-01-29 11:13:58 -08:00
Johannes Berg 71d75cf9ab iwlwifi: remove unused work structs
auth_work, calibrated_work, update_link_led
and report_work are never used, so remove them.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-01-29 11:13:57 -08:00
Johannes Berg 80676518da iwlwifi: remove bg_up work
There's no need to queue a work struct from
within a work struct, just move the code to
execute directly.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-01-29 11:13:57 -08:00
Johannes Berg 9f1f3ceacb iwlagn: simplify ucode loading
Move the waiting into iwl5000_load_section instead
of duplicating it in the caller.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-01-29 11:13:36 -08:00
Johannes Berg 4d6959219b iwlwifi: no need to test iw_mode in power saving
mac80211 will only enable powersaving for station mode.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-01-29 11:13:36 -08:00
Wey-Yi Guy fac0610870 iwlwifi: update sensitivity calibration data for 1000 series
Update sensitivity range values for 1000 series

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-01-29 11:13:35 -08:00
Wey-Yi Guy 9bead7632a iwlwifi: update sensitivity calibration data for 5x00 series
Update sensitivity range values for 5x00 series

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-01-29 11:13:35 -08:00
Wey-Yi Guy 2494f63cc7 iwlwifi: update sensitivity calibration data for 6x00 series
Update sensitivity range values for 6000 & 6x50 series

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-01-29 11:13:34 -08:00
Johannes Berg 47e28f41dc iwlwifi: fix locking in iwl_mac_add_interface
The corresponding iwl_mac_remove_interface only
acquires the mutex, leading me to believe that
the spinlock is not necessary. However, this
doesn't actually acquire the mutex around the
vif pointer check and assignment, fix that.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-01-29 11:13:34 -08:00
Wey-Yi Guy a7fce6ee8d iwlwifi: sysassert identifier change
Change in uCode to include a unique identifier as part of sysassert,
in order to tell the difference, add the "ADVANCED SYSASSERT" description
when dump nic error to indicate the difference.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-01-29 11:13:33 -08:00
Daniel Halperin 49dcc819b0 iwlwifi: optimize power saving
In hostap AP mode, every time the client sends the AP
a packet the STA_NOTIFY_AWAKE code is sent from mac80211.
This results in a command being sent to the uCode even if
the client was not asleep.

The following simple patch has fixed the issue for me without any
degradation that I can find.

Signed-off-by: Daniel Halperin <dhalperi@cs.washington.edu>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-01-29 11:13:19 -08:00
Vivek Natarajan 1dbfd9d46a ath9k: Handle full sleep in ps_restore.
IDLE PS (Full Sleep) doesn't work when ifconfig up
is done during Idle unassociated state.
Fix this by restoring FULL SLEEP in ps_restore if CONF_IDLE
is set.

Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-01-29 10:43:37 -05:00
Hamish Guthrie f276586a8a ps3_gelic_wireless: fix directed ssid scan
If the association worker requests a directed ssid scan and a bss list
already exists, the directed scan is not done. This patch corrects this
and cleans up a few typos and debug messages.

Signed-off-by: Hamish Guthrie <hamish.guthrie@sonycom.com>
Acked-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-01-28 15:21:57 -05:00
Hamish Guthrie c1596b75c2 ps3_gelic_wireless: Remove PS3 gelic legacy wpa support
The current PS3 gelic wireless driver has support for wireless
extensions. The original PS3 gelic wireless driver exposed a
dedicated API for a dedicated wpa_supplicant driver. This old
API could be enabled with CONFIG_GELIC_WIRELESS_OLD_PSK_INTERFACE,
however, as this is not being used by any distros, and it is being
removed from the driver and from wpa_supplicant.

Signed-off-by: Hamish Guthrie <hamish.guthrie@sonycom.com>
Acked-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-01-28 15:21:56 -05:00
John W. Linville 54233261d5 cfg80211: fix wext-compat for setting rate to 'auto'
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-01-27 15:02:09 -05:00
Larry Finger 22e16e55e3 rtl8187: Add callback for get_tsf
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Acked-by: Hin-Tak Leung <htl10@users.sourceforge.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-01-27 15:02:08 -05:00
Larry Finger da8604757b b43: N PHY: Fix compilation after removal of typdef b43_c32
In the conversion between typedef and struct, two places that needed a "struct"
were missed.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-01-27 15:02:07 -05:00
John W. Linville d2bb8e0281 rtl8180: implement get_tsf op for mac80211
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-01-27 15:02:05 -05:00
John W. Linville d3d5621abf libertas: add comment re: v10 firmware key handling
Comment text suggested by Dan Williams <dcbw@redhat.com> in
<1263952092.4481.2.camel@localhost.localdomain>.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-01-27 15:02:03 -05:00
Luca Verdesca 47db3a677b ath5k: adding LED support for AR5BXB63 cards
With following patch, LED should now work with LiteOn AR5BXB63 mini
pci-e cards.

(Broken patch fixed-up by me...let's hope I did it right! -- JWL)

Signed-off-by: Luca Verdesca <magooz@salug.it>
Acked-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-01-27 15:01:24 -05:00
Johannes Berg 56007a028c mac80211: wait for beacon before enabling powersave
Because DTIM information is required for powersave
but is only conveyed in beacons, wait for a beacon
before enabling powersave, and change the way the
information is conveyed to the driver accordingly.

mwl8k doesn't currently seem to implement PS but
requires the DTIM period in a different way; after
talking to Lennert we agreed to just have mwl8k do
the parsing itself in the finalize_join work.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-01-26 11:53:21 -05:00
Johannes Berg c21dbf9214 cfg80211: export cfg80211_find_ie
This new function (previously a static function
called just "find_ie" can be used to find a
specific IE in a buffer of IEs.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-01-26 11:53:20 -05:00
Zhu Yi 3092ad0544 mac80211: fix NULL pointer dereference when ftrace is enabled
I got below kernel oops when I try to bring down the network interface if
ftrace is enabled. The root cause is drv_ampdu_action() is passed with a
NULL ssn pointer in the BA session tear down case. We need to check and
avoid dereferencing it in trace entry assignment.

BUG: unable to handle kernel NULL pointer dereference
Modules linked in: at (null)
IP: [<f98fe02a>] ftrace_raw_event_drv_ampdu_action+0x10a/0x160 [mac80211]
*pde = 00000000
Oops: 0000 [#1] SMP DEBUG_PAGEALLOC
[...]
Call Trace:
 [<f98fdf20>] ? ftrace_raw_event_drv_ampdu_action+0x0/0x160 [mac80211]
 [<f98dac4c>] ? __ieee80211_stop_rx_ba_session+0xfc/0x220 [mac80211]
 [<f98d97fb>] ? ieee80211_sta_tear_down_BA_sessions+0x3b/0x50 [mac80211]
 [<f98dc6f6>] ? ieee80211_set_disassoc+0xe6/0x230 [mac80211]
 [<f98dc6ac>] ? ieee80211_set_disassoc+0x9c/0x230 [mac80211]
 [<f98dcbb8>] ? ieee80211_mgd_deauth+0x158/0x170 [mac80211]
 [<f98e4bdb>] ? ieee80211_deauth+0x1b/0x20 [mac80211]
 [<f8987f49>] ? __cfg80211_mlme_deauth+0xe9/0x120 [cfg80211]
 [<f898b870>] ? __cfg80211_disconnect+0x170/0x1d0 [cfg80211]

Cc: Johannes Berg <johannes@sipsolutions.net>
Cc: stable@kernel.org
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-01-26 11:52:13 -05:00
Johannes Berg 18c949070b mac80211: fill jiffies/vif on filtered frames
Filtered frames not only need their control information
cleared to avoid wrong checks, but also need to have
jiffies and vif assigned so they can be processed or
expired.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-01-25 16:40:49 -05:00
Rafał Miłecki f2982181e0 b43: N-PHY: use cordic to generate samples
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-01-25 16:40:36 -05:00
Rafał Miłecki 6f98e62a9f b43: update cordic code to match current specs
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-01-25 16:39:03 -05:00
Rafał Miłecki 9865045403 b43: make cordic common (LP-PHY and N-PHY need it)
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-01-25 16:36:31 -05:00
Rafał Miłecki 3ed0fac3b5 b43: N-PHY: fix one bit off in parsing RF Ctrl Override arguments
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-01-25 16:36:29 -05:00
Johannes Berg 723bae7ee4 mac80211: track work started through callbacks
Currently, the remain_on_channel work callback needs
to track in its own data structure whether the work
was just started or not. By reordering some code this
becomes unnecessary, the generic wk->started variable
can still be 'false' on the first invocation and only
be 'true' on actual timeout invocations, so that the
extra variable can be removed.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-01-25 16:36:29 -05:00
Johannes Berg 382b16559d mac80211: fix sw crypto
What a stupid mistake. In

    commit 813d766940
    Author: Johannes Berg <johannes@sipsolutions.net>
    Date:   Sun Jan 17 01:47:58 2010 +0100

        mac80211: move control.hw_key assignment

I inserted code testing the wrong flags field,
which means that the test is almost always true
(it's really testing for the peer's WMM support)
and thus the later parts of the stack assume hw
crypto will be done even if that's not true.

Obviously, that broke software crypto. Maxim
said so specifically, and Jochen probably uses
some cipher that iwl3945 doesn't support in
hardware, which might also explain that Maxim
reports that even hw crypto is broken.

Fix this to test the right flags field.

Reported-by: Maxim Levitsky <maximlevitsky@gmail.com>
Reported-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-01-25 16:36:29 -05:00
Felix Fietkau 1396b231b0 mac80211: fix WARN_ON in the new work code
ieee80211_work_rx_mgmt currently enqueues various management frames,
including deauth and disassoc frames, however the function
ieee80211_work_rx_queued_mgmt does not handle these, as they should
only occur if the AP is buggy. It does emit a WARN_ON when this happens
though, and several users have reported such instances.
Fix the WARN_ON by not queueing such frames in the first place.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-01-25 16:36:28 -05:00
Kalle Valo eb807fb238 mac80211: fix update_tkip_key() documentation about the context
Johannes noticed that I had incorrectly documented the context of
update_tkip_key() driver operation. It must be atomic because all
RX code is run inside rcu critical section.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Kalle Valo <kalle.valo@iki.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-01-25 16:36:28 -05:00