dect
/
linux-2.6
Archived
13
0
Fork 0
Commit Graph

4217 Commits

Author SHA1 Message Date
Jouni Malinen 7ec3e514d9 ath9k: Add workaround to recover from failed channel changes
It looks like channel change may fail in some cases and end up leaving
the hardware in state where it cannot transmit any frames. Add a
workaround to recover from this state if we detect that wiphy
selection is failing due to wiphys not leaving PAUSING state.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:47 -05:00
Jouni Malinen ee166a0e71 ath9k: Check virtual wiphy state on tx()
mac80211 should not be requesting us to transmit frames on paused
wiphys since we stop the TX queues. Just in case, add debug code to
make sure we catch if this were to happen.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:47 -05:00
Jouni Malinen 18eb62f87a ath9k: Pause other virtual wiphys on channel change
For now, allow channel changes immediately and just force the other
virtual wiphys to paused state. This is needed to allow
mac80211-controlled scan to control channel changes.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:46 -05:00
Jouni Malinen 465ca84d95 ath9k: Register larger listen interval
Notify the AP that we may be sleeping longer to allow the AP power
save code to buffer larger number of frames for us when using virtual
wiphys.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:46 -05:00
Jouni Malinen 9580a222b8 ath9k: Make start/stop operations aware of virtual wiphys
Instead of always going through initialization/deinitialization steps,
do this only for the first/last wiphy to not break the other wiphys.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:46 -05:00
Jouni Malinen 0e2dedf971 ath9k: Add routines for switching between active virtual wiphys
ath9k_wiphy_select() can be used to select a virtual wiphy to be
activated. Other virtual wiphys will be paused and once that is done,
the operational channel is changed and the wiphys that are on the
selected channel will be unpaused.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:46 -05:00
Jouni Malinen f0ed85c6c7 ath9k: Virtual wiphy pause/unpause functionality
Allow virtual wiphys to be paused/unpaused to allow off-channel
operations. Pause will stop all TX queues for the wiphy and move the
STA into power save mode if in managed mode. Unpause wakes up the TX
queues and notifies the AP that the STA woke up if in managed mode.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:45 -05:00
Jouni Malinen b93bce2a5e ath9k: Configure RX filter for multi-BSSID broadcast
Allow RX filter to pass through all broadcast/multicast frames (i.e.,
no BSSID filtering) if virtual interfaces are used. Software filtering
will be used in this case to drop broadcast/multicast frames for
foreign BSSIDs.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:45 -05:00
Jouni Malinen c52f33d05e ath9k: Add support for multiple secondary virtual wiphys
The new struct ath_softc::sec_wiphy array is used to store information
about virtual wiphys and select which wiphy is used in calls to
mac80211. Each virtual wiphy will be assigned a different MAC address
based on the virtual wiphy index.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:45 -05:00
Jouni Malinen bce048d77d ath9k: Add data structure for supporting virtual radio/wiphy operation
This is the initial step in allowing ath9k to register multiple
virtual radios (wiphys). The goal of virtual radios is to allow the
same radio to be shared for multiple virtual interfaces that may
operate on different channels. The mac80211 virtual interface support
is designed only for single channel operation and as such, it is not
suitable for this type of use. Anyway, it can be used on top of the
virtual radio concept, if desired (e.g., use two virtual radios to
handle two channels and then add multiple mac80211 virtual interfaces
on top of each virtual radio).

The new struct ath_wiphy is now registered as the driver data
structure for wiphy. This structure has a pointer to the shared (among
virtual wiphys of the same physical radio) struct ath_softc data. The
primary wiphy maintains the allocated memory for ath_softc. Secondary
(virtual) wiphys will only allocate the new ath_wiphy structure.

Registration of secondary wiphys is added in a separate patch.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:44 -05:00
Jouni Malinen 8ca21f0185 ath9k: Set BSSID mask based on configured interfaces
Instead of using a hardcoded BSSID mask (mask for own addresses),
iterate through all active interfaces and determine the minimal mask
that covers all local addresses.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:44 -05:00
Jouni Malinen 2c3db3d51e ath9k: Cleanup multiple VIF processing
Replace the internal sc_vaps array and index values by using vif
pointer from mac80211. Allow multiple VIPs to be registered. Though,
number of beaconing VIFs is still limited by ATH_BCBUF (currently
1). Multiple virtual STAs support is not yet complete, but at least
the data structures should now be able to handle this.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:44 -05:00
Ivo van Doorn 860559fe68 rt2x00: Export all register stats through debugfs
By exporting the register base, and word size to userspace
through debugfs it will be easier to create scripts which
parse the register information. This makes debugging and
register dumps information easier.

This will break my previous scripts which dumped and parsed
all information, but since this is only for debugging purposes
this change should not be a problem.

Dumpfiles created with the old version can be easily manually
edited to make them compatible with this new approach, which
means there will be no problems comparing dumps from the
different versions either.

Also be more consistent with using tabs to seperate different
fields.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:44 -05:00
Jouni Malinen d216aaa674 ath9k: Clean up setkey operations
There is no need to use ath_keyset() wrapper for
ath9k_hw_set_keycache_entry() calls. In addition, improve the comments
describing the key setting operations.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:43 -05:00
Gabor Juhos aebe2b5624 ath9k: fix AR_TXCFG_DMASZ_MASK value
The current bitmask is invalid, because the tx dma size is a 3 bit wide
value.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:43 -05:00
Sujith b75bc150af ath9k: Remove unused variables in struct ath_beacon_config
We don't store the beacon timestamp internally, nor
do we do any TIM handling in ath9k.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:43 -05:00
Sujith 2554935b08 ath9k: Lock config_interface() callback with a mutex
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:42 -05:00
Sujith b238e90e99 ath9k: Handle TSF properly for AP mode
The TSF has to be reset only once, upon bringing
the interface up in AP mode. For any beacon reconfigure calls
after that, resetting the TSF results in incorrect beacon generation.
The only exception is a change in the beacon interval,
which is indicated to the driver by mac80211 through
IEEE80211_CONF_CHANGE_BEACON_INTERVAL, handle this properly.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:42 -05:00
Sujith 5379c8a266 ath9k: Split beacon configuration into mode specific routines
This makes the code easier to understand.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:42 -05:00
Sujith 9546aae086 ath9k: Cleanup beacon stuck processing
We never use SC_OP_NO_RESET, it is not configurable at all.
Remove all code that deals with this flag and make beacon
stuck processing simple.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:41 -05:00
Sujith 9fc9ab0a69 ath9k: Scrub beacon.c
Remove useless comments, fix indentation.
Also, remove all occurrences of ASSERT(vif) which are not needed.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:41 -05:00
Sujith 0c98de6535 ath9k: Use new scan notifiers from mac80211
The only use case for this right now is ANI calibration,
but more might come up in the future.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:41 -05:00
Alina Friedrichsen 0ad65bd7e1 ath5k: Set TSF fix
The old code doesn't work correctly e.g. on newer chipsets like AR5418+AR2122 and AR5416+AR2133.

Signed-off-by: Alina Friedrichsen <x-alina@gmx.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:40 -05:00
Alina Friedrichsen b9a1619763 ath9k: Set TSF fix
The old code doesn't work correctly e.g. on newer chipsets like AR5418+AR2122 and AR5416+AR2133.

Signed-off-by: Alina Friedrichsen <x-alina@gmx.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:40 -05:00
Michael Buesch ce4fbdbf16 b43: Pass more RX flags to mac80211
This changes the RX handler to pass more status flags to mac80211.
It also changes part of the drop policy, if bad frames were requested. (Note that
currently mac80211 will throw a WARN_ON in that case. But nothing bad will happen).

This also removes some obsolete unused timestamping code.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:40 -05:00
Alina Friedrichsen 91ed19f5f6 ath9k: Fix FIF_BCN_PRBRESP_PROMISC handling
So that a new created IBSS network
doesn't break on the first scan.

It seems to Sujith and me that this
stupid code unnecessary, too.

So remove it...

Signed-off-by: Alina Friedrichsen <x-alina@gmx.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:39 -05:00
Vivek Natarajan 541d8dd5e8 ath9k: Handle power modes in isr for power save.
Restore network sleep mode in isr if power save is enabled.

Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:39 -05:00
Sujith 9331ec8060 ath9k: Fill in rate_update mac80211 callback
This callback can be used to handle dynamic 20/40,
and changes in the operating channel's HT parameters.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:39 -05:00
Jouni Malinen e0caf9eaae ath9k: Remove unused key xoring
This is not used anywhere in ath9k and is just making the code more
confusing.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:38 -05:00
Jouni Malinen 672903b329 ath9k: Document keycache operations
There are number of small details about the keycache operations that
are very easy to miss (and forget), so better include detailed
comments in ath9k_hw_set_keycache_entry() to avoid having to figure
out this every time when having to touch this area.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:38 -05:00
Frank Seidel a412c8040d iwlwifi: reduce stack size
Reduce stack memory footprint of iwlwifi.
(From >1000 bytes for each *_table_read
on i386 down to 32)

Signed-off-by: Frank Seidel <frank@f-seidel.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:37 -05:00
Ivo van Doorn 64abd80330 rt2x00: Fix SW antenna diversity
Software antenna tuning is broken because of an function
ordering problem during rt2x00link_tuner().

rt2x00link_precalculate_signal()
rt2x00leds_led_quality()
rt2x00lib_antenna_diversity()

rt2x00link_precalculate_signal() will reset the quality TX/RX counters,
however rt2x00lib_antenna_diversity() requires the RX counter to
see what RSSI value must be used for a particular antenna.
We can't change the ordering since rt2x00lib_antenna_diversity() might
reset other statistics which are needed by the function called earlier.

Move the reset of the quality TX/RX counters into a seperate function
and move the call to after rt2x00lib_antenna_diversity().

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:37 -05:00
Abhijeet Kolekar 14d2aac580 iwl3945 : use iwl_activate_qos
3945 can use iwl_activate_qos instead of iwl3945_activate_qos.
Patch does two things
1) Patch adds iwl_activate_qos in core library.
2) 3945 makes use of iwl_activate_qos.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:36 -05:00
Abhijeet Kolekar 2a4ddaabe0 iwl3945: add iwl3945_setup_mac
Patch does following,
1) mac80211's shared data is now initialized in iwl3945_setup_mac.
2) Set the rfkill to right state after initialization

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:36 -05:00
Reinette Chatre c8f16138b5 iwlwifi: fix *pci_probe error flow
for iwlagn:
- Have to free eeprom of version check fails - otherwise we end up with
  memory leak.
- Include removal of workqueue (created in _setup_deferred_work) in error
  handling.

for iwl3945:
- Fix a few places to jump to correct error handling.
- Reorganize error handling to match with code flow.
- Include iwl_free_channel_map as part of error handling.
- Include releasing eeprom as part of error handling.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:36 -05:00
Abhijeet Kolekar 6e21f15cac iwl3945: unify set key flow with iwlwifi
unify the set key flow with iwlwifi.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Acked-by: Samuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:36 -05:00
Abhijeet Kolekar 7c4cbb6ee0 iwl3945: synchronize timestamp with uCode
In IBSS, TSF maintains local clock counters at each station. Network
Synchronization follows a completely distributed scheme where beacon frames
are generated. Each station maintain its own TSF timestamp, extracted from
beacon timestamps they recieved. Following patch synchronize this beacon timestamp
with uCode.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:35 -05:00
Jay Sternberg 39e6d2256b iwlwifi: update 5150 API version to support new firmware
update API to support new numbering that is used for other newer devices.
5150 ucode has not been released yet, so the first released API will be v2.
For those who do have a v1 API the driver does have backward compatibility
support new value of REPLY_TX_POWER_DBM_CMD

Signed-off-by: Jay Sternberg <jay.e.sternberg@linux.intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:35 -05:00
Jiri Slaby db5b4f7ae3 ath5k: fix hw rate index condition
Make sure we print out a warning when the index is out of bounds,
i.e. even on hw_rix == AR5K_MAX_RATES.

Also change to WARN and print text with the reported hw_rix.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Nick Kossifidis <mickflemm@gmail.com>
Cc: Luis R. Rodriguez <lrodriguez@atheros.com>
Cc: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:32 -05:00
Jouni Malinen 3f53dd64f1 ath9k: Fix hw crypto configuration for TKIP in AP mode
Incorrect Michael MIC key (RX, should have been TX) was set for the
group key in AP mode. This resulted in all broadcast frames triggering
Michael MIC errors and eventual TKIP countermeasures. The change here
sets the correct Michael MIC key based on whether the local end is the
authenticator (well, AP for now).

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Tested-by: Pat Erley <pat-lkml@erley.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:31 -05:00
Frank Seidel 998a5a7d6a airo: reduce stack memory footprint
Applying kernel janitors todos (reduce stack
footprint where possible) to airo wireless driver.
(Before 1124 bytes on i386, now 876)

Signed-off-by: Frank Seidel <frank@f-seidel.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:31 -05:00
Roel Kluin b837e606d1 wireless, wavelan: spin off by 1
spin can reach -1 after the loop, so 0 is still success.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:31 -05:00
Vasanthakumar Thiagarajan fa09632b02 ath9k: Remove ununsed ack duration stuff with long/short preamble
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:31 -05:00
Vasanthakumar Thiagarajan f40154e7f7 ath9k: Configure Power control register appropriately for h/w with 4k eeprom
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:30 -05:00
Alina Friedrichsen 5fe73197d3 zd1211rw: Implement get_tsf()
This patch implements get_tsf() of ieee80211_ops in the zd1211rw driver.

Signed-off-by: Alina Friedrichsen <x-alina@gmx.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:30 -05:00
Jouni Malinen b3bd89ce95 ath9k: Add module parameter to disable hardware crypto
nohwcrypt=1 module parameter can now be used to disable hardware
crypto in ath9k. While the hardware acceleration handles most cases,
it may be useful to be able to force mac80211 software implementation
to be used for some tests, e.g., with virtual interface combinations
that may not yet be supported in the key cache configuration. In
addition, this allows management frame protection to be tested with
older hardware revisions.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 14:39:30 -05:00
Reinette Chatre 623d563e52 iwlwifi: fix error flow in iwl*_pci_probe
Both the agn and 3945 drivers has some problems with dealing with
errors in their probe functions. Ensure that a goto will undo only
things that was done before the goto was called.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 13:43:06 -05:00
Xose Vazquez Perez ef4bb70d87 rt2x00 : more devices to rt73usb.c
add more usb_dev to rt73usb.c . IDs 'stolen' from the
windows inf file(10/21/2008, 1.03.02.0000) plus some
from the Ralink linux driver(2009_0206_RT73_Linux_STA_Drv1.1.0.2.tar.bz2)

Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 13:43:05 -05:00
Xose Vazquez Perez 9eb77ab076 rt2x00 : more devices to rt2500usb.c
add more usb_dev to rt2500usb.c . IDs 'stolen' from the
windows inf file(02/12/2009, 2.01.01.0015).

Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-05 13:43:05 -05:00
David S. Miller aa4abc9bcc Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
	drivers/net/wireless/iwlwifi/iwl-tx.c
	net/8021q/vlan_core.c
	net/core/dev.c
2009-03-01 21:35:16 -08:00
David S. Miller 18963caaf5 Merge branch 'master' of /home/davem/src/GIT/linux-2.6/ 2009-02-28 15:36:58 -08:00
Kalle Valo 2a07954b83 at76c50x-usb: use dev_name() instead of struct device.bus_id
Stephen Rothwell reported that bus_id from struct device will be removed, use
dev_name() instead.

Signed-off-by: Kalle Valo <kalle.valo@iki.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:53:05 -05:00
Jouni Malinen 222d0b33b3 ath9k: Unlock sc->mutex on error path
An error path in ath9k_add_interface() did not unlock the sc->mutex and
could leave the driver in quite unresponsive state.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:53:04 -05:00
John Daiker 99da185a72 b43: checkpatch.pl cleanups
Keeping this one simple.

Changing a few "foo * bar" to "foo *bar"

Removes 22 checkpatch.pl errors, with no introduced warnings.

Signed-off-by: John Daiker <daikerjohn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:53:04 -05:00
Jason Andryuk ddcb5c78e8 iwl3945: re-add iwl_poll_direct_bit return value check
Re-add the iwl_poll_direct_bit return value assignment dropped in
"iwl3945: add apm ops".

Signed-off-by: Jason Andryuk <jandryuk@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:53:04 -05:00
Jason Andryuk c2436980d0 iwl3945: initialize is_valid_rtc_data_addr function pointer
Initialize is_valid_rtc_data_addr function pointer for iwl3945 to
prevent a NULL pointer dereference in iwl_dump_nic_error_log.

Signed-off-by: Jason Andryuk <jandryuk@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:53:03 -05:00
Michael Buesch 53b23b88e4 b43: Remove bogus integer truncation warnings
"warning: large integer implicitly truncated to unsigned type"

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:53:03 -05:00
Bob Copeland 204b190cab ath9k: fix 802.11g conformance test limit typo
802.11g is in 2 ghz band, not 5 ghz.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Acked-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:53:02 -05:00
David Kilroy 3faa19cd9d orinoco: prevent accessing memory outside the firmware image
Do this by indicating the end of the appropriate regions of memory.

Note that MAX_PDA_SIZE should only apply to the PDA block read from
flash/EEPROM, and has been erronously applied to the pdr elements.
Remove the macro, and use the actual PDA size passed down by the caller.

We also fix up some of the types used, marking as much as possible
const, and using void* for the end pointers.

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:53:02 -05:00
David Kilroy 7e57811ac5 orinoco: validate firmware header
Check the Agere firmware headers for validity before attempting to
download it.

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:53:02 -05:00
Kalle Valo ba3907e508 at76c50x-usb: add link to the TODO list
It's easier to have the TODO list in wiki, so add a link to the list.

Signed-off-by: Kalle Valo <kalle.valo@iki.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:53:01 -05:00
Jason Andryuk 1cc198fee9 at76c50x-usb: additional disconnect fixes
Additional attempts to fix Oops on disconnect, that appear to be successful.
However, some may be extraneous.

The cancel_delayed_work call is probably the most necessary.  The
device_unplugged check may not be necessary.  del_timer_sync may not
be necessary either, but the Oops I was receiving was related to
timers.  Hence the addition.

Signed-off-by: Jason Andryuk <jandryuk@gmail.com>
Signed-off-by: Kalle Valo <kalle.valo@iki.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:53:01 -05:00
Jason Andryuk 5a2137ddcc at76c50x-usb: clean up DMA on stack
Cleanup dma on stack issues:

- no DMA on stack
- cleanup unclear endianness issue

Corrected version of Oliver Neukum's original patch for at76_usb.

Signed-off-by: Jason Andryuk <jandryuk@gmail.com>
Signed-off-by: Kalle Valo <kalle.valo@iki.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:53:01 -05:00
Jason Andryuk deda862e69 at76c50x-usb: fix oops on disconnect
flush_workqueue needs to be called instead of the generic one and the
associated functions need to be modified to prevent re-adding
themselves to the workqueue.

The rx_tasklet is also killed in the small (?) chance it is scheduled.

Signed-off-by: Jason Andryuk <jandryuk@gmail.com>
Signed-off-by: Kalle Valo <kalle.valo@iki.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:53:00 -05:00
Luis R. Rodriguez 8454086967 ath9k: follow beacon hints on reg_notifier when world roaming
If we are roaming we allow to follow beacon hints.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:59 -05:00
Luis R. Rodriguez fe33eb3908 cfg80211: move all regulatory hints to workqueue
All regulatory hints (core, driver, userspace and 11d) are now processed in
a workqueue.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:57 -05:00
Michael Buesch 5f9724dd94 b43: Convert usage of b43_radio_maskset()
This patch converts code to use the new b43_radio_maskset() API.

The semantic patch that makes this change is as follows:

// <smpl>
@@
expression dev, addr, mask, set;
@@

-b43_radio_write16(dev, addr, (b43_radio_read16(dev, addr) & mask) | set);
+b43_radio_maskset(dev, addr, mask, set);
// </smpl>

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:53 -05:00
Michael Buesch 3718582a66 b43: Convert usage of b43_radio_mask()
This patch converts code to use the new b43_radio_mask() API.

The semantic patch that makes this change is as follows:

// <smpl>
@@
expression dev, addr, mask;
@@

-b43_radio_write16(dev, addr, b43_radio_read16(dev, addr) & mask);
+b43_radio_mask(dev, addr, mask);
// </smpl>

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:53 -05:00
Michael Buesch 4cf507696a b43: Convert usage of b43_radio_set()
This patch converts code to use the new b43_radio_set() API.

The semantic patch that makes this change is as follows:

// <smpl>
@@
expression dev, addr, set;
@@

-b43_radio_write16(dev, addr, b43_radio_read16(dev, addr) | set);
+b43_radio_set(dev, addr, set);
// </smpl>

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:53 -05:00
Michael Buesch 76e190cd4b b43: Convert usage of b43_phy_maskset()
This patch converts code to use the new b43_phy_maskset() API.

The semantic patch that makes this change is as follows:

// <smpl>
@@
expression dev, addr, mask, set;
@@

-b43_phy_write(dev, addr, (b43_phy_read(dev, addr) & mask) | set);
+b43_phy_maskset(dev, addr, mask, set);
// </smpl>

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:52 -05:00
Michael Buesch ac1ea3959f b43: Convert usage of b43_phy_mask()
This patch converts code to use the new b43_phy_mask() API.

The semantic patch that makes this change is as follows:

// <smpl>
@@
expression dev, addr, mask;
@@

-b43_phy_write(dev, addr, b43_phy_read(dev, addr) & mask);
+b43_phy_mask(dev, addr, mask);
// </smpl>

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:52 -05:00
Michael Buesch e59be0b529 b43: Convert usage of b43_phy_set()
This patch converts code to use the new b43_phy_set() API.

The semantic patch that makes this change is as follows:

// <smpl>
@@
expression dev, addr, set;
@@

-b43_phy_write(dev, addr, b43_phy_read(dev, addr) | set);
+b43_phy_set(dev, addr, set);
// </smpl>

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:52 -05:00
Dan Williams 9b02f419a7 libertas: use private SDIO workqueue to avoid scheduling latency
The libertas SDIO interface scheduled the packet worker, resulting in
unwanted latency for every data packet or command sent to the firmware.
Fix a bug on the SDIO probe error path too.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:51 -05:00
Michael Buesch 25d3ef59a2 b43: Implement sw scan callbacks
This implements the new sw scan callbacks in b43.
They are currently used to turn CFP update in the microcode off while scanning.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:51 -05:00
Michael Buesch 8821905cfb b43: Enable PCI slow clock workaround, if needed.
Enable the PCI slow clock workaround, if we're running a PCI core rev <= 10.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:50 -05:00
Michael Buesch 1cc8f476f1 b43: Honor the no-slow-clock boardflag
Do not turn off the crystal, if the boardflags tell us so.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:50 -05:00
Michael Buesch 969d15cfab b43: Fix radio host flags
This fixes initialization of some radio related hostflags.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:50 -05:00
Michael Buesch 2d071ca50e b43: Add slot count compiletime assertion
This adds a compiletime assertion for a recently introduced
assumption on the slot counts.
The tx header cache handling code assumes that the TX slot count
can be divided evenly by the number of TX slots per frame.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:50 -05:00
Sujith 20977d3e68 ath9k: Add appropriate ANI values for AP mode
The short calibration interval is different for AP
mode, fix this. Also, the timer should be rearmed in
the calibration routine during scanning.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:49 -05:00
Sujith db0f41f556 ath9k: Fix PCI shutdown sequence
pci_release_region() has to be called after the device
has been disabled. Also remove a stray __init attribute.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:49 -05:00
Sujith 8147f5de7a ath9k: Fix bug in EEPROM chainmask retrieval
Using wrong chainmasks would have an adverse impact on performance.
This patch fixes chainmask retrieval for non-PCIE cards.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:49 -05:00
Sujith 9e71279084 ath9k: Add PER to RC debug statistics
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:49 -05:00
Sujith d9ae96d94a ath9k: Remove multiple macro occurrences
OLC_FOR_AR9280_20_LATER is defined in multiple places,
move it to a common location.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:48 -05:00
Alina Friedrichsen f452a63d1e ath9k: Don't reset TSF after scanning automatically
Reset automatically the TSF on re-enabling beaconing after scanning
in IBSS mode causes several problems. For example a new created IBSS
network can't age before an other node has joined, because scans are
done automatically in that case. And several other strange bugs more...

The TSF reset is done manually in the higher level mac80211 code in
the cases were it's needed, so we don't need to do it here.

Signed-off-by: Alina Friedrichsen <x-alina@gmx.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:48 -05:00
Michael Buesch bdceeb2dad b43: Optimize DMA buffers
In the old days we used one slot per frame. But when we changed that to 2,
we didn't raise the overall slot count. Which resulted in an effective
division of two to the number of slots.

Double the number of TX slots, so we have an effective hardware queue
of 128 frames per QoS queue.

Also optimize the TX header cache handling. We don't need a cached TX header
for slots that will never carry an actual header.
So we reduce the memory consumption of the cache by 50%.

So as a net result we end up with more or less the same memory usage before
and after this patch (except a few tiny meta structures), but have twice
the number of TX slots available.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:48 -05:00
Michael Buesch 8eccb53f1b b43: Fix DMA buffer size handling
This fixes hidden bugs in the size handling of the DMA buffers.
This sets the RX buffer size to the theoretical max packet size and
fixes passing of the size values to the device (must not subtract the header offset).

These bugs are hidden and don't actually trigger due to the magic +100
offset for the buffer size.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:47 -05:00
Michael Buesch ca2d559e1a b43: Move DMA stop sanity check
Move the DMA stop sanity check up a few lines, so it's actually
theoretically possible to trigger. (But it still shouldn't trigger, of course).

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:47 -05:00
Vasanthakumar Thiagarajan dbaaa147d6 ath9k: Filter out beacons from other BSS in STA mode
Passing beacons received from other BSS to s/w in non-scanning
state is unnecessary in STA mode. This patch filters them out in
h/w.

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:47 -05:00
Fenghua Yu 96891ceeda iwlwifi: dma mapping read and write changes
When iwlwifi runs on IOMMU, IOMMU generates a lot of PTE write faults
because PTE write bit is not set on some of PTE's. This is because iwlwifi
driver calls DMA mapping with PCI_DMA_TODEVICE which is read only in mapping
PTE. But iwlwifi device actually writes to the mapped page to update its contents.
This issue is not exposed in swiotlb. But VT-d hardware can capture this fault and
stop the fault transaction.

The iwl TX command contains a scratch field that is updated by uCode to
indicate retry counts. For 5000 series the patch is required also for
regular frames, but this patch does not differenciate.

Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
Acked-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:47 -05:00
Abhijeet Kolekar 7dc45f25d3 iwl3945: use SW rfkill from iwlwifi
Patch unifies use of SW rfkill between 3945 and agn driver.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Acked-by: Samuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:46 -05:00
Abhijeet Kolekar f17d08a657 iwl3945: use iwl_isr
iwl3945 uses iwl_isr and deletes duplicated iwl3945_isr.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Acked-by: Samuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:46 -05:00
Abhijeet Kolekar ed3b932e01 iwl3945: remove duplicate interrupt code
Patch removes duplicate code to enable and disable interrupt.
iwl3945 now uses iwlwifi's functions.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Acked-by: Samuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:46 -05:00
Abhijeet Kolekar 261b9c3398 iwl3945: use iwl_rx_reply_error notification
Patch removes duplicate code from iwl3945 and uses
iwl_rx_reply_error and spectrum notifications from iwlwifi.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Acked-by: Samuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:45 -05:00
Abhijeet Kolekar 030f05eda6 iwl3945: use iwl rx handlers
Patch removes duplicate rx handlers(pm_sleep and pm_debug) from 3945 and
uses handlers from iwlwifi.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Acked-by: Samuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:45 -05:00
Abhijeet Kolekar e9dde6f6ed iwl3945: use iwl_mac_hw_scan callback
3945 can use iwl_mac_hw_scan callback instead of
iwl3945_mac_hw_scan callback.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Acked-by: Samuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:45 -05:00
Abhijeet Kolekar cade0eb2c7 iwl3945: use iwl_rx_scan handlers
Patch makes use of iwl_rx_scan handler for 3945.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Acked-by: Samuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:45 -05:00
Jason Andryuk 2ce4f9d861 at76c50x-usb: convert at76_debug to an unsigned int
at76_debug should be an unsigned int as it used as a bit field.  In
fact, modprobe fails when trying to set at76_debug's high bit.

Signed-off-by: Jason Andryuk <jandryuk@gmail.com>
Signed-off-by: Kalle Valo <kalle.valo@iki.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:44 -05:00
Jason Andryuk 19e8bc7fa7 at76c50x-usb: update to latest mac80211 hw scan api
With the latest mac80211 stack, the driver needs to be updated for
cfg80211 scanning.  I based the changes off of modifications for
at76_usb found here:

http://johannes.sipsolutions.net/patches/old/all/2008-09-19-13:35/020-cfg80211-scan.patch

The trick was that max_signal also needs to be set to avoid a divide
by zero Oops.  I just guessed and used the value 100 for now.

kvalo: handpicked the change from two different patches

Signed-off-by: Jason Andryuk <jandryuk@gmail.com>
Signed-off-by: Kalle Valo <kalle.valo@iki.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:44 -05:00
Kalle Valo 1264b95146 at76c50x-usb: add driver
This is a driver for usb devices based on at76c50x chipset. This is
a mac80211 port of the original at76_usb driver.

Signed-off-by: Kalle Valo <kalle.valo@iki.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:44 -05:00
John W. Linville 41d2f291d7 iwlagn: default to MAX_UCODE_BEACON_INTERVAL in iwl_adjust_beacon_interval
Default to MAX_UCODE_BEACON_INTERVAL if the output of
iwl_adjust_beacon_interval would otherwise be zero.  This prevents a
division by zero on my iwl5300-equipped Lenovo T400 with kernels that
include "mac80211: use cfg80211s BSS infrastructure".

This patch is a bit of a hack -- I'm not sure why iwl_setup_rxon_timing
is giving iwl_adjust_beacon_interval a zero input (which is the only way
it would output zero).  I would be happy to have a better fix.  But for
now, this makes my box boot...

Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:44 -05:00