profile/ivi/kernel-adaptation-intel-automotive.git
15 years agowext: default to y
Johannes Berg [Wed, 1 Jul 2009 19:26:44 +0000 (21:26 +0200)]
wext: default to y

The way I initially thought we could do wireless extensions
is by making all the compat code in cfg80211 be independent
of CONFIG_WIRELESS_EXT, but this is turning out to not be
feasible. Therefore, fix the Kconfig help text and make the
option default to yes, so people won't get a nasty surprise
when mac80211 will get rid of its 'select WIRELESS_EXT' any
time now.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: fix todo lock
Johannes Berg [Wed, 1 Jul 2009 19:26:43 +0000 (21:26 +0200)]
mac80211: fix todo lock

The key todo lock can be taken from different locks
that require it to be _bh to avoid lock inversion
due to (soft)irqs.

This should fix the two problems reported by Bob and
Gabor:
http://mid.gmane.org/20090619113049.GB18956@hash.localnet
http://mid.gmane.org/4A3FA376.8020307@openwrt.org

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: Bob Copeland <me@bobcopeland.com>
Cc: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agowext: allow returning NULL stats
Johannes Berg [Wed, 1 Jul 2009 19:26:42 +0000 (21:26 +0200)]
wext: allow returning NULL stats

Currently, wext drivers cannot return NULL for stats even though
that would make the ioctl return -EOPNOTSUPP because that would
mean they are no longer listed in /proc/net/wireless. This patch
changes the wext core's behaviour to list them if they have any
wireless_handlers, but only show their stats when available, so
that drivers can start returning NULL if stats are currently not
available, reducing confusion for e.g. IBSS.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211_hwsim: fix-up build damage from removal of skb->dst
John W. Linville [Tue, 30 Jun 2009 20:55:52 +0000 (16:55 -0400)]
mac80211_hwsim: fix-up build damage from removal of skb->dst

Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: remove ath_rx_ps_back_to_sleep helper
Gabor Juhos [Fri, 19 Jun 2009 10:17:48 +0000 (12:17 +0200)]
ath9k: remove ath_rx_ps_back_to_sleep helper

This helper only clears the SC_OP_WAIT_FOR_{BEACON,CAB} flags.
Remove it and clear these flags directly in the approptiate
places instead.

Changes-licensed-under: ISC
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: remove unnecessary clearing of SC_OP_WAIT_{BEACON,CAB} flags
Gabor Juhos [Fri, 19 Jun 2009 10:17:47 +0000 (12:17 +0200)]
ath9k: remove unnecessary clearing of SC_OP_WAIT_{BEACON,CAB} flags

All SC_OP_WAIT_* flags will be cleared in 'ath9k_conf' when PS mode
is disabled, so we don't have to clear it here.

Changes-licensed-under: ISC
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agocfg80211: send wext MLME-MICHAELMICFAILURE.indication
Johannes Berg [Fri, 19 Jun 2009 00:45:21 +0000 (02:45 +0200)]
cfg80211: send wext MLME-MICHAELMICFAILURE.indication

Instead of having mac80211 do it itself.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoorinoco: remove WE nickname support
David Kilroy [Thu, 18 Jun 2009 22:21:35 +0000 (23:21 +0100)]
orinoco: remove WE nickname support

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoorinoco: convert giwrange to cfg80211
David Kilroy [Thu, 18 Jun 2009 22:21:34 +0000 (23:21 +0100)]
orinoco: convert giwrange to cfg80211

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoorinoco: convert scanning to cfg80211
David Kilroy [Thu, 18 Jun 2009 22:21:33 +0000 (23:21 +0100)]
orinoco: convert scanning to cfg80211

This removes the custom scan cache used by orinoco.

We also have to avoid calling cfg80211_scan_done from the hard
interrupt, so we offload the entirety of scan processing to a workqueue.

This may behave strangely if you start scanning just prior to
suspending...

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoorinoco: convert mode setting to cfg80211
David Kilroy [Thu, 18 Jun 2009 22:21:32 +0000 (23:21 +0100)]
orinoco: convert mode setting to cfg80211

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoorinoco: provide generic commit function
David Kilroy [Thu, 18 Jun 2009 22:21:31 +0000 (23:21 +0100)]
orinoco: provide generic commit function

This allows changes to be commited from cfg80211 functions.

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoorinoco: Handle suspend/restore in core driver
David Kilroy [Thu, 18 Jun 2009 22:21:30 +0000 (23:21 +0100)]
orinoco: Handle suspend/restore in core driver

Each device does almost exactly the same things on suspend and resume
when upping and downing the interface. So move this logic into a common
routine.

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoairport: store irq in card private structure
David Kilroy [Thu, 18 Jun 2009 22:21:29 +0000 (23:21 +0100)]
airport: store irq in card private structure

... instead of relying on the net_device fields.

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoorinoco: move netdev interface creation to main driver
David Kilroy [Thu, 18 Jun 2009 22:21:28 +0000 (23:21 +0100)]
orinoco: move netdev interface creation to main driver

With the move to cfg80211 it's nice to keep the hardware operations
distinct from the interface, even though we can only support a single
interface.

This also means the driver resembles other cfg80211 drivers.

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoorinoco: make firmware download less verbose
David Kilroy [Thu, 18 Jun 2009 22:21:27 +0000 (23:21 +0100)]
orinoco: make firmware download less verbose

The firmware download code has been in a couple of releases, without any
significant issues reported in this code.

Convert to use pr_debug, so the messages can be recoverred by defining
DEBUG.

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoorinoco: initiate cfg80211 conversion
David Kilroy [Thu, 18 Jun 2009 22:21:26 +0000 (23:21 +0100)]
orinoco: initiate cfg80211 conversion

Initialise and register a wiphy.

Store the orinoco_private structure in the new wiphy, and use the
net_device private area to store the wireless_dev. This results in a
change to the way we navigate from a net_device to the driver private
orinoco_private, which we encapsulate in the inline function ndev_priv.
Most of the remaining calls to netdev_priv are thus replaced by
ndev_priv.

We can immediately rely on cfg80211 to handle SIOCGIWNAME, so
orinoco_ioctl_getname is removed.

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoorinoco: Change set_tkip to use orinoco_private instead of hermes_t
David Kilroy [Thu, 18 Jun 2009 22:21:25 +0000 (23:21 +0100)]
orinoco: Change set_tkip to use orinoco_private instead of hermes_t

hw.h does not include hermes.h, and none of the other functions
requires types from that file. Also hermes_t is a (discouraged) typedef
so we can't add a forward declaration. Therefore change this function to
use orinoco_private.

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoorinoco: initialise independently of netdev
David Kilroy [Thu, 18 Jun 2009 22:21:24 +0000 (23:21 +0100)]
orinoco: initialise independently of netdev

Initialise the orinoco driver before registerring with netdev, which
will help when we get to cfg80211...

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoorinoco: Replace net_device with orinoco_private in driver interfaces
David Kilroy [Thu, 18 Jun 2009 22:21:23 +0000 (23:21 +0100)]
orinoco: Replace net_device with orinoco_private in driver interfaces

Move away from using net_device as the main structure in orinoco
function calls. Use orinoco_private instead.

This makes more sense when we move to cfg80211, and we get wiphys as
well.

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoorinoco: firmware helpers should use dev_err and friends
David Kilroy [Thu, 18 Jun 2009 22:21:22 +0000 (23:21 +0100)]
orinoco: firmware helpers should use dev_err and friends

We should be able to call these routines before we register with
netdev, so avoid printks using the netdev name.

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoorinoco: use dev_err in early initialisation routines
David Kilroy [Thu, 18 Jun 2009 22:21:21 +0000 (23:21 +0100)]
orinoco: use dev_err in early initialisation routines

This allows us to use determine_fw_capabilities,
orinoco_hw_read_card_setting and orinoco_hw_allocate_fid prior to
netdev registration.

Since dev_dbg only prints if DEBUG is defined (or dynamic debug is
enabled), move a couple of the more useful prints up to info.

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoorinoco: Move FID allocation to hw.c
David Kilroy [Thu, 18 Jun 2009 22:21:20 +0000 (23:21 +0100)]
orinoco: Move FID allocation to hw.c

This is part of refactorring the initialisation code so that we can
load the firmware before registerring with netdev.

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoorinoco: Move card reading code into hw.c
David Kilroy [Thu, 18 Jun 2009 22:21:19 +0000 (23:21 +0100)]
orinoco: Move card reading code into hw.c

This is part of refactorring the initialisation code so that we can
load the firmware before registerring with netdev.

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoorinoco: Move firmware capability determination into hw.c
David Kilroy [Thu, 18 Jun 2009 22:21:18 +0000 (23:21 +0100)]
orinoco: Move firmware capability determination into hw.c

This is part of refactorring the initialisation code so that we can load
the firmware before registerring with netdev.

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agocfg80211: infer WPA and WPA2 support from TKIP and CCMP
David Kilroy [Thu, 18 Jun 2009 22:21:17 +0000 (23:21 +0100)]
cfg80211: infer WPA and WPA2 support from TKIP and CCMP

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agocfg80211: set WE encoding size based on available ciphers
David Kilroy [Thu, 18 Jun 2009 22:21:16 +0000 (23:21 +0100)]
cfg80211: set WE encoding size based on available ciphers

Only set the sizes for WEP40 and WEP104.

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agocfg80211: allow drivers that can't scan for specific ssids
David Kilroy [Thu, 18 Jun 2009 22:21:15 +0000 (23:21 +0100)]
cfg80211: allow drivers that can't scan for specific ssids

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agocfg80211: Advertise ciphers via WE according to driver capability
David Kilroy [Thu, 18 Jun 2009 22:21:14 +0000 (23:21 +0100)]
cfg80211: Advertise ciphers via WE according to driver capability

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agocfg80211: add wrapper function to get wiphy from priv pointer
David Kilroy [Thu, 18 Jun 2009 22:21:13 +0000 (23:21 +0100)]
cfg80211: add wrapper function to get wiphy from priv pointer

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211_hwsim: clean up the skb before passing it back
Johannes Berg [Thu, 18 Jun 2009 12:51:12 +0000 (14:51 +0200)]
mac80211_hwsim: clean up the skb before passing it back

We need to clean up the skb before we can copy it, this
is required for proper operation since the socket it is
still attached to could potentially live in a different
network namespace or so.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agozd1211rw: sort vid/pid pairs by numerical value
Hin-Tak Leung [Thu, 18 Jun 2009 02:53:26 +0000 (03:53 +0100)]
zd1211rw: sort vid/pid pairs by numerical value

In the past ids were inserted in no particular order and it has
become hard to see what ids are already included or not. This
patch sorts the ids by numerical value and has no functional effect.

Signed-off-by: Hin-Tak Leung <htl10@users.sourceforge.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agocfg80211: prohibit scanning the same channel more than once
Johannes Berg [Wed, 17 Jun 2009 15:41:49 +0000 (17:41 +0200)]
cfg80211: prohibit scanning the same channel more than once

It isn't very useful to scan the same channel more than once
during a given scan, and some hardware (notably iwlwifi) can
only scan a limited number of channels at a time. To prevent
any overflows, simply disallow scanning any channel multiple
times in a given scan command. This is a small change in the
userspace ABI, but the only user, wpa_supplicant, never asks
for a scan with the same frequency listed twice.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: improve per-sta debugfs
Johannes Berg [Wed, 17 Jun 2009 15:28:45 +0000 (17:28 +0200)]
mac80211: improve per-sta debugfs

We had code for a number of files, that we didn't publish
in debugfs, fix that. Also make the agg_status file layout
more readable and add more information to it.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: push rx status into skb->cb
Johannes Berg [Wed, 17 Jun 2009 11:13:00 +0000 (13:13 +0200)]
mac80211: push rx status into skb->cb

Within mac80211, we often need to copy the rx status into
skb->cb. This is wasteful, as drivers could be building it
in there to start with. This patch changes the API so that
drivers are expected to pass the RX status in skb->cb, now
accessible as IEEE80211_SKB_RXCB(skb). It also updates all
drivers to pass the rx status in there, but only by making
them memcpy() it into place before the call to the receive
function (ieee80211_rx(_irqsafe)). Each driver can now be
optimised on its own schedule.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agort2x00: remove skb->do_not_encrypt usage
Johannes Berg [Tue, 16 Jun 2009 18:46:45 +0000 (20:46 +0200)]
rt2x00: remove skb->do_not_encrypt usage

Johannes is trying to get rid of the master netdev and in the process will
remove skb->do_not_encrypt field. This removes the do_not_encrypt
usage from rt2x00 to make the change easier.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agocfg80211: issue netlink notification when scan starts
Johannes Berg [Tue, 16 Jun 2009 17:56:42 +0000 (19:56 +0200)]
cfg80211: issue netlink notification when scan starts

To ease multiple apps working together smoothly,
send a notification when a scan is started.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agorndis_wlan: convert set/get txpower to cfg80211
Jussi Kivilinna [Tue, 16 Jun 2009 14:17:32 +0000 (17:17 +0300)]
rndis_wlan: convert set/get txpower to cfg80211

Convert set/get txpower to cfg80211 and add stop netdev handler to turn off
radio for rfkill.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agousbnet: Add stop function pointer to 'struct rndis_data'.
Jussi Kivilinna [Tue, 16 Jun 2009 14:17:27 +0000 (17:17 +0300)]
usbnet: Add stop function pointer to 'struct rndis_data'.

Allow minidriver to know that netdev has stopped. This is to let
wireless turn off radio when usbnet dev is stopped.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agorndis_wlan: convert get/set frag/rts to cfg80211
Jussi Kivilinna [Tue, 16 Jun 2009 14:17:21 +0000 (17:17 +0300)]
rndis_wlan: convert get/set frag/rts to cfg80211

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwmc3200wifi: rfkill cleanup
Zhu Yi [Mon, 15 Jun 2009 19:59:56 +0000 (21:59 +0200)]
iwmc3200wifi: rfkill cleanup

The patch cleans up the unused rfkill related structures and flags.
It also adds wext and cfg80211 handlers for txpower auto and off so
that software rfkill could be issued by user space.

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: Samuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwmc3200wifi: cache keys when interface is down
Samuel Ortiz [Mon, 15 Jun 2009 19:59:54 +0000 (21:59 +0200)]
iwmc3200wifi: cache keys when interface is down

When the interface is down and one sets a WEP key from userspace, we should
be able to simply cache it.
Since that implies setting part of the profile's security settings, we now
alloc/free the umac_profile at probe/remove time, and no longer at interface
bring up/down time. Simply resetting it during the latter is enough.

Signed-off-by: Samuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwmc3200wifi: change coexist periodic calibration flag
Zhu Yi [Mon, 15 Jun 2009 19:59:53 +0000 (21:59 +0200)]
iwmc3200wifi: change coexist periodic calibration flag

The patch changes coexist periodic calibration priority flag. It also
set wireless mode to UMAC and set PM control flag to 0x1.

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: Samuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwmc3200wifi: cfg80211 key hooks implemetation
Samuel Ortiz [Mon, 15 Jun 2009 19:59:52 +0000 (21:59 +0200)]
iwmc3200wifi: cfg80211 key hooks implemetation

This patch implements the new cfg80211 privacy related hooks: add/get/set_key
and the set_default_key one.
With this implementation we can now call the wext-compat *encode* routines and
reduce our own wext code.

Signed-off-by: Samuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwmc3200wifi: handling wifi_if_ntfy responses
Samuel Ortiz [Mon, 15 Jun 2009 19:59:51 +0000 (21:59 +0200)]
iwmc3200wifi: handling wifi_if_ntfy responses

When we're calling iwm_send_wifi_if_cmd() with the resp flag set, we're
currently waiting on the mlme queue, waiting for some flags here and there to
show up.
This patch adds a wifi_ntfy bitmap, and when we're sending a wifi_if command
expecting an answers, we wait synchronously for it to show up, on a dedicated
queue. The wifi_ntfy bit is set when we receive the corresponding answer.

Signed-off-by: Samuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwmc3200wifi: invalidate keys when changing the BSSID
Samuel Ortiz [Mon, 15 Jun 2009 19:59:50 +0000 (21:59 +0200)]
iwmc3200wifi: invalidate keys when changing the BSSID

While associated, we have to invalidate our key cache if we clear our BSSID
through siwap.

Signed-off-by: Samuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwlwifi: remove disable_tx_power for device > 4965
Wey-Yi Guy [Fri, 12 Jun 2009 20:22:55 +0000 (13:22 -0700)]
iwlwifi: remove disable_tx_power for device > 4965

After 4965, tx_power_calibration moved from driver to uCode.
remove "disable_tx_power" from debugfs to minimize the confusion.

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 agoiwlwifi: no need to refer to max_nrg_cck range value
Wey-Yi Guy [Fri, 12 Jun 2009 20:22:54 +0000 (13:22 -0700)]
iwlwifi: no need to refer to max_nrg_cck range value

max_nrg_cck value inside the sensitivity range structure is not needed
for sensitivity calibration.
Keep the parameter in sensitivity structure but set the value to "0" in case
needed in the future implementation.

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 agoiwlwifi: modify sensitivity value for 5150
Wey-Yi Guy [Fri, 12 Jun 2009 20:22:53 +0000 (13:22 -0700)]
iwlwifi: modify sensitivity value for 5150

In 5150 there is a long delay between the AGC(Automatic Gain Control) command
till the RF is stabilized causing us to miss detections when there was
adjacent channel noise, so we need to adjusted the Sensitivity calibration
for 5150 differently.

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 agowl1251: change psm enabled/disabled info to debug
Luciano Coelho [Fri, 12 Jun 2009 11:17:53 +0000 (14:17 +0300)]
wl1251: change psm enabled/disabled info to debug

With shorter CAM timeouts, the logs get flooded with "psm enabled" and "psm
disabled traces.  This patch changes it from wl1251_info to wl1251_debug, so
they are only shown if DEBUF_PSM is enabled.

Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Reviewed-by: Janne Ylalehto <janne.ylalehto@nokia.com>
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agowl1251: fix a checkpatch warning
Kalle Valo [Fri, 12 Jun 2009 11:17:47 +0000 (14:17 +0300)]
wl1251: fix a checkpatch warning

drivers/net/wireless/wl12xx/wl1251_main.c:158: WARNING:
braces {} are not necessary for single statement blocks

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agowl1251: use wl1251 prefix everywhere
Kalle Valo [Fri, 12 Jun 2009 11:17:39 +0000 (14:17 +0300)]
wl1251: use wl1251 prefix everywhere

Last we can change all code prefixes from wl12xx/WL12XX to
wl1251/WL1251.

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Reviewed-by: Vidhya Govindan <vidhya.govindan@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agowl12xx: remove unused wl12xx_hw_init_mem_config()
Kalle Valo [Fri, 12 Jun 2009 11:17:33 +0000 (14:17 +0300)]
wl12xx: remove unused wl12xx_hw_init_mem_config()

The function declaration is a leftover from some earlier, already
removed, code.

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Reviewed-by: Vidhya Govindan <vidhya.govindan@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agowl1251: rename wl12xx.h to wl1251.h
Kalle Valo [Fri, 12 Jun 2009 11:17:25 +0000 (14:17 +0300)]
wl1251: rename wl12xx.h to wl1251.h

wl12xx.h is now only used by 1251 code, so we can rename it.

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Reviewed-by: Vidhya Govindan <vidhya.govindan@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agowl1251: add wl1251 prefix to all 1251 files
Kalle Valo [Fri, 12 Jun 2009 11:17:19 +0000 (14:17 +0300)]
wl1251: add wl1251 prefix to all 1251 files

Now that all 1271 files are split, we can add wl1251_ prefix to the files.

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Reviewed-by: Vidhya Govindan <vidhya.govindan@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agowl1251: remove wl1271_setup()
Kalle Valo [Fri, 12 Jun 2009 11:17:12 +0000 (14:17 +0300)]
wl1251: remove wl1271_setup()

We don't want to have any 1271 code in wl1251.

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Reviewed-by: Vidhya Govindan <vidhya.govindan@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agowl12xx: rename driver to wl1251
Kalle Valo [Fri, 12 Jun 2009 11:17:06 +0000 (14:17 +0300)]
wl12xx: rename driver to wl1251

Rename driver to wl1251.ko in preparation for wl1271 driver.

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Reviewed-by: Vidhya Govindan <vidhya.govindan@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agowl12xx: rename wl1251.c wl1251_ops.c
Kalle Valo [Fri, 12 Jun 2009 11:16:58 +0000 (14:16 +0300)]
wl12xx: rename wl1251.c wl1251_ops.c

In preparation to split wl12xx to wl1251 and wl1271.

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Reviewed-by: Vidhya Govindan <vidhya.govindan@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agowl12xx: Use chipset specific join commands
Juuso Oikarinen [Fri, 12 Jun 2009 11:16:52 +0000 (14:16 +0300)]
wl12xx: Use chipset specific join commands

Add implementation to use chipset specific join commands.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agowl12xx: Assign value to rx msdu lifetime variable
Vidhya Govindan [Fri, 12 Jun 2009 11:16:45 +0000 (14:16 +0300)]
wl12xx: Assign value to rx msdu lifetime variable

The patch "wl12xx: cmd and acx interface rework" failed to assign MSDU
lifetime value in wl12xx_acx_rx_msdu_life_time() and breaks the functionality.
This patch fixes the regression by assigning the correct value.

Signed-off-by: Vidhya Govindan <vidhya.govindan@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agowl12xx: enable ELP mode
Kalle Valo [Fri, 12 Jun 2009 11:16:39 +0000 (14:16 +0300)]
wl12xx: enable ELP mode

ELP mode is working now, let's enable it so that the firmware can sleep
and reduce power consumption.

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Reviewed-by: Vidhya Govindan <vidhya.govindan@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agowl12xx: check if elp wakeup failed
Kalle Valo [Fri, 12 Jun 2009 11:16:32 +0000 (14:16 +0300)]
wl12xx: check if elp wakeup failed

Check the return call from wl12xx_ps_elp_wakeup() and bail out if it
fails. This shouldn't happen, but if does there's a fundamental low
level issue.

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Reviewed-by: Vidhya Govindan <vidhya.govindan@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agowl12xx: optimise elp wakeup and sleep calls
Kalle Valo [Fri, 12 Jun 2009 11:16:26 +0000 (14:16 +0300)]
wl12xx: optimise elp wakeup and sleep calls

The wakeup call was done too deep in code path, it's better to wakeup
chip from higher levels. This will also reduce wakeup calls significantly.

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agowl12xx: protect wl12xx_op_set_rts_threshold()
Kalle Valo [Fri, 12 Jun 2009 11:16:20 +0000 (14:16 +0300)]
wl12xx: protect wl12xx_op_set_rts_threshold()

The function doesn't lock the mutex before sending the acx.

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Reviewed-by: Vidhya Govindan <vidhya.govindan@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agowl12xx: Fix CMD_TEST regression via netlink.
Ari Kauppi [Fri, 12 Jun 2009 11:16:13 +0000 (14:16 +0300)]
wl12xx: Fix CMD_TEST regression via netlink.

CMD_TEST via netlink API has been broken since
e29c3f59cfbc38c3b481a2694b08962da19c4664: cmd and acx interface rework.

The user of the interface sends the request in a buffer without the
wl12xx_command header but expects the response to have the wl12xx_command
header (with id and status).

This patch reverts the e29c3f5 commit for cmd.c:wl12xx_cmd_test
and implements the needed wrapper functionality in netlink.c. Now the
API of wl12xx_cmd_test and rest of wl12xx_cmd_* commands in cmd.c are
similar.

Signed-off-by: Ari Kauppi <Ext-Ari.Kauppi@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agowl12xx: Fix incorrect warning message.
Ari Kauppi [Fri, 12 Jun 2009 11:16:07 +0000 (14:16 +0300)]
wl12xx: Fix incorrect warning message.

A warning message in wl12xx_acx_event_mbox_mask has a copy/paste
error. Fix it to print the correct acx command.

Signed-off-by: Ari Kauppi <Ext-Ari.Kauppi@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agowl12xx: Add support for block reading from a fixed register address
Juuso Oikarinen [Fri, 12 Jun 2009 11:16:00 +0000 (14:16 +0300)]
wl12xx: Add support for block reading from a fixed register address

Add support for block reading (multiple bytes) from a fixed chipset
register address. This is required for the wl1271 TX data path.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agowl12xx: Moved wl1251 TX path implementation into chip specific files
Juuso Oikarinen [Fri, 12 Jun 2009 11:15:54 +0000 (14:15 +0300)]
wl12xx: Moved wl1251 TX path implementation into chip specific files

Moved wl1251 TX path implementation into chip specific files to enable
parallel implementation for the wl1271 TX path.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agowl12xx: pass the wake up condition when configuring the wake up event
Luciano Coelho [Fri, 12 Jun 2009 11:15:46 +0000 (14:15 +0300)]
wl12xx: pass the wake up condition when configuring the wake up event

Changed the function wl12xx_acx_wake_up_conditions() so that it receives an
argument with the actual wake up condition, instead of having
WAKE_UP_EVENT_DTIM_BITMAP hardcoded.  This is needed because we have to use
different conditions in 1271.

Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agowl12xx: add support for fixed address in wl12xx_spi_read
Luciano Coelho [Fri, 12 Jun 2009 11:15:41 +0000 (14:15 +0300)]
wl12xx: add support for fixed address in wl12xx_spi_read

In the wl1271 implementation, we need to read memory from the register
partition using fixed addresses.  This change adds the possibility to request
fixed address when calling wl12xx_spi_read() or wl12xx_spi_reg_read().

Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agowl12xx: add support for new WL1271 chip revision
Luciano Coelho [Fri, 12 Jun 2009 11:15:33 +0000 (14:15 +0300)]
wl12xx: add support for new WL1271 chip revision

This patch adds the code that recognizes the new WL1271 chip revision (PG 2.0).
Full support for this chip is not yet implemented and support for WL1271 PG 1.0
is not guaranteed anymore.

Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agowl12xx: moved firmware version reading routine to chip-specific functions
Luciano Coelho [Fri, 12 Jun 2009 11:15:27 +0000 (14:15 +0300)]
wl12xx: moved firmware version reading routine to chip-specific functions

With WL1271, the firmware version can only be read right after booting the
chip.  To keep WL1251 aligned with this procedure, the code that reads the
firmware version initially has been moved to a common place where it can be
read from both chipsets.

Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agowl12xx: add wl12xx_spi_reg_read() and wl12xx_spi_reg_write() functions
Luciano Coelho [Fri, 12 Jun 2009 11:15:22 +0000 (14:15 +0300)]
wl12xx: add wl12xx_spi_reg_read() and wl12xx_spi_reg_write() functions

In some cases we need to read more than 32 bits from the register area.
These functions were added to support that, like the existing
wl12xx_spi_mem_read() and wl12xx_spi_mem_write() already do for large blocks
in the memory area.

Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agowl12xx: removed chipset interrupt source configuration from fw wakeup
Juuso Oikarinen [Fri, 12 Jun 2009 11:15:13 +0000 (14:15 +0300)]
wl12xx: removed chipset interrupt source configuration from fw wakeup

The chipset source interrupt source configuration during fw wakeup was
blocking interrupts on the wl1271. The configuration is effectively
unused here as it is used to trigger an interrupt for the chipset
wake-up event, which is not handled, or waited for, in the fw wakeup
anyway on either wl1251 or wl1271.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agowl12xx: fix rx descriptor use
Kalle Valo [Fri, 12 Jun 2009 11:15:08 +0000 (14:15 +0300)]
wl12xx: fix rx descriptor use

Rx descriptor was incorrectly allocated from stack, use struct wl12xx
instead. Needed for DMA transfers.

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agowl12xx: use wl12xx_mem_read32() to read the rx counter
Kalle Valo [Fri, 12 Jun 2009 11:15:00 +0000 (14:15 +0300)]
wl12xx: use wl12xx_mem_read32() to read the rx counter

As a side effect the transfer is now DMA safe.

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agowl12xx: allocate buffer the spi busy word from struct wl12xx
Kalle Valo [Fri, 12 Jun 2009 11:14:55 +0000 (14:14 +0300)]
wl12xx: allocate buffer the spi busy word from struct wl12xx

Needed for DMA transfers.

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agowl12xx: allocate buffer spi read/write command buffer kzalloc()
Kalle Valo [Fri, 12 Jun 2009 11:14:47 +0000 (14:14 +0300)]
wl12xx: allocate buffer spi read/write command buffer kzalloc()

Needed for DMA safe transfers.

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agowl12xx: reserve buffer for partition command in struct wl12xx
Kalle Valo [Fri, 12 Jun 2009 11:14:41 +0000 (14:14 +0300)]
wl12xx: reserve buffer for partition command in struct wl12xx

This is now DMA safe.

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agowl12xx: fix error handling in wl12xx_probe()
Kalle Valo [Fri, 12 Jun 2009 11:14:34 +0000 (14:14 +0300)]
wl12xx: fix error handling in wl12xx_probe()

Resources were not freed properly in some cases.

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agowl12xx: reserver buffer for read32()/write32() in struct wl12xx
Kalle Valo [Fri, 12 Jun 2009 11:14:28 +0000 (14:14 +0300)]
wl12xx: reserver buffer for read32()/write32() in struct wl12xx

The buffer is needed for DMA safe transfers.

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agowl12xx: cmd and acx interface rework
Kalle Valo [Fri, 12 Jun 2009 11:14:19 +0000 (14:14 +0300)]
wl12xx: cmd and acx interface rework

Rework cmd and acx interfaces, it was just too confusing earlier. Now
all commands need to contain all the needed headers, either just cmd
headers or both cmd and acx headers. This accomplish to remove the
extra copy done for each command. The interfaces are now properly
documented as well.

Also try to make all commands safe for DMA transfers. I might have missed
some, but most of them should be fixed now.

And this is not all! As a free bonus you will also get some cosmetic
cleanups and code reorganisation. Order today!

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: Make sure we configure a non-zero beacon interval
Vasanthakumar Thiagarajan [Fri, 12 Jun 2009 05:25:55 +0000 (10:55 +0530)]
ath9k: Make sure we configure a non-zero beacon interval

This patch moves the sanity check on beacon interval
which was done only for mesh mode to all operating
modes just to be safe.

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agolibertas: remove ps_supported flag, use fwcapinfo
Andrey Yurovsky [Tue, 16 Jun 2009 20:20:01 +0000 (13:20 -0700)]
libertas: remove ps_supported flag, use fwcapinfo

Power save support depends on the firmware capabilities rather than the
card's hardware interface.  Use the FW_CAPINFO_PS bit in the firmware
capabilities mask throughout the driver in place of the redundant
ps_supported flag and don't make decisions about PS support in the
interface drivers (with the exception of a special case in the USB
driver).

V2: put the USB special case in the right place.

Signed-off-by: Andrey Yurovsky <andrey@cozybit.com>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath5k: enable hardware LEDs
Bob Copeland [Thu, 11 Jun 2009 02:22:21 +0000 (22:22 -0400)]
ath5k: enable hardware LEDs

Cardbus and some PCI cards use hardware LEDs rather than software GPIOs.
Program them with the proper blink patterns when idle, scanning or
associated.  Fixes http://bugzilla.kernel.org/show_bug.cgi?id=13288.

Tested-by: Frans Pop <elendil@planet.nl>
Tested-by: Mark Hindley <mark@hindley.org.uk>
Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath5k: cleanup ath5k_hw struct
Bob Copeland [Thu, 11 Jun 2009 02:22:20 +0000 (22:22 -0400)]
ath5k: cleanup ath5k_hw struct

ah_gpios array isn't used, and ah_current_channel can be a pointer
instead of an embedded struct.  Removing these and some other
write-only variables, and moving some things around for better
packing and cache utilization saves 116 bytes.

   text    data     bss     dec     hex filename
 121762     472      64  122298   1ddba ath5k_before.ko
 121646     472      64  122182   1dd46 ath5k.ko

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: downgrade ASSERT() in ath_clone_txbuf()
Vasanthakumar Thiagarajan [Wed, 10 Jun 2009 12:20:09 +0000 (17:50 +0530)]
ath9k: downgrade ASSERT() in ath_clone_txbuf()

We can easily run out of tx buf if there is any stuck in
transmission, so downgrade it to WARN_ON().

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: Remove unnecessary count for addba attempt
Vasanthakumar Thiagarajan [Wed, 10 Jun 2009 12:20:08 +0000 (17:50 +0530)]
ath9k: Remove unnecessary count for addba attempt

mac80211 already has one to keep track of number of failure
addba attempts.

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: Nuke unneccesary helper function to see if aggr is active
Vasanthakumar Thiagarajan [Wed, 10 Jun 2009 12:20:07 +0000 (17:50 +0530)]
ath9k: Nuke unneccesary helper function to see if aggr is active

IEEE80211_TX_CTL_AMPDU in tx control flags should be enough
to confirm BA is negotiated for that tid.

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agocfg80211: pass netdev to change_virtual_intf
Johannes Berg [Tue, 9 Jun 2009 19:04:43 +0000 (21:04 +0200)]
cfg80211: pass netdev to change_virtual_intf

If there was a reason I'm passing the ifidx I cannot
remember it any more and don't see one now, so let's
just pass the pointer itself.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
David S. Miller [Fri, 10 Jul 2009 03:18:24 +0000 (20:18 -0700)]
Merge branch 'master' of /linux/kernel/git/davem/net-2.6

15 years agocxgb3: Fix crash caused by stashing wrong netdev_queue
Roland Dreier [Thu, 9 Jul 2009 09:30:25 +0000 (09:30 +0000)]
cxgb3: Fix crash caused by stashing wrong netdev_queue

Commit c3a8c5b6 ("cxgb3: move away from LLTX") exposed a bug in how
cxgb3 looks up the netdev_queue it stashes away in a qset during
initialization.  For multiport devices, the TX queue index it uses is
offset by the first_qset index of each port.  This leads to a crash
once LLTX is removed, since hard_start_xmit is called with one TX
queue lock held, while the TX reclaim timer task grabs a different
(wrong) TX queue lock when it frees skbs.

Fix this by removing the first_qset offset used to look up the TX
queue passed into t3_sge_alloc_qset() from setup_sge_qsets().

Signed-off-by: Roland Dreier <rolandd@cisco.com>
Acked-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoixgbe: Fix coexistence of FCoE and Flow Director in 82599
Yi Zou [Thu, 9 Jul 2009 02:29:50 +0000 (02:29 +0000)]
ixgbe: Fix coexistence of FCoE and Flow Director in 82599

Fix coexistence of Fiber Channel over Ethernet (FCoE) and Flow Director (FDIR)
in 82599 and remove the disabling of FDIR when FCoE is enabled.

Currently, FDIR is turned off when FCoE is enabled under the assumption that
FCoE is always enabled with DCB being turned on. However, FDIR does not have
to be turned off all the time when FCoE is enabled since FCoE can be enabled
without DCB being turned on, e.g., use link pause only. This patch makes sure
that when DCB is turned on or off, FDIR is turned on or off correspondingly;
and when FCoE is enabled, it does not disable FDIR, rather, it will have FDIR
set up properly so FCoE and FDIR can coexist regardless of DCB being on or off.

Signed-off-by: Yi Zou <yi.zou@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agomemory barrier: adding smp_mb__after_lock
Jiri Olsa [Wed, 8 Jul 2009 12:10:31 +0000 (12:10 +0000)]
memory barrier: adding smp_mb__after_lock

Adding smp_mb__after_lock define to be used as a smp_mb call after
a lock.

Making it nop for x86, since {read|write|spin}_lock() on x86 are
full memory barriers.

Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet: adding memory barrier to the poll and receive callbacks
Jiri Olsa [Wed, 8 Jul 2009 12:09:13 +0000 (12:09 +0000)]
net: adding memory barrier to the poll and receive callbacks

Adding memory barrier after the poll_wait function, paired with
receive callbacks. Adding fuctions sock_poll_wait and sk_has_sleeper
to wrap the memory barrier.

Without the memory barrier, following race can happen.
The race fires, when following code paths meet, and the tp->rcv_nxt
and __add_wait_queue updates stay in CPU caches.

CPU1                         CPU2

sys_select                   receive packet
  ...                        ...
  __add_wait_queue           update tp->rcv_nxt
  ...                        ...
  tp->rcv_nxt check          sock_def_readable
  ...                        {
  schedule                      ...
                                if (sk->sk_sleep && waitqueue_active(sk->sk_sleep))
                                        wake_up_interruptible(sk->sk_sleep)
                                ...
                             }

If there was no cache the code would work ok, since the wait_queue and
rcv_nxt are opposit to each other.

Meaning that once tp->rcv_nxt is updated by CPU2, the CPU1 either already
passed the tp->rcv_nxt check and sleeps, or will get the new value for
tp->rcv_nxt and will return with new data mask.
In both cases the process (CPU1) is being added to the wait queue, so the
waitqueue_active (CPU2) call cannot miss and will wake up CPU1.

The bad case is when the __add_wait_queue changes done by CPU1 stay in its
cache, and so does the tp->rcv_nxt update on CPU2 side.  The CPU1 will then
endup calling schedule and sleep forever if there are no more data on the
socket.

Calls to poll_wait in following modules were ommited:
net/bluetooth/af_bluetooth.c
net/irda/af_irda.c
net/irda/irnet/irnet_ppp.c
net/mac80211/rc80211_pid_debugfs.c
net/phonet/socket.c
net/rds/af_rds.c
net/rfkill/core.c
net/sunrpc/cache.c
net/sunrpc/rpc_pipe.c
net/tipc/socket.c

Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonetpoll: Fix carrier detection for drivers that are using phylib
Anton Vorontsov [Thu, 9 Jul 2009 03:09:44 +0000 (20:09 -0700)]
netpoll: Fix carrier detection for drivers that are using phylib

Using early netconsole and gianfar driver this error pops up:

  netconsole: timeout waiting for carrier

It appears that net/core/netpoll.c:netpoll_setup() is using
cond_resched() in a loop waiting for a carrier.

The thing is that cond_resched() is a no-op when system_state !=
SYSTEM_RUNNING, and so drivers/net/phy/phy.c's state_queue is never
scheduled, therefore link detection doesn't work.

I belive that the main problem is in cond_resched()[1], but despite
how the cond_resched() story ends, it might be a good idea to call
msleep(1) instead of cond_resched(), as suggested by Andrew Morton.

[1] http://lkml.org/lkml/2009/7/7/463

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
David S. Miller [Thu, 9 Jul 2009 01:13:13 +0000 (18:13 -0700)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-2.6

15 years agoincludecheck fix: include/linux, rfkill.h
Jaswinder Singh Rajput [Wed, 8 Jul 2009 15:55:54 +0000 (21:25 +0530)]
includecheck fix: include/linux, rfkill.h

fix the following 'make includecheck' warning:

  include/linux/rfkill.h: linux/types.h is included more than once.

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agop54: tx refused but queue active
Larry Finger [Wed, 8 Jul 2009 13:33:02 +0000 (08:33 -0500)]
p54: tx refused but queue active

In the mainline kernel, p54usb will fail because the TX queue length can
become < 0. This problem has been reported as Bugzilla #13725. The failure
is expressed by the following message in the logs:

WARNING: at net/mac80211/tx.c:1325 ieee80211_tx+0x23c/0x298 [mac80211]()
Hardware name: HP Pavilion dv2700 Notebook PC
tx refused but queue active

This problem has been recently observed in the wireless-testing tree, where
a full solution is being tested. That fix is too invasive for 2.6.31-rcX,
but the simple change supplied here will prevent the failure.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoAtheros Kconfig needs to be dependent on WLAN_80211
Jay Sternberg [Tue, 7 Jul 2009 18:18:46 +0000 (11:18 -0700)]
Atheros Kconfig needs to be dependent on WLAN_80211

Atheros top level menu needs a "depends WLAN_80211" to properly indent
within menuconfig and xconfig interfaces.

This is purely a visual issue but it effects all subsequent drivers.
The issue is the top level menu does not include a dependency on
WLAN_80211 so within the tree structure, Atheros is at the same level as
WLAN_80211 but when WLAN_80211 collapsed, the menu disappears along with
all subsequent drives, so it is really a subordinate.

Signed-off-by: Jay Sternberg <jay.e.sternberg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>