platform/upstream/kernel-adaptation-pc.git
15 years agomac80211: rewrite fragmentation
Johannes Berg [Mon, 23 Mar 2009 16:28:35 +0000 (17:28 +0100)]
mac80211: rewrite fragmentation

Fragmentation currently uses an allocated array to store the
fragment skbs, and then keeps track of which have been sent
and which are still pending etc. This is rather complicated;
make it simpler by just chaining the fragments into skb->next
and removing from that list when sent. Also simplifies all
code that needs to touch fragments, since it now only needs
to walk the skb->next list.

This is a prerequisite for fixing the stored packet code,
which I need to do for proper aggregation packet storing.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwlwifi: show current driver status in user readable format
Wey-Yi Guy [Tue, 24 Mar 2009 17:02:54 +0000 (10:02 -0700)]
iwlwifi: show current driver status in user readable format

change the display of current driver status bit to user readable format
for better and easier debugging

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agob43: Add BCM4307 PCI-ID
Michael Buesch [Tue, 24 Mar 2009 09:36:48 +0000 (10:36 +0100)]
b43: Add BCM4307 PCI-ID

00:09.0 Network controller [0280]: Broadcom Corporation BCM4307 Ethernet Controller [14e4:4306] (rev 03)
    Subsystem: Broadcom Corporation BCM4307 Ethernet Controller [14e4:4306]
    Flags: bus master, fast devsel, latency 32, IRQ 10
    Memory at d7000000 (32-bit, non-prefetchable) [size=8K]
    Kernel driver in use: b43-pci-bridge
    Kernel modules: ssb

Reported-by: yoann <yoann71@msn.com>
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agocfg80211: fix locking in nl80211_set_wiphy
Johannes Berg [Tue, 24 Mar 2009 08:35:46 +0000 (09:35 +0100)]
cfg80211: fix locking in nl80211_set_wiphy

Luis reports that there's a circular locking dependency;
this is because cfg80211_dev_rename() will acquire the
cfg80211_mutex while the device mutex is held, while
this normally is done the other way around. The solution
is to open-code the device-getting in nl80211_set_wiphy
and require holding the mutex around cfg80211_dev_rename
rather than acquiring it within.

Also fix a bug -- rtnl locking is expected by drivers so
we need to provide it.

Reported-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: fix RX path
Johannes Berg [Tue, 24 Mar 2009 07:46:57 +0000 (08:46 +0100)]
mac80211: fix RX path

My previous patch ("mac80211: remove mixed-cell and userspace MLME code")
was too obvious to me, so obvious that a stupid bug crept in. The IBSS
RX function must be invoked for IBSS, of course, not anything != IBSS.

Reported-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath5k: properly drop packets from ops->tx
Bob Copeland [Tue, 24 Mar 2009 03:35:37 +0000 (23:35 -0400)]
ath5k: properly drop packets from ops->tx

We shouldn't return NETDEV_TX_BUSY from the TX callback, especially
after we've mucked with the sk_buffs.  Drop the packets and return
NETDEV_TX_OK.

Changes-licensed-under: 3-Clause-BSD

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoar9170: single module build
Christian Lamparter [Tue, 24 Mar 2009 15:21:55 +0000 (16:21 +0100)]
ar9170: single module build

This patch restores all-in-one module build procedure for ar9170.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: fix dma mapping leak of rx buffer upon rmmod
Luis R. Rodriguez [Mon, 23 Mar 2009 22:25:01 +0000 (18:25 -0400)]
ath9k: fix dma mapping leak of rx buffer upon rmmod

We were claiming DMA buffers on the RX tasklet but never
upon a simple module removal.

Cc: stable@kernel.org
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agort2x00: New USB ID for rt73usb
Ivo van Doorn [Fri, 20 Mar 2009 23:00:57 +0000 (00:00 +0100)]
rt2x00: New USB ID for rt73usb

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath5k: warn and correct rate for unknown hw rate indexes
Bob Copeland [Tue, 3 Mar 2009 02:55:18 +0000 (21:55 -0500)]
ath5k: warn and correct rate for unknown hw rate indexes

ath5k sets up a mapping table from the hardware rate index to
the rate index used by mac80211; however, we have seen some
received frames with incorrect rate indexes.  Such frames
normally get dropped with a warning in __ieee80211_rx(),
but it doesn't include enough information to track down the
error.

This patch adds a warning to hw_to_driver_rix for any lookups
that result in a rate index of -1, then returns a valid rate so
the frame can be processed.

Changes-licensed-under: 3-Clause-BSD

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Cc: stable@kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agob43: fix b43_plcp_get_bitrate_idx_ofdm return type
Lorenzo Nava [Sun, 22 Mar 2009 18:15:41 +0000 (19:15 +0100)]
b43: fix b43_plcp_get_bitrate_idx_ofdm return type

This patch fixes the return type of b43_plcp_get_bitrate_idx_ofdm. If
the plcp contains an error, the function return value is 255 instead
of -1, and the packet was not dropped. This causes a warning in
__ieee80211_rx function because rate idx is out of range.

Cc: stable@kernel.org
Signed-off-by: Lorenzo Nava <navalorenx@gmail.com>
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agop54: Kconfig maintenance
Christian Lamparter [Mon, 23 Mar 2009 14:49:33 +0000 (15:49 +0100)]
p54: Kconfig maintenance

This patch updates p54's Kconfig entry and removes the out-dated device list.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: rate control status only for controlled packets
Johannes Berg [Mon, 23 Mar 2009 13:10:22 +0000 (14:10 +0100)]
mac80211: rate control status only for controlled packets

This patch changes mac80211 to not notify the rate control algorithm's
tx_status() method when reporting status for a packet that didn't go
through the rate control algorithm's get_rate() method.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoar9170: simplify & deBUG tx_status queueing and reporting
Christian Lamparter [Mon, 23 Mar 2009 11:15:43 +0000 (12:15 +0100)]
ar9170: simplify & deBUG tx_status queueing and reporting

This patch simplifies the tx_status report code by using four tx_queues per
station instead of only one. (the skb lookup should be in O(1) now :-p ).

Also, it fixes a really obvious copy&paste bug in the janitor work code and
adds back a few spilled bits to the hardware definition header about QoS.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: add beacon filtering support
Kalle Valo [Sun, 22 Mar 2009 19:57:35 +0000 (21:57 +0200)]
mac80211: add beacon filtering support

Add IEEE80211_HW_BEACON_FILTERING flag so that driver inform that it supports
beacon filtering. Drivers need to call the new function
ieee80211_beacon_loss() to notify about beacon loss.

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agocfg80211: add feature to hold bss
Kalle Valo [Sun, 22 Mar 2009 19:57:28 +0000 (21:57 +0200)]
cfg80211: add feature to hold bss

In beacon filtering there needs to be a way to not expire the BSS even
when no beacons are received. Add an interface to cfg80211 to hold
BSS and make sure that it's not expired.

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: disable power save when scanning
Kalle Valo [Sun, 22 Mar 2009 19:57:21 +0000 (21:57 +0200)]
mac80211: disable power save when scanning

When software scanning we need to disable power save so that all possible
probe responses and beacons are received. For hardware scanning assume that
hardware will take care of that and document that assumption.

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: track beacons separately from the rx path activity
Kalle Valo [Sun, 22 Mar 2009 19:57:14 +0000 (21:57 +0200)]
mac80211: track beacons separately from the rx path activity

Separate beacon and rx path tracking in preparation for the beacon filtering
support. At the same time change ieee80211_associated() to look a bit simpler.

Probe requests are now sent only after IEEE80211_PROBE_IDLE_TIME, which
is now set to 60 seconds.

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: decrease execution of the associated timer
Kalle Valo [Sun, 22 Mar 2009 19:57:06 +0000 (21:57 +0200)]
mac80211: decrease execution of the associated timer

Currently the timer is triggering every two seconds
(IEEE80211_MONITORING_INTERVAL). Decrease the timer to only trigger during
data idle periods to avoid waking up CPU unnecessary. The timer will
still trigger during idle periods, that needs to be fixed later.

There's also a functional change that probe requests are sent only when the
data path is idle, earlier they were sent also while there was activity
on the data path.

This is also preparation for the beacon filtering support. Thanks to
Johannes Berg for the idea.

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath5k: Support LED's on Acer Extensa 5620z
Tulio Magno Quites Machado Filho [Sun, 22 Mar 2009 00:41:13 +0000 (01:41 +0100)]
ath5k: Support LED's on Acer Extensa 5620z

Add vendor ID for Quanta Microsystems and update the led table with the reported device.

Reported-by: Scott Barnes <nekoreeve@gmail.com>
Signed-off-by: Tulio Magno Quites Machado Filho <tuliom@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoar9170: update Makefile, Kconfig and MAINTAINERS
Christian Lamparter [Sat, 21 Mar 2009 22:11:49 +0000 (23:11 +0100)]
ar9170: update Makefile, Kconfig and MAINTAINERS

This patch update all necessary Makefile and Kconfig files.

Now you can then enable ar9170 in the kernel configuration under:
Device Drivers --->
[*] Network device support --->
Wireless LAN --->
[*] Wireless LAN (IEEE 802.11)
<M>   Atheros AR9170 support
<M>     Atheros AR9170 USB support

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoar9170: ar9170: USB frontend driver
Christian Lamparter [Sat, 21 Mar 2009 22:05:48 +0000 (23:05 +0100)]
ar9170: ar9170: USB frontend driver

USB frontend driver code for Atheros' AR9170 modules.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoar9170: mac/bbp and phy code
Christian Lamparter [Sun, 22 Mar 2009 01:36:06 +0000 (02:36 +0100)]
ar9170: mac/bbp and phy code

MAC/BBP and PHY programming code

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoar9170: ar9170: mac80211 interaction code
Christian Lamparter [Sat, 21 Mar 2009 22:05:13 +0000 (23:05 +0100)]
ar9170: ar9170: mac80211 interaction code

This patch contains almost all mac80211 interaction code of AR9170.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoar9170: hardware and eeprom header files
Christian Lamparter [Sat, 21 Mar 2009 22:04:48 +0000 (23:04 +0100)]
ar9170: hardware and eeprom header files

hardware / firmware interface definitions for Atheros' AR9170 based devices.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: remove mixed-cell and userspace MLME code
Johannes Berg [Sat, 21 Mar 2009 16:08:43 +0000 (17:08 +0100)]
mac80211: remove mixed-cell and userspace MLME code

Neither can currently be set from userspace, so there's no
regression potential, and neither will be supported from
userspace since the new userspace APIs allow the SME, which
is in userspace, to control all we need.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agocfg80211: accept no-op interface mode changes
Johannes Berg [Sat, 21 Mar 2009 16:07:59 +0000 (17:07 +0100)]
cfg80211: accept no-op interface mode changes

When somebody tries to set the interface mode to the existing
mode, don't ask the driver but silently accept the setting.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agocfg80211: remove code about country IE support with OLD_REG
Luis R. Rodriguez [Sat, 21 Mar 2009 03:53:07 +0000 (23:53 -0400)]
cfg80211: remove code about country IE support with OLD_REG

We had left in code to allow interested developers to add
support for parsing country IEs when OLD_REG was enabled.
This never happened and since we're going to remove OLD_REG
lets just remove these comments and code for it.

This code path was never being entered so this has no
functional change.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agocfg80211: make regdom module parameter available oustide of OLD_REG
Luis R. Rodriguez [Sat, 21 Mar 2009 03:53:06 +0000 (23:53 -0400)]
cfg80211: make regdom module parameter available oustide of OLD_REG

It seems a few users are using this module parameter although its not
recommended. People are finding it useful despite there being utilities
for setting this in userspace. I'm not aware of any distribution using
this though.

Until userspace and distributions catch up with a default userspace
automatic replacement (GeoClue integration would be nirvana) we copy
the ieee80211_regdom module parameter from OLD_REG to the new reg
code to help these users migrate.

Users who are using the non-valid ISO / IEC 3166 alpha "EU" in their
ieee80211_regdom module parameter and migrate to non-OLD_REG enabled
system will world roam.

This also schedules removal of this same ieee80211_regdom module
parameter circa March 2010. Hope is by then nirvana is reached and
users will abandoned the module parameter completely.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agocfg80211: fix incorrect assumption on last_request for 11d
Luis R. Rodriguez [Sat, 21 Mar 2009 03:53:05 +0000 (23:53 -0400)]
cfg80211: fix incorrect assumption on last_request for 11d

The incorrect assumption is the last regulatory request
(last_request) is always a country IE when processing
country IEs. Although this is true 99% of the time the
first time this happens this could not be true.

This fixes an oops in the branch check for the last_request
when accessing drv_last_ie. The access was done under the
assumption the struct won't be null.

Note to stable: to port to 29 replace as follows, only 29 has
country IE code:

s|NL80211_REGDOM_SET_BY_COUNTRY_IE|REGDOM_SET_BY_COUNTRY_IE

Cc: stable@kernel.org
Reported-by: Quentin Armitage <Quentin@armitage.org.uk>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agocfg80211: force last_request to be set for OLD_REG if regdom is EU
Luis R. Rodriguez [Sat, 21 Mar 2009 03:53:04 +0000 (23:53 -0400)]
cfg80211: force last_request to be set for OLD_REG if regdom is EU

Although EU is a bogus alpha2 we need to process the send request
as our code depends on last_request being set.

Cc: stable@kernel.org
Reported-by: Quentin Armitage <Quentin@armitage.org.uk>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211_hwsim: let the reg workqueue breathe when regtest is set
Luis R. Rodriguez [Sat, 21 Mar 2009 03:46:11 +0000 (23:46 -0400)]
mac80211_hwsim: let the reg workqueue breathe when regtest is set

Without this the regulatory domain isn't seen and we end up
intersecting for each request (each radio).

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoAdd mesh point functionality to ath9k
Pat Erley [Sat, 21 Mar 2009 02:59:59 +0000 (22:59 -0400)]
Add mesh point functionality to ath9k

This patch enables mesh point operation for ath9k.  Tested with b43,
ath9k, rt2500usb, and ath5k as peers.

Signed-off-by: Pat Erley <pat-lkml@erley.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agop54: fix SoftLED compile dependencies
Christian Lamparter [Mon, 23 Mar 2009 14:37:45 +0000 (15:37 +0100)]
p54: fix SoftLED compile dependencies

This patch fixes a compile problem when the MAC80211_LEDS
triggers are enabled but not LED class itself.
(which is sort of pointless, but anyway...)

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agonl80211: Check iftype in cfg80211 code
Jouni Malinen [Fri, 20 Mar 2009 19:21:19 +0000 (21:21 +0200)]
nl80211: Check iftype in cfg80211 code

We do not want to require all the drivers using cfg80211 to need to do
this. In addition, make the error values consistent by using
EOPNOTSUPP instead of semi-random assortment of errno values.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agonl80211: Check that netif_runnin is true in cfg80211 code
Jouni Malinen [Fri, 20 Mar 2009 19:21:18 +0000 (21:21 +0200)]
nl80211: Check that netif_runnin is true in cfg80211 code

We do not want to require all the drivers using cfg80211 to need to do
this or to be prepared to handle these commands when the interface is
down.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agonl80211: Add more through validation of MLME command parameters
Jouni Malinen [Fri, 20 Mar 2009 19:21:17 +0000 (21:21 +0200)]
nl80211: Add more through validation of MLME command parameters

Check that the used authentication type and reason code are valid here
so that drivers/mac80211 do not need to care about this. In addition,
remove the unnecessary validation of SSID attribute length which is
taken care of by netlink policy.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agonl80211: Remove NL80211_CMD_SET_MGMT_EXTRA_IE
Jouni Malinen [Fri, 20 Mar 2009 19:21:16 +0000 (21:21 +0200)]
nl80211: Remove NL80211_CMD_SET_MGMT_EXTRA_IE

The functionality that NL80211_CMD_SET_MGMT_EXTRA_IE provided can now
be achieved with cleaner design by adding IE(s) into
NL80211_CMD_TRIGGER_SCAN, NL80211_CMD_AUTHENTICATE,
NL80211_CMD_ASSOCIATE, NL80211_CMD_DEAUTHENTICATE, and
NL80211_CMD_DISASSOCIATE.

Since this is a very recently added command and there are no known (or
known planned) applications using NL80211_CMD_SET_MGMT_EXTRA_IE and
taken into account how much extra complexity it adds to the IE
processing we have now (and need to add in the future to fix IE order
in couple of frames), it looks like the best option is to just remove
the implementation of this command for now. The enum values themselves
are left to avoid changing the nl80211 command or attribute numbers.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agossb: remove EXPERIMENTAL dependencies.
Michael Buesch [Fri, 20 Mar 2009 15:43:20 +0000 (16:43 +0100)]
ssb: remove EXPERIMENTAL dependencies.

ssb is not experimental anymore.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: Fix memleak in nl80211 authentication on deinit
Jouni Malinen [Fri, 20 Mar 2009 13:53:16 +0000 (15:53 +0200)]
mac80211: Fix memleak in nl80211 authentication on deinit

This file was forgotten from the quilt patch that added MLME
primitives, so the kfree on interface removal is missing. Fix this
potential memleak by freeing the temporary Authentication frame IEs
from SME when the interface is being removed.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: Nuke struct ath_xmit_status
Vasanthakumar Thiagarajan [Fri, 20 Mar 2009 09:57:50 +0000 (15:27 +0530)]
ath9k: Nuke struct ath_xmit_status

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: Fix bug in reporting status of tx rate
Vasanthakumar Thiagarajan [Fri, 20 Mar 2009 09:57:49 +0000 (15:27 +0530)]
ath9k: Fix bug in reporting status of tx rate

This patch updates count of every hw tried rate with
appropriate tries before reporting tx status of a frame.

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: resume properly, add suspend/resume test
Johannes Berg [Fri, 13 Mar 2009 10:44:18 +0000 (11:44 +0100)]
mac80211: resume properly, add suspend/resume test

When mac80211 resumes, it currently doesn't reconfigure the interfaces
entirely and also doesn't reconfigure BSS information -- fix this.

Also, to be able to test this, add a debugfs file that just calls
the suspend/resume code to see what happens when we go through that,
without needing the time-consuming suspend/resume cycle.

(Original version broke the build for CONFIG_PM=n.  Define alternative
functions for that situation. -- JWL)

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agob43: Mask PHY TX error interrupt, if not debugging
Michael Buesch [Thu, 19 Mar 2009 18:27:21 +0000 (19:27 +0100)]
b43: Mask PHY TX error interrupt, if not debugging

This masks the PHY TX error interrupt, if debugging is disabled.

Currently we have a bug somewhere which triggers this interrupt once
in a while. (Depends on the network noise/quality). While this is nonfatal,
it scares the hell out of users and we frequently receive bugreports
that incorrectly identify this error message as the reason.

There's another problem with this. The PHY TX error interrupt is protected
with a watchdog that will restart the device if it keeps triggering very often.
This is used to fix interrupt storms from completely broken devices.

However, this watchdog might trigger in completely normal operation.
If the TX capacity of the card is saturated, the likeliness of the watchdog
triggering increases, as more TX errors occur. The current threshold
for the watchdog is 1000 errors in 15 seconds.

This patch adds a workaround for the issue by just enabling the interrupt
if debugging is disabled (by Kconfig or by modparam).

This has the downside that real fatal PHY TX errors are not caught anymore.
But this is nonfatal due to the following reasons:
* If the card is not able to transmit anymore, MLME will notice anyway.
* I did _never_ see a real fatal PHY TX error in a mainline b43 driver.
* It does _not_ result in interrupt storms or something like that.
  It will simply result in a stalled card. It can be debugged by enabling
  the debugging module parameter.

Signed-off-by: Michael Buesch <mb@bu3sch>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agowireless/p54: P54_SPI should depend on GENERIC_HARDIRQS
Geert Uytterhoeven [Thu, 19 Mar 2009 12:33:52 +0000 (13:33 +0100)]
wireless/p54: P54_SPI should depend on GENERIC_HARDIRQS

m68k allmodconfig:
| drivers/net/wireless/p54/p54spi.c: In function 'p54spi_probe':
| drivers/net/wireless/p54/p54spi.c:675: error: implicit declaration of function
| 'set_irq_type'
| make[4]: *** [drivers/net/wireless/p54/p54spi.o] Error 1

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agonl80211: Add MLME primitives to support external SME
Jouni Malinen [Thu, 19 Mar 2009 11:39:22 +0000 (13:39 +0200)]
nl80211: Add MLME primitives to support external SME

This patch adds new nl80211 commands to allow user space to request
authentication and association (and also deauthentication and
disassociation). The commands are structured to allow separate
authentication and association steps, i.e., the interface between
kernel and user space is similar to the MLME SAP interface in IEEE
802.11 standard and an user space application takes the role of the
SME.

The patch introduces MLME-AUTHENTICATE.request,
MLME-{,RE}ASSOCIATE.request, MLME-DEAUTHENTICATE.request, and
MLME-DISASSOCIATE.request primitives. The authentication and
association commands request the actual operations in two steps
(assuming the driver supports this; if not, separate authentication
step is skipped; this could end up being a separate "connect"
command).

The initial implementation for mac80211 uses the current
net/mac80211/mlme.c for actual sending and processing of management
frames and the new nl80211 commands will just stop the current state
machine from moving automatically from authentication to association.
Future cleanup may move more of the MLME operations into cfg80211.

The goal of this design is to provide more control of authentication and
association process to user space without having to move the full MLME
implementation. This should be enough to allow IEEE 802.11r FT protocol
and 802.11s SAE authentication to be implemented. Obviously, this will
also bring the extra benefit of not having to use WEXT for association
requests with mac80211. An example implementation of a user space SME
using the new nl80211 commands is available for wpa_supplicant.

This patch is enough to get IEEE 802.11r FT protocol working with
over-the-air mechanism (over-the-DS will need additional MLME
primitives for handling the FT Action frames).

Signed-off-by: Jouni Malinen <j@w1.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agonl80211: Event notifications for MLME events
Jouni Malinen [Thu, 19 Mar 2009 11:39:21 +0000 (13:39 +0200)]
nl80211: Event notifications for MLME events

Add new nl80211 event notifications (and a new multicast group, "mlme")
for informing user space about received and processed Authentication,
(Re)Association Response, Deauthentication, and Disassociation frames in
station and IBSS modes (i.e., MLME SAP interface primitives
MLME-AUTHENTICATE.confirm, MLME-ASSOCIATE.confirm,
MLME-REASSOCIATE.confirm, MLME-DEAUTHENTICATE.indicate, and
MLME-DISASSOCIATE.indication). The event data is encapsulated as the 802.11
management frame since we already have the frame in that format and it
includes all the needed information.

This is the initial step in providing MLME SAP interface for
authentication and association with nl80211. In other words, kernel code
will act as the MLME and a user space application can control it as the
SME.

Signed-off-by: Jouni Malinen <j@w1.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: Fix reassociation by not clearing previous BSSID
Jouni Malinen [Thu, 19 Mar 2009 11:39:20 +0000 (13:39 +0200)]
mac80211: Fix reassociation by not clearing previous BSSID

We must not clear the previous BSSID when roaming to another AP within
the same ESS for reassociation to be used properly. It is fine to
clear this when the SSID changes, so let's move the code into
ieee80211_sta_set_ssid().

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: Fix a typo in assoc vs. reassoc check
Jouni Malinen [Thu, 19 Mar 2009 11:39:19 +0000 (13:39 +0200)]
mac80211: Fix a typo in assoc vs. reassoc check

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: Fix rate control update for aggregated frames
Vasanthakumar Thiagarajan [Wed, 18 Mar 2009 14:52:00 +0000 (20:22 +0530)]
ath9k: Fix rate control update for aggregated frames

We will miss rate control update if first A-MPDU of an
aggregation is not Block Acked as we always tell if the
rate control needs to updated through update_rc of first
A-MPDU. This patch does rate control update for the first
A-MPDU which notifies it's tx status (which is not
necessarily the first A-MPDU of an aggregation) to mac80211.

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: kill IEEE80211_CONF_SHORT_SLOT_TIME
Johannes Berg [Wed, 18 Mar 2009 13:29:38 +0000 (14:29 +0100)]
mac80211: kill IEEE80211_CONF_SHORT_SLOT_TIME

No drivers use it any more, so it can now be removed safely.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: don't drop nullfunc frames during software scan
Kalle Valo [Wed, 18 Mar 2009 12:06:44 +0000 (14:06 +0200)]
mac80211: don't drop nullfunc frames during software scan

ieee80211_tx_h_check_assoc() was dropping everything else than probe
requests during software scan. So the nullfunc frame with the power save
bit was dropped and AP never received it. This meant that AP never
buffered any frames for the station during software scan.

Fix this by allowing to transmit both probe request and nullfunc frames
during software scan. Tested with stlc45xx.

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwl3945: replace stations with stations_39
Abhijeet Kolekar [Wed, 18 Mar 2009 04:51:53 +0000 (21:51 -0700)]
iwl3945: replace stations with stations_39

A *leftover* stations is replaced with stations_39.

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>
15 years agoiwlwifi: report error when detect failure during stop agg queue
Wey-Yi Guy [Wed, 18 Mar 2009 04:51:52 +0000 (21:51 -0700)]
iwlwifi: report error when detect failure during stop agg queue

This fix related to bug 1921 at
http://www.intellinuxwireless.org/bugzilla/show_bug.cgi?id=1921

when detect error during stopping tx aggregation queue, report the error to
help identify the problem.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwl3945: control rate decrease
Abhijeet Kolekar [Wed, 18 Mar 2009 04:51:51 +0000 (21:51 -0700)]
iwl3945: control rate decrease

Control the rate decrease. Do not decrease the rate fast.
Use success_ratio for rate scaling :)

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>
15 years agoiwl3945: fix checkpatch.pl errors
Abhijeet Kolekar [Wed, 18 Mar 2009 04:51:50 +0000 (21:51 -0700)]
iwl3945: fix checkpatch.pl errors

Patch fixes two checkpatch.pl errors.

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>
15 years agoiwl3945: use iwl_cmd_queue_free
Abhijeet Kolekar [Wed, 18 Mar 2009 04:51:49 +0000 (21:51 -0700)]
iwl3945: use iwl_cmd_queue_free

iwl_cmd_queue_free needs to be used to free up the cmd_queue,
as TFD slots for cmd_queue and tx_queue are different.

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>
15 years agoiwl3945: set TFD_QUEUE_MAX to correct value
Abhijeet Kolekar [Wed, 18 Mar 2009 04:51:48 +0000 (21:51 -0700)]
iwl3945: set TFD_QUEUE_MAX to correct value

Total number of queues is 8 but only 7 of them are TX queues.
4 AC(Data) queue ,1 CMD and 2 HCCA. The HCCA queues are not used.
max_txq_num is set to maximum usable TX queues.

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>
15 years agoiwlwifi: support 11h
Mohamed Abbas [Wed, 18 Mar 2009 04:51:47 +0000 (21:51 -0700)]
iwlwifi: support 11h

Set IEEE80211_HW_SPECTRUM_MGMT bit in hw->flags, this tell mac80211
we support spectrum mgmt.

Signed-off-by: Mohamed Abbas <mohamed.abbas@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwlcore: dont commit power command if interface is not up
Mohamed Abbas [Wed, 18 Mar 2009 04:51:45 +0000 (21:51 -0700)]
iwlcore: dont commit power command if interface is not up

If user set new power level, accept the new power level and only
send command to host if the interface is up and radio on.

Signed-off-by: Mohamed Abbas <mohamed.abbas@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwlagn: allow power level setting all the times
Mohamed Abbas [Wed, 18 Mar 2009 04:51:44 +0000 (21:51 -0700)]
iwlagn: allow power level setting all the times

allow user to set power level at all times

Signed-off-by: Mohamed Abbas <mohamed.abbas@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwlwifi: return 0 for AMPDU_TX/RX_STOP request if NIC is going down
Wey-Yi Guy [Wed, 18 Mar 2009 04:51:43 +0000 (21:51 -0700)]
iwlwifi: return 0 for AMPDU_TX/RX_STOP request if NIC is going down

When receive IEEE80211_AMPDU_RX_STOP or IEEE80211_AMPDU_TX_STOP request
in iwl_mac_ampdu_action() from mac80211; check STATUS_EXIT_PENDING bit,
if NIC is on the way out, then return 0 back to mac80211, this can
prevent mac80211 report HW error incorrectly.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwl3945: use changed in iwl3945_mac_config
Mohamed Abbas [Wed, 18 Mar 2009 04:51:42 +0000 (21:51 -0700)]
iwl3945: use changed in iwl3945_mac_config

In function iwl3945_mac_config use changed flag to call only
the affected functions.

Signed-off-by: Mohamed Abbas <mohamed.abbas@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwlagn: use changed in mac_config
Mohamed Abbas [Wed, 18 Mar 2009 04:59:18 +0000 (21:59 -0700)]
iwlagn: use changed in mac_config

In function iwl_mac_config use changed flag to call only
the affected functions. This patch also allow user to cache
channel, txpower and power value when the interface is not
ready and apply the changes once the interface ready.

Signed-off-by: Mohamed Abbas <mohamed.abbas@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agonl80211: rework locking
Johannes Berg [Thu, 12 Mar 2009 08:55:09 +0000 (09:55 +0100)]
nl80211: rework locking

When I added scanning to cfg80211, we got a lock dependency like this:
rtnl --> cfg80211_mtx

nl80211, on the other hand, has the reverse lock dependency:
cfg80211_mtx --> rtnl

which clearly is a bad idea. This patch reworks nl80211 to take these
two locks in the other order to fix the possible, and easily
triggerable, deadlock.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath5k: Add tx power calibration support
Nick Kossifidis [Sun, 15 Mar 2009 20:20:35 +0000 (22:20 +0200)]
ath5k: Add tx power calibration support

* Add tx power calibration support
* Add a few tx power limits
* Hardcode default power to 12.5dB
* Disable TPC for now

v2: Address Jiri's comments

Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agort2x00: Update MAINTAINERS entry: new mailinglist
Ivo van Doorn [Tue, 17 Mar 2009 10:29:19 +0000 (11:29 +0100)]
rt2x00: Update MAINTAINERS entry: new mailinglist

The rt2400-devel mailinglist will be replaced by
the new mailinglist rt2x00-users.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: Tear down aggregation sessions for suspend/resume
Sujith [Tue, 17 Mar 2009 03:20:06 +0000 (08:50 +0530)]
mac80211: Tear down aggregation sessions for suspend/resume

When the driver has been notified with a STA_REMOVE, it tears down
the internal ADDBA state. On resume, trying to initiate aggregation would
fail because mac80211 has not cleared the operational state for that <TID,STA>.
This can be fixed by tearing down the existing sessions on a suspend.

Also, the driver can initiate a new BA session when suspend is in progress.
This is fixed by marking the station as being in suspend state and
denying ADDBA requests for such STAs.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath5k: remove dummy PCI "retry timeout" fix
Bob Copeland [Tue, 17 Mar 2009 02:34:03 +0000 (22:34 -0400)]
ath5k: remove dummy PCI "retry timeout" fix

Remove the PCI retry timeout code, for all the same reasons that
Luis Rodriguez removed it for ath9k.

Changes-licensed-under: 3-Clause-BSD

Cc: Luis Rodriguez <lrodriguez@atheros.com>
Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath5k: disable MIB interrupts
Bob Copeland [Tue, 17 Mar 2009 02:34:02 +0000 (22:34 -0400)]
ath5k: disable MIB interrupts

The MIB interrupt fires whenever counters overflow; however without
support for automatic noise immunity, we can sometimes get an interrupt
storm.  The get_stats() callback reads the counters anyway so we can
disable the interrupt for now until ANI is implemented.  This fixes
the issue reported in http://bugzilla.kernel.org/show_bug.cgi?id=12647.

Changes-licensed-under: 3-Clause-BSD

Cc: stable@kernel.org
Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath5k: Convert chip specific calibration data to a generic format
Nick Kossifidis [Sun, 15 Mar 2009 20:17:04 +0000 (22:17 +0200)]
ath5k: Convert chip specific calibration data to a generic format

* Convert chip specific calibration data to a generic format common
for all chips

Note: We scale up power to be in 0.25dB units for all chips for
compatibility with RF5112

v2: Address Bob's and Jiri's comments

Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath5k: Choose the right initvals for RF2425
Nick Kossifidis [Sun, 15 Mar 2009 20:13:39 +0000 (22:13 +0200)]
ath5k: Choose the right initvals for RF2425

* Fix a typo in initvals.c so that we use the RF2425 array for RF2425 and not RF2413

Note: This also fixes incorect pd gain overlap since RF2425 has different pd gain overlap from RF2413

Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Acked-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoieee80211: document DS bit usage
Johannes Berg [Sat, 14 Mar 2009 18:10:51 +0000 (19:10 +0100)]
ieee80211: document DS bit usage

I keep needing this because I'm too stupid to remember it.
Everybody else can probably remember, but who knows :)

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: Keep LED on in idle state after association
Vasanthakumar Thiagarajan [Sat, 14 Mar 2009 14:29:41 +0000 (19:59 +0530)]
ath9k: Keep LED on in idle state after association

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: acquire sta_lock for station suspend/resume
Johannes Berg [Sat, 14 Mar 2009 08:42:49 +0000 (09:42 +0100)]
mac80211: acquire sta_lock for station suspend/resume

To avoid concurrent manipulations of the sta list (which shouldn't
be possible at this point, but anyway) we need to hold the sta_lock
around iterating the list.

At the same time, we do not need to iterate the list at all if
the driver doesn't want to be notified.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agonl80211: export supported commands
Johannes Berg [Sat, 14 Mar 2009 08:34:01 +0000 (09:34 +0100)]
nl80211: export supported commands

This makes nl80211 export the supported commands (command groups)
per wiphy so userspace has an idea what it can do -- this will be
required reading for userspace when we introduce auth/assoc /or/
connect for older hardware that cannot separate auth and assoc.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: Populate HT limitation with TKIP/WEP to the handler for SIOCSIWENCODE too
Vasanthakumar Thiagarajan [Fri, 13 Mar 2009 14:56:52 +0000 (20:26 +0530)]
mac80211: Populate HT limitation with TKIP/WEP to the handler for SIOCSIWENCODE too

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agowireless: radiotap updates
Johannes Berg [Fri, 13 Mar 2009 11:52:10 +0000 (12:52 +0100)]
wireless: radiotap updates

Radiotap was updated to include a "bad PLCP" flag and standardise
the "bad FCS" flag in the "flags" rather than "RX flags" field,
this patch updates Linux to that standard.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: stop queues across suspend/resume
Johannes Berg [Fri, 13 Mar 2009 10:43:36 +0000 (11:43 +0100)]
mac80211: stop queues across suspend/resume

Even though userland probably cannot submit packets, there might
still be some coming, and that's no good when the driver doesn't
expect them. Stop the queues across suspend/resume.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: fix warnings in ieee80211_if_config
Johannes Berg [Fri, 13 Mar 2009 10:19:45 +0000 (11:19 +0100)]
mac80211: fix warnings in ieee80211_if_config

The last warning can never trigger, and the explicit AP_VLAN
check is pointless if we move the config_interface check down,
in practice config_interface is required anyway.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: Update copyright in all the files
Sujith [Fri, 13 Mar 2009 03:37:23 +0000 (09:07 +0530)]
ath9k: Update copyright in all the files

How time flies.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: Fix bug in handling single stream stations
Sujith [Fri, 13 Mar 2009 03:26:11 +0000 (08:56 +0530)]
ath9k: Fix bug in handling single stream stations

AP mode currently sets up the dual stream capability
for all stations. This patch fixes it by checking if the
associated station supports dual stream MCS rates (8-15).
We would disregard any MCS rates above 15, since Atheros
HW supports only 0..15 rates currently, and can't receive
at rates > 15 anyway.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: Fill in ack signal in TX status
Sujith [Fri, 13 Mar 2009 03:26:09 +0000 (08:56 +0530)]
ath9k: Fill in ack signal in TX status

This patch fills the ack_signal field in TX status with an appropriate
value from the TX descriptor.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: Fix bug in 4K EEPROM size calculation
Sujith [Fri, 13 Mar 2009 03:26:07 +0000 (08:56 +0530)]
ath9k: Fix bug in 4K EEPROM size calculation

We should be checking with the 4K header and not the non-4K
header size.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: Change return type for set_board_values()
Sujith [Fri, 13 Mar 2009 03:26:05 +0000 (08:56 +0530)]
ath9k: Change return type for set_board_values()

We always return true, checking for 'false' return value
is bogus anyway, so fix this.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: Introduce a helper function for setting board gain values
Sujith [Fri, 13 Mar 2009 03:26:04 +0000 (08:56 +0530)]
ath9k: Introduce a helper function for setting board gain values

This improves readability. Handle both 4K/non-4K EEPROM
in this patch.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: Move AR5416_VER_MASK to a common location
Sujith [Fri, 13 Mar 2009 03:26:02 +0000 (08:56 +0530)]
ath9k: Move AR5416_VER_MASK to a common location

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: Miscellaneous EEPROM handling cleanup
Sujith [Fri, 13 Mar 2009 03:25:55 +0000 (08:55 +0530)]
ath9k: Miscellaneous EEPROM handling cleanup

Print the EEPROM version/revision on init.
Choose appropriate debug masks on error conditions,
and remove useless print messages.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: remove dummy PCI "retry timeout" fix
Luis R. Rodriguez [Thu, 12 Mar 2009 22:18:51 +0000 (18:18 -0400)]
ath9k: remove dummy PCI "retry timeout" fix

Remove the PCI retry timeout code as that was just taken from ipw2100
due to historical reasons but in reality its a no-op, additionally its
simply incorrect as each PCI devices has its own custom PCI configuration
space on PCI config space >= 0x40. Not to mention we were trying to write
0 to a place that already has 0 on it.

Cc: Matthew Garrett <mjg59@srcf.ucam.org>
Cc: Ben Cahill <ben.m.cahill@intel.com>
Cc: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
Tested-by: Adel Gadllah <adel.gadllah@gmail.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: Add support for multiple virtual AP interfaces
Jouni Malinen [Thu, 12 Mar 2009 19:53:23 +0000 (21:53 +0200)]
ath9k: Add support for multiple virtual AP interfaces

This patch fixes the TSF offset calculation for staggered Beacon frames
and sets ATH_BCBUF back to the earlier value 4 to enable multi-BSS
configurations of up to four BSSes.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: start pending scan after probe/auth/assoc timed out
Helmut Schaa [Thu, 12 Mar 2009 13:04:34 +0000 (14:04 +0100)]
mac80211: start pending scan after probe/auth/assoc timed out

If a scan is queued in STA mode while the interface is in state direct
probe, authenticate or associate the scan is delayed until the interface
enters disabled or associated state. But in case of direct probe-,
authentication- or association- timeout sta_work will not be scheduled
anymore (without external trigger) and thus the pending scan is not
executed and prevents a new scan from being triggered (-EBUSY).

Fix this by queueing the sta work again after direct probe-, authentication-
and association- timeout.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: reduce max number of queues
Johannes Berg [Thu, 12 Mar 2009 10:16:48 +0000 (11:16 +0100)]
mac80211: reduce max number of queues

No hw/driver actually supports more than four queues right now,
and we allocate a number of things per queue which means we
waste a bit of memory. Reduce the maximum number to four to
accurately reflect what we do (and need for QoS). Even if we
had hardware supporting more queues we couldn't take advantage
of that right now anyway.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: remove ieee80211_num_regular_queues
Johannes Berg [Thu, 12 Mar 2009 22:49:28 +0000 (23:49 +0100)]
mac80211: remove ieee80211_num_regular_queues

This inline is useless and actually makes the code _longer_
rather than shorter.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: Set IEEE80211_TX_CTL_RATE_CTRL_PROBE in rate control for probe rate
Vasanthakumar Thiagarajan [Thu, 12 Mar 2009 10:02:54 +0000 (15:32 +0530)]
ath9k: Set IEEE80211_TX_CTL_RATE_CTRL_PROBE in rate control for probe rate

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agocfg80211/nl80211: remove usage of CONFIG_NL80211
Reinette Chatre [Thu, 12 Mar 2009 16:20:40 +0000 (09:20 -0700)]
cfg80211/nl80211: remove usage of CONFIG_NL80211

The scan capability added to cfg80211/nl80211 introduced a
dependency on nl80211 by cfg80211. We can thus no longer have
just cfg80211 without nl80211. Specifically, cfg80211_scan_done()
calls nl80211_send_scan_aborted() or nl80211_send_scan_done().

Now we remove the option for user to select nl80211. It will always
be compiled if user selects cfg80211.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: ieee80211_ibss_commit() cleanup
Alina Friedrichsen [Mon, 9 Mar 2009 23:49:46 +0000 (00:49 +0100)]
mac80211: ieee80211_ibss_commit() cleanup

Don't call ieee80211_sta_find_ibss() directly, like it's done in STA
mode, so that the commit() call is more harmless respectively has
less site-effects.

Signed-off-by: Alina Friedrichsen <x-alina@gmx.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoucc_geth: Fix three oopses in PHY {de,}initialization code
Anton Vorontsov [Fri, 27 Mar 2009 23:00:03 +0000 (16:00 -0700)]
ucc_geth: Fix three oopses in PHY {de,}initialization code

When there are no free snums, UCC ethernet should gracefully fail, but
currently it oopses this way:

  # ifconfig eth0 up
  fill_init_enet_entries: Can not get SNUM.
  ucc_geth_startup: Can not fill p_init_enet_param_shadow.
  eth0: Cannot configure net device, aborting.
  Unable to handle kernel paging request for data at address 0x00000190
  Faulting instruction address: 0xc0294c88
  Oops: Kernel access of bad area, sig: 11 [#1]
  [...]
  NIP [c0294c88] mutex_lock+0x0/0x1c
  LR [c01b6be8] phy_stop+0x20/0x70
  Call Trace:
  [efb25da0] [efb2eb60] 0xefb2eb60 (unreliable)
  [efb25db0] [c01b2058] ucc_geth_stop+0x2c/0x8c
  [efb25dd0] [c01b4194] ucc_geth_open+0x48/0x27c
  [efb25df0] [c020eec0] dev_open+0xc0/0x118
  [...]

This is because the ucc_geth_stop() routine assumes that ugeth->phydev
is always initialized by the ucc_geth_open(), while it is not in case
of errors.

If we add a check to the ucc_geth_stop(), then another oops pops up:

  Unable to handle kernel paging request for data at address 0x00000004
  Faulting instruction address: 0xc01b46a4
  Oops: Kernel access of bad area, sig: 11 [#1]
  [...]
  NIP [c01b46a4] adjust_link+0x20/0x1b4
  LR [c01b770c] phy_state_machine+0xdc/0x44c
  Call Trace:
  [ef83bf10] [c021b388] linkwatch_schedule_work+0x74/0xf8 (unreliable)
  [ef83bf40] [c01b770c] phy_state_machine+0xdc/0x44c
  [ef83bf60] [c004c13c] run_workqueue+0xb8/0x148
  [ef83bf90] [c004c870] worker_thread+0x70/0xd0
  [ef83bfd0] [c00505fc] kthread+0x48/0x84
  [ef83bff0] [c000f464] kernel_thread+0x4c/0x68
  [...]

That one happens because ucc_geth_stop() does not call phy_disconnect()
and so phylib state machine is running without any idea that a MAC has
just died.

Also, when device tree specifies fixed-link, and CONFIG_FIXED_PHY
is disabled, we'll get this oops:

  0:01 not found
  eth2: Could not attach to PHY
  eth2: Cannot initialize PHY, aborting.
  Unable to handle kernel paging request for data at address 0x00000190
  Faulting instruction address: 0xc02967d0
  Oops: Kernel access of bad area, sig: 11 [#1]
  [...]
  NIP [c02967d0] mutex_lock+0x0/0x1c
  LR [c01b6bcc] phy_stop+0x20/0x70
  Call Trace:
  [ef82be50] [efb6bb60] 0xefb6bb60 (unreliable)
  [ef82be60] [c01b2058] ucc_geth_stop+0x2c/0x8c
  [ef82be80] [c01b4194] ucc_geth_open+0x48/0x27c
  [ef82bea0] [c0210a04] dev_open+0xc0/0x118
  [ef82bec0] [c020f85c] dev_change_flags+0x84/0x1ac
  [ef82bee0] [c037b768] ic_open_devs+0x168/0x2bc
  [ef82bf20] [c037ca98] ip_auto_config+0x90/0x28c
  [ef82bf60] [c0001b9c] do_one_initcall+0x34/0x1a0
  [ef82bfd0] [c035e240] do_initcalls+0x38/0x58
  [ef82bfe0] [c035e2c4] kernel_init+0x30/0x90
  [ef82bff0] [c000f464] kernel_thread+0x4c/0x68
  [...]

And again, ucc_geth_stop() assumes that ugeth->phydev is there, while
it isn't.

This patch fixes all three oopses simply by rearranging some code:

- In ucc_geth_open(): move init_phy() call to the beginning, so
  that we only call ucc_geth_stop() with a PHY attached;
- Move phy_disconnect() call from ucc_geth_close() to
  ucc_geth_stop(), so that we'll always disconnect the PHY.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet: Add missing include into include/linux/netdevice.h
Dmitri Vorobiev [Fri, 27 Mar 2009 22:55:36 +0000 (15:55 -0700)]
net: Add missing include into include/linux/netdevice.h

The inline function skb_gro_mac_header defined in include/linux/netdevice.h
makes use of page_address(). Depending on configuration options, the latter
is either defined as a macro or is declared as a function in another header
file, namely include/linux/mm.h. However, include/linux/netdevice.h does not
include include/linux/mm.h.

On MIPS, this has produced the following build error:

  CC      kernel/sysctl_check.o
In file included from include/linux/icmpv6.h:173,
                 from include/linux/ipv6.h:208,
                 from include/net/ip_vs.h:26,
                 from kernel/sysctl_check.c:6:
include/linux/netdevice.h: In function 'skb_gro_mac_header':
include/linux/netdevice.h:1132: error: implicit declaration of function
'page_address'
include/linux/netdevice.h:1133: warning: pointer/integer type mismatch
in conditional expression
make[1]: *** [kernel/sysctl_check.o] Error 1
make: *** [kernel] Error 2

The patch adds the missing include and fixes the build error.

Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@movial.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agogianfar: only check headroom when FCB is needed
Li Yang [Fri, 27 Mar 2009 22:54:30 +0000 (15:54 -0700)]
gianfar: only check headroom when FCB is needed

Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoMerge branch 'master' of /home/davem/src/GIT/linux-2.6/
David S. Miller [Fri, 27 Mar 2009 22:37:57 +0000 (15:37 -0700)]
Merge branch 'master' of /home/davem/src/GIT/linux-2.6/