safe/jmp/linux-2.6
14 years agomac80211: fix PS-poll response, race
Johannes Berg [Fri, 24 Jul 2009 11:23:09 +0000 (13:23 +0200)]
mac80211: fix PS-poll response, race

When a station queries us for a PS-poll response, we wrongly
queue the frame on the virtual interface's queue rather than
the pending queue.

Additionally, fix a race condition where we could potentially
send multiple frames to the sleeping station due to using a
station flag rather than a packet flag. When converting to a
packet flag, we can also convert p54 and remove the filter
clearing we added for it.

(Also remove a now dead function)

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Reported-by: Bob Copeland <me@bobcopeland.com>
Tested-by: Bob Copeland <me@bobcopeland.com>
Cc: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: fix MLME issuing of probe requests while scanning
Luis R. Rodriguez [Thu, 23 Jul 2009 23:37:47 +0000 (16:37 -0700)]
mac80211: fix MLME issuing of probe requests while scanning

We were issuing probe requests to the associated AP on the wrong
band by having our beacon timer loss trigger while we are scanning.
When we would scan the timer could hit and force us to send a
probe request to the AP but with a chance we'd be on the wrong band.

This leads to finding no usable bitrate but we should not get so
far on the xmit path. We should not be trying to send these probe
request frames so prevent ieee80211_mgd_probe_ap() from sending
these.

As it turns out all callers of ieee80211_mgd_probe_ap() need this
check so we just move the scan check there. This means we can remove
the recenlty added check during ieee80211_sta_monitor_work().

Additionally we now fix a race condition added by the patch
"mac80211: do not monitor the connection while scanning" which
had the same check in ieee80211_sta_conn_mon_timer(). The race
happens because the timer routine *does* a valid check for
scanning but after it queues work into the mac80211 workqueue
the work callback can kick off with scanning enabled and cause
the same issue we were trying to avoid.

The more appropriate solution would be to disable the respective
timers during scan and re-enable them after scan but requires more
complex code and testing.

Cc: Christian Lamparter <chunkeey@web.de>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Reported-by: Fabio Rossi <rossi.f@inwind.it>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: fix mlme timeouts
Johannes Berg [Thu, 23 Jul 2009 14:50:16 +0000 (16:50 +0200)]
mac80211: fix mlme timeouts

When a new MLME work is created, its timeout is initialised
to 0. This is wrong, it could then be thought of as having
an actual timeout in the future (time_is_after_jiffies() can
return true). Instead, it should be initialised to jiffies
so that it will run right away as soon as the mlme work is
executed.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Reported-by: Luciano Roth Coelho <luciano.coelho@nokia.com>
Reported-by: Alban Browaeys <prahal@yahoo.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agocfg80211: increase scan result expire time
Helmut Schaa [Thu, 23 Jul 2009 10:14:29 +0000 (12:14 +0200)]
cfg80211: increase scan result expire time

Using background scanning in mac80211 the time a scan needs to
finish can exceed 10 seconds. Hence, increase the scan results
expire time to 15 seconds which should be sufficient.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: rename scan_state to next_scan_state
Helmut Schaa [Thu, 23 Jul 2009 10:14:20 +0000 (12:14 +0200)]
mac80211: rename scan_state to next_scan_state

Rename scan_state to next_scan_state to better reflect
what it is used for.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: implement basic background scanning
Helmut Schaa [Thu, 23 Jul 2009 11:18:01 +0000 (13:18 +0200)]
mac80211: implement basic background scanning

Introduce a new scan flag "SCAN_OFF_CHANNEL" which basically tells us
that we are currently on a different channel for scanning and cannot
RX/TX. "SCAN_SW_SCANNING" tells us that we are currently running a
software scan but we might as well be on the operating channel to RX/TX.
While "SCAN_SW_SCANNING" is set during the whole scan "SCAN_OFF_CHANNEL"
is set when leaving the operating channel and unset when coming back.

Introduce two new scan states "SCAN_LEAVE_OPER_CHANNEL" and
"SCAN_ENTER_OPER_CHANNEL" which basically implement the functionality we
need to leave the operating channel (send a nullfunc to the AP and stop
the queues) and enter it again (send a nullfunc to the AP and start the
queues again).

Enhance the scan state "SCAN_DECISION" to switch back to the operating
channel after each scanned channel. In the future it sould be simple
to enhance the decision state to scan as much channels in a row as the
qos latency allows us.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: Replace {sw, hw}_scanning variables with a bitfield
Helmut Schaa [Thu, 23 Jul 2009 10:14:04 +0000 (12:14 +0200)]
mac80211: Replace {sw, hw}_scanning variables with a bitfield

Use a bitfield to store the current scan mode instead of two boolean
variables {sw,hw}_scanning. This patch does not introduce functional
changes but allows us to enhance the scan flags later (for example
for background scanning).

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: introduce a new scan state "decision"
Helmut Schaa [Thu, 23 Jul 2009 10:13:56 +0000 (12:13 +0200)]
mac80211: introduce a new scan state "decision"

Introduce a new scan state "decision" which is entered after
every completed scan operation and decides about the next steps.
At first the decision is in any case to scan the next channel.
This shouldn't introduce any functional changes.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: advance the state machine immediately if no delay is needed
Helmut Schaa [Thu, 23 Jul 2009 10:13:48 +0000 (12:13 +0200)]
mac80211: advance the state machine immediately if no delay is needed

Instead of queueing the scan work again without delay just process the
next state immediately.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: refactor the scan code
Helmut Schaa [Thu, 23 Jul 2009 10:13:41 +0000 (12:13 +0200)]
mac80211: refactor the scan code

Move the processing of each scan state into its own functions for better
readability. This patch does not introduce functional changes.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: Remove a few redundant variables/macros
Sujith [Thu, 23 Jul 2009 10:02:41 +0000 (15:32 +0530)]
ath9k: Remove a few redundant variables/macros

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: Cleanup return values
Sujith [Thu, 23 Jul 2009 10:02:37 +0000 (15:32 +0530)]
ath9k: Cleanup return values

Cleanup aggregation start/stop function interfaces.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: Remove redundant HT macros
Sujith [Thu, 23 Jul 2009 10:02:34 +0000 (15:32 +0530)]
ath9k: Remove redundant HT macros

These can be obtained from mac80211.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: Fix a sparse warning
Sujith [Thu, 23 Jul 2009 10:02:29 +0000 (15:32 +0530)]
ath9k: Fix a sparse warning

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: Trivial fix in Kconfig
Sujith [Thu, 23 Jul 2009 10:02:25 +0000 (15:32 +0530)]
ath9k: Trivial fix in Kconfig

Update filename for debug information.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: Add a few 802.11n defines for AMPDU parameters
Sujith [Thu, 23 Jul 2009 10:01:31 +0000 (15:31 +0530)]
mac80211: Add a few 802.11n defines for AMPDU parameters

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: Add init values for AR9287 based chipsets.
Vivek Natarajan [Thu, 23 Jul 2009 06:31:50 +0000 (12:01 +0530)]
ath9k: Add init values for AR9287 based chipsets.

Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath: map TH to FCC3_WORLD
Luis R. Rodriguez [Wed, 22 Jul 2009 17:41:14 +0000 (10:41 -0700)]
ath: map TH to FCC3_WORLD

TH gets 5 GHz.

Cc: David Quan <david.quan@atheros.com>
Cc: Michael Green <michael.green@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: Don't alter rt2x00dev->default_ant
Lars Ericsson [Sat, 18 Jul 2009 18:21:52 +0000 (20:21 +0200)]
rt2x00: Don't alter rt2x00dev->default_ant

rt2x00dev->default_ant should be initialized once by the driver,
and should not be changed afterwards. Because rt2x00lib_config_antenna()
was using a reference to the struct antenna_setup it actually had the oppurtunity
to change the default antenna setting and it actually did that during the validation.

Instead of passing a pointer to antenna_setup the entire structure should be copied.

Signed-off-by: Lars Ericsson <Lars_Ericsson@telia.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: allow using network namespaces
Johannes Berg [Mon, 13 Jul 2009 22:33:36 +0000 (00:33 +0200)]
mac80211: allow using network namespaces

This finally opens up the ability to put mac80211 devices
into different network namespaces. As long as you don't
have sysfs, that is.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agocfg80211: make aware of net namespaces
Johannes Berg [Mon, 13 Jul 2009 22:33:35 +0000 (00:33 +0200)]
cfg80211: make aware of net namespaces

In order to make cfg80211/nl80211 aware of network namespaces,
we have to do the following things:

 * del_virtual_intf method takes an interface index rather
   than a netdev pointer - simply change this

 * nl80211 uses init_net a lot, it changes to use the sender's
   network namespace

 * scan requests use the interface index, hold a netdev pointer
   and reference instead

 * we want a wiphy and its associated virtual interfaces to be
   in one netns together, so
    - we need to be able to change ns for a given interface, so
      export dev_change_net_namespace()
    - for each virtual interface set the NETIF_F_NETNS_LOCAL
      flag, and clear that flag only when the wiphy changes ns,
      to disallow breaking this invariant

 * when a network namespace goes away, we need to reparent the
   wiphy to init_net

 * cfg80211 users that support creating virtual interfaces must
   create them in the wiphy's namespace, currently this affects
   only mac80211

The end result is that you can now switch an entire wiphy into
a different network namespace with the new command
iw phy#<idx> set netns <pid>
and all virtual interfaces will follow (or the operation fails).

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: cooperate more with network namespaces
Johannes Berg [Mon, 13 Jul 2009 22:33:34 +0000 (00:33 +0200)]
mac80211: cooperate more with network namespaces

There are still two places in mac80211 that hardcode
the initial net namespace (init_net). One of them is
mandated by cfg80211 and will be removed by a separate
patch, the other one is used for finding the network
device of a pending packet via its ifindex.

Remove the latter use by keeping track of the device
pointer itself, via the vif pointer, and avoid it
going stale by dropping pending frames for a given
interface when the interface is removed.

To keep track of the vif pointer for the correct
interface, change the info->control.vif pointer's
internal use to always be the correct vif, and only
move it to the vif the driver expects (or NULL for
monitor interfaces and injected packets) right before
giving the packet to the driver.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agonet: fix multiple definitions of setup_w6692
Stephen Rothwell [Mon, 27 Jul 2009 15:05:52 +0000 (08:05 -0700)]
net: fix multiple definitions of setup_w6692

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Acked-by: Karsten Keil <keil@b1-systems.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agophonet: phonet_device_get() fix
Eric Dumazet [Mon, 27 Jul 2009 15:03:18 +0000 (08:03 -0700)]
phonet: phonet_device_get() fix

net/phonet/pn_dev.c: In function `phonet_device_get':
net/phonet/pn_dev.c:99: warning: 'dev' might be used uninitialized in this function

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobnx2: Update vlan_features
Eric Dumazet [Thu, 23 Jul 2009 02:01:38 +0000 (02:01 +0000)]
bnx2: Update vlan_features

[PATCH net-next-2.6] bnx2: Update vlan_features

In order to get full use of some advanced features of BNX2, we now need to
fill dev->vlan_features.

Patch successfully tested with vlan devices built on top of bonding.
(bond0 : one bnx2 slave, one tg3 slave (not yet vlan_features enabled)

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoimwc3200: move iwmc3200 SDIO ids to sdio_ids.h
Tomas Winkler [Wed, 22 Jul 2009 14:06:56 +0000 (14:06 +0000)]
imwc3200: move iwmc3200 SDIO ids to sdio_ids.h

1. add intel's sdio vendor id to sdio_ids.h
2. move iwmc3200 sdio devices' ids to sdio_ids.h

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoethtool: device independent rx_csum and get_flags routines
Sridhar Samudrala [Wed, 22 Jul 2009 13:38:22 +0000 (13:38 +0000)]
ethtool: device independent rx_csum and get_flags routines

This helps avoid error messages with ethtool -k on devices that
don't provide device specific routines.

Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
------------------------------------------------------------------
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobnx2x: Dont update vlan_features in bnx2x_set_tso()
Eric Dumazet [Thu, 23 Jul 2009 21:21:19 +0000 (21:21 +0000)]
bnx2x: Dont update vlan_features in bnx2x_set_tso()

Patrick said : "vlan_features doesn't need to be updated, the resulting
dev->features of the VLAN device is computed as the intersection of
dev->features and dev->vlan_features."

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: deprecate print_mac
Johannes Berg [Wed, 15 Jul 2009 05:23:23 +0000 (05:23 +0000)]
net: deprecate print_mac

We've had %pM for long enough now, time to deprecate
print_mac() and remove the __maybe_unused attribute
from DECLARE_MAC_BUF so that variables declared with
that can be found and removed. Otherwise people are
putting in new users of print_mac().

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosky2: remove unnecessary assignment
Mike McCormack [Tue, 21 Jul 2009 14:51:20 +0000 (14:51 +0000)]
sky2: remove unnecessary assignment

Signed-off-by: Mike McCormack <mikem@ring3k.org>
Acked-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agophonet: Fix build.
David S. Miller [Sun, 26 Jul 2009 20:39:10 +0000 (13:39 -0700)]
phonet: Fix build.

As reported by Oliver Hartkopp:

net/phonet/pn_dev.c: In function ‘phonet_init_net’:
net/phonet/pn_dev.c:221: error: implicit declaration of function
‘proc_net_fops_create’
net/phonet/pn_dev.c: In function ‘phonet_exit_net’:
net/phonet/pn_dev.c:242: error: implicit declaration of function ‘proc_net_remove’

Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
David S. Miller [Sun, 26 Jul 2009 17:01:25 +0000 (10:01 -0700)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-next-2.6

14 years agoMerge branch 'for_david' of git://git.kernel.org/pub/scm/linux/kernel/git/kkeil/ISDN...
David S. Miller [Sun, 26 Jul 2009 17:00:21 +0000 (10:00 -0700)]
Merge branch 'for_david' of git://git./linux/kernel/git/kkeil/ISDN-2.6-net-next

14 years agoigbvf: resolve "frees DMA memory with different size" warnings
Alexander Duyck [Thu, 23 Jul 2009 18:11:01 +0000 (18:11 +0000)]
igbvf: resolve "frees DMA memory with different size" warnings

This change resolves some warnings seen with DMA debugging enabled in which
we were mapping skb->data with size + NET_IP_ALIGN and unmapping it with
just size.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoigb: initialize mailbox function pointers prior to phy init
Alexander Duyck [Thu, 23 Jul 2009 18:10:43 +0000 (18:10 +0000)]
igb: initialize mailbox function pointers prior to phy init

The igb driver is currently initializing the mailbox function pointers
after the phy.  This causes issues as the phy init will return from the
function early if there is no phy present.

To resolve this I have moved the function pointer init to a location prior
to the phy initialization so that serdes based adapters can also make use
of SR-IOV.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoigb: cleanup flow control configuration to make requested/current more clear
Alexander Duyck [Thu, 23 Jul 2009 18:10:24 +0000 (18:10 +0000)]
igb: cleanup flow control configuration to make requested/current more clear

This patch cleans up the flow control configuration for igb to make it a
bit more readable in regards to what the requested and current modes are.
This should help with the maintainability of the current igb driver in
regards to flow control.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoigb: use buffer_info->dma instead of shinfo->nr_frags to determine unmap
Alexander Duyck [Thu, 23 Jul 2009 18:10:06 +0000 (18:10 +0000)]
igb: use buffer_info->dma instead of shinfo->nr_frags to determine unmap

This change makes it so that we use buffer_info->dma instead of
shinfo->nr_frags to determine if we need to unmap a received skb.  By doing
this we can avoid a cache miss on small packets since the buffer_info
structure should already be prefetched.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoigb: add support for 82576 mezzanine card
Alexander Duyck [Thu, 23 Jul 2009 18:09:48 +0000 (18:09 +0000)]
igb: add support for 82576 mezzanine card

This patch adds support for a new 82576 mezzanine adapter.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoigb: remove unused switch statement from igb_set_wol
Alexander Duyck [Thu, 23 Jul 2009 18:09:30 +0000 (18:09 +0000)]
igb: remove unused switch statement from igb_set_wol

There is a switch statement in igb_set_wol that defaults to break and
doesn't actually do anything.  As such it should be removed.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoigb: cleanup receive address register initialization
Alexander Duyck [Thu, 23 Jul 2009 18:09:12 +0000 (18:09 +0000)]
igb: cleanup receive address register initialization

This update cleans up the receive address register initialization.  The
main purpose of this is to clean out some redundancy that was introduced
due to having multiple ways of setting the receive address registers.
Instead of having a specialized function to set one register and one to set
all of them it makes more sense to just go through the list calling the
function that is needed to set the individual registers.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoigb: move all multicast addresses into multicast table array
Alexander Duyck [Thu, 23 Jul 2009 18:08:54 +0000 (18:08 +0000)]
igb: move all multicast addresses into multicast table array

This patch moves all of the multicast addresses out of the free Receive
address registers and instead programs them all into the multicast table
array.  As a result the multicast filtering may not be as precise, but it
also greatly reduces the overhead for multicast addresses.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoigb: add completion timeout workaround for 82575/82576
Alexander Duyck [Thu, 23 Jul 2009 18:08:35 +0000 (18:08 +0000)]
igb: add completion timeout workaround for 82575/82576

The 82575 and 82576 hardware can both experience data corruption issues if
a pci-e completion arrives after the timeout value.  In order to avoid this
we need to increase the timeout value while pci-e master is disabled.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoigb: do not overwrite EEPROM LED settings
Alexander Duyck [Thu, 23 Jul 2009 18:08:16 +0000 (18:08 +0000)]
igb: do not overwrite EEPROM LED settings

The igb driver was overwritting the LED settings that were configured via
EEPROM.  This is not correct behavior as the LED settings are meant to be
configured by EEPROM and not changed.  This change removes the code that
was setting the LED behavior on the interface.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoigb: change configure_pcs_link to void since it always returns 0
Alexander Duyck [Thu, 23 Jul 2009 18:07:58 +0000 (18:07 +0000)]
igb: change configure_pcs_link to void since it always returns 0

Since igb_configure_pcs_link always returns 0 there isn't really much point
to checking for the result so it is best just to change this to a void so
we can properly ignore the return result.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoigb: make serdes power down available for 82575 in addition to 82576 parts
Alexander Duyck [Thu, 23 Jul 2009 18:07:40 +0000 (18:07 +0000)]
igb: make serdes power down available for 82575 in addition to 82576 parts

There was a serdes power down workaround that was originally added for
82576 fiber.  However it has also been found that this workaround is needed
for serdes connections as well.  In addition it is also needed for 82575
serdes so we we need to remove the checks restricting it to 82576.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoigb: remove media type fiber as it is misleading
Alexander Duyck [Thu, 23 Jul 2009 18:07:20 +0000 (18:07 +0000)]
igb: remove media type fiber as it is misleading

The current igb driver only supports copper and serdes.  The fiber media
type is a holdover from earlier NICs as the current nics supported by igb
all use serdes when communicating over a fiber connection.  As a result we
can remove media type fiber without losing any functionality.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agomISDN: hfcmulti display real PCI ids for not supported cards
Karsten Keil [Fri, 24 Jul 2009 16:41:23 +0000 (18:41 +0200)]
mISDN: hfcmulti display real PCI ids for not supported cards

In the PCI probe function struct pci_device_id points to the matched
entry of the ID table, but for devices which are matched with
PCI_ANY_ID sub IDs we want display the IDs of the device itself.

Signed-off-by: Karsten Keil <keil@b1-systems.de>
14 years agoISDN: ARRAY_SIZE changes
Karsten Keil [Fri, 24 Jul 2009 16:26:08 +0000 (18:26 +0200)]
ISDN: ARRAY_SIZE changes

These changes were a direct result of using a semantic patch
More information can be found at http://www.emn.fr/x-info/coccinelle/

Modified some of the changes to avoid the extra define.

Signed-off-by: Stoyan Gaydarov <sgayda2@uiuc.edu>
Signed-off-by: Karsten Keil <keil@b1-systems.de>
14 years agodrivers/isdn: Drop unnecessary NULL test
Julia Lawall [Sun, 12 Jul 2009 20:05:03 +0000 (22:05 +0200)]
drivers/isdn: Drop unnecessary NULL test

The result of container_of should not be NULL.  In particular, in this case
the argument to the enclosing function has passed though INIT_WORK, which
dereferences it, implying that its container cannot be NULL.

A simplified version of the semantic patch that makes this change is as
follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@@
identifier fn,work,x,fld;
type T;
expression E1,E2;
statement S;
@@

static fn(struct work_struct *work) {
  ... when != work = E1
  x = container_of(work,T,fld)
  ... when != x = E2
- if (x == NULL) S
  ...
}
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Karsten Keil <keil@b1-systems.de>
14 years agomISDN: Add support for Traverse Technologies NETJet PCI cards
Karsten Keil [Thu, 23 Jul 2009 08:03:05 +0000 (10:03 +0200)]
mISDN: Add support for Traverse Technologies NETJet PCI cards

Add support for cards based on the Tiger 300 and Tiger 320
ISDN PCI chip.
Currently only the ISAC ISDN line interface is supported.

Signed-off-by: Karsten Keil <keil@b1-systems.de>
14 years agomISDN: Add driver for Winbond cards
Karsten Keil [Wed, 22 Jul 2009 18:06:05 +0000 (20:06 +0200)]
mISDN: Add driver for Winbond cards

Add driver for Winbond W6692 based PCI cards.

Signed-off-by: Karsten Keil <keil@b1-systems.de>
14 years agomISDN: Add support for Speedfax+ cards
Karsten Keil [Wed, 22 Jul 2009 18:01:59 +0000 (20:01 +0200)]
mISDN: Add support for Speedfax+ cards

Add support for the Siemens ISAR DSP chip and cards based on it,
including analog modem protocols.

Signed-off-by: Karsten Keil <keil@b1-systems.de>
14 years agomISDN: Driver for AVM Fritz!CARD PCI
Karsten Keil [Wed, 22 Jul 2009 17:52:24 +0000 (19:52 +0200)]
mISDN: Driver for AVM Fritz!CARD PCI

Add mISDN driver for AVM FRITZ!CARD PCI (all versions).

Signed-off-by: Karsten Keil <keil@b1-systems.de>
14 years agomISDN: Add driver for Infineon ISDN chipset family
Karsten Keil [Wed, 22 Jul 2009 17:42:46 +0000 (19:42 +0200)]
mISDN: Add driver for Infineon ISDN chipset family

This driver supports cards with Infineon ISAC/HSCX, ISACX, IPAC
and IPACX chips from various manufacturers.

Signed-off-by: Karsten Keil <keil@b1-systems.de>
14 years agomISDN: Make clearing B-channel a common function
Karsten Keil [Thu, 9 Jul 2009 08:02:29 +0000 (10:02 +0200)]
mISDN: Make clearing B-channel a common function

Clearing B-channel is needed in every driver, so it makes sense
to have it as common function.

Signed-off-by: Karsten Keil <keil@b1-systems.de>
14 years agoISDN: Fix isdnhdlc for one byte hdlc packets
Karsten Keil [Wed, 8 Jul 2009 18:58:33 +0000 (20:58 +0200)]
ISDN: Fix isdnhdlc for one byte hdlc packets

Normally HDLC packets contain more as one byte (e.g a X25/X75 header).
But if you use plain HDLC framing, the current code do not encode
1 byte payloads, this patch fix that.

Signed-off-by: Karsten Keil <keil@b1-systems.de>
14 years agoISDN: Add support for none reverse bitstreams to isdnhdc
Karsten Keil [Wed, 8 Jul 2009 18:31:42 +0000 (20:31 +0200)]
ISDN: Add support for none reverse bitstreams to isdnhdc

The original isdnhdlc code was developed for devices which had
reversed bitorder in the byte stream. Adding code to handle normal
bitstreams as well.

Signed-off-by: Karsten Keil <keil@b1-systems.de>
14 years agoISDN: Clean up isdnhdlc code
Karsten Keil [Wed, 8 Jul 2009 17:11:09 +0000 (19:11 +0200)]
ISDN: Clean up isdnhdlc code

Clean up isdnhdlc to meet current code standard.
Remove hint to already removed bit reversal table.

Signed-off-by: Karsten Keil <keil@b1-systems.de>
14 years agoISDN: Make isdnhdlc usable for other ISDN drivers
Karsten Keil [Wed, 8 Jul 2009 12:21:12 +0000 (14:21 +0200)]
ISDN: Make isdnhdlc usable for other ISDN drivers

isdnhdlc is useful for other ISDN drivers as well.
Move the include file to a central location and the source
to the central isdn location.

Signed-off-by: Karsten Keil <keil@b1-systems.de>
14 years agomac80211: Fix regression in mesh forwarding path.
Javier Cardona [Tue, 7 Jul 2009 17:55:03 +0000 (10:55 -0700)]
mac80211: Fix regression in mesh forwarding path.

The removal of the master netdev broke the mesh forwarding path.  This patch
fixes it by using the new internal 'pending' queue.

As a result of this change, mesh forwarding no longer does the inefficient
802.11 -> 802.3 -> 802.11 conversion that was done before.

[Changes since v1]
Suggested by Johannes:
 - Select queue before adding to mpath queue
 - ieee80211_add_pending_skb -> ieee80211_add_pending_skbs
 - Remove unnecessary header wme.h

Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: Andrey Yurovsky <andrey@cozybit.com>
Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: fix ieee80211_xmit call context
Johannes Berg [Thu, 18 Jun 2009 15:25:11 +0000 (17:25 +0200)]
mac80211: fix ieee80211_xmit call context

ieee80211_xmit() cannot be called with tasklets enabled
because it is normally called from within a tasklet.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agonet: remove unused skb->do_not_encrypt
Johannes Berg [Wed, 17 Jun 2009 15:45:28 +0000 (17:45 +0200)]
net: remove unused skb->do_not_encrypt

mac80211 required this due to the master netdev, but now
it can put all information into skb->cb and this can go.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: remove master netdev
Johannes Berg [Wed, 17 Jun 2009 15:43:56 +0000 (17:43 +0200)]
mac80211: remove master netdev

With the internal 'pending' queue system in place, we can simply
put packets there instead of pushing them off to the master dev,
getting rid of the master interface completely.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agonet: export __dev_addr_sync/__dev_addr_unsync
Johannes Berg [Wed, 17 Jun 2009 15:43:30 +0000 (17:43 +0200)]
net: export __dev_addr_sync/__dev_addr_unsync

For mac80211, with the master netdev removal, we need to be
able to sync a multicast address list onto another list that
is not tracked within a netdev, so we need access to the
functions doing that.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoadm8211: remove uneeded code during suspend/resume
Luis R. Rodriguez [Wed, 22 Jul 2009 01:03:42 +0000 (21:03 -0400)]
adm8211: remove uneeded code during suspend/resume

mac80211 drivers do not need to stop the software queues
or call their own stop() callback upon suspend as we do it
for drivers. Equally drivers don't have to call their own
start() or start the queues as mac80211 will do it for us.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: do not stop the queues in driver stop
Luis R. Rodriguez [Wed, 22 Jul 2009 01:03:10 +0000 (21:03 -0400)]
ath9k: do not stop the queues in driver stop

mac80211 will have disabled the queues for us when
needed.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoMAINTAINERS: Update rtl8180 patterns
Joe Perches [Tue, 21 Jul 2009 20:09:56 +0000 (13:09 -0700)]
MAINTAINERS: Update rtl8180 patterns

rtl8180 files were moved into a subdirectory
by commit 1c740ed2210a0d124674a477ea538468aba47810

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoMAINTAINERS: add wl1251 wireless driver
Kalle Valo [Tue, 21 Jul 2009 11:26:08 +0000 (14:26 +0300)]
MAINTAINERS: add wl1251 wireless driver

Add myself as the maintainer for wl1251 driver.

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1251: remove wl1251_plt_start/stop()
Kalle Valo [Tue, 21 Jul 2009 11:26:01 +0000 (14:26 +0300)]
wl1251: remove wl1251_plt_start/stop()

This Production Line Testing code is currently unused and can be removed.
It can be reintroduced when nl80211 test mode implemented for the driver.

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1251: remove accidentally added wl1251_netlink.c
Kalle Valo [Tue, 21 Jul 2009 11:25:53 +0000 (14:25 +0300)]
wl1251: remove accidentally added wl1251_netlink.c

Commit "wl1251: add wl1251 prefix to all 1251 files" accidentally added
wl1251_netlink.c which contains a private netlink interface.

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: fix values for bus error bits in ISR2
Pavel Roskin [Mon, 20 Jul 2009 12:00:30 +0000 (08:00 -0400)]
ath5k: fix values for bus error bits in ISR2

The new values are taken from the recently open sourced Atheros HAL.
Correctness is also confirmed by the users with access to Atheros
documentation.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agocfg80211: avoid setting default_key if add_key fails
Zhu Yi [Mon, 20 Jul 2009 08:12:57 +0000 (16:12 +0800)]
cfg80211: avoid setting default_key if add_key fails

In cfg80211_upload_connect_keys(), we call add_key, set_default_key
and set_default_mgmt_key (if applicable) one by one. If one of these
operations fails, we should stop calling the following functions.
Because if the key is not added successfully, we should not set it as
default key anyway.

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwmc3200wifi: fix a use-after-free bug
Zhu Yi [Mon, 20 Jul 2009 03:47:47 +0000 (11:47 +0800)]
iwmc3200wifi: fix a use-after-free bug

The patch fixes a use-after-free bug for cmd->seq_num;

Reported-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwmc3200wifi: fix cfg80211_connect_result is called in IBSS
Zhu Yi [Mon, 20 Jul 2009 03:47:46 +0000 (11:47 +0800)]
iwmc3200wifi: fix cfg80211_connect_result is called in IBSS

Avoid calling cfg80211_connect_result() in IBSS mode.

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwmc3200wifi: use cfg80211_connect_result to send req/resp IE
Zhu Yi [Mon, 20 Jul 2009 03:47:45 +0000 (11:47 +0800)]
iwmc3200wifi: use cfg80211_connect_result to send req/resp IE

cfg80211_connect_result() let us specify associate request and
response IEs as parameters after we are connected. We use this
capability instead of doing it ourselves with WEXT.

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agocfg80211: fix typo of IWEVASSOCRESPIE
Zhu Yi [Mon, 20 Jul 2009 03:47:44 +0000 (11:47 +0800)]
cfg80211: fix typo of IWEVASSOCRESPIE

It should be IWEVASSOCREQIE instead.

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agocfg80211: set_default_key only for WEP
Zhu Yi [Mon, 20 Jul 2009 03:47:43 +0000 (11:47 +0800)]
cfg80211: set_default_key only for WEP

We invoke the cfg80211 set_default_key callback only for WEP key
configuring.

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agop54: Eliminate unnecessary initialization
Larry Finger [Mon, 20 Jul 2009 02:53:14 +0000 (21:53 -0500)]
p54: Eliminate unnecessary initialization

In two places, variables are unnecessilarly initialized to NULL.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: fix spare warnings in driver-trace.h
Christian Lamparter [Sun, 19 Jul 2009 21:21:07 +0000 (23:21 +0200)]
mac80211: fix spare warnings in driver-trace.h

This patch fixes the following errors:

driver-trace.h:148:1: error: cannot size expression
driver-trace.h:148:1: error: cannot size expression
[...]
driver-trace.h:222:1: error: cannot size expression
driver-trace.h:71:1: error: incompatible types for operation (<)
driver-trace.h:71:1:    left side has type void *<noident>
driver-trace.h:71:1:    right side has type int
driver-trace.h:99:1: error: incompatible types for operation (<)
driver-trace.h:99:1:    left side has type void *<noident>
driver-trace.h:99:1:    right side has type int
driver-trace.h:148:1: error: incompatible types for operation (<)
driver-trace.h:148:1:    left side has type void *<noident>
driver-trace.h:148:1:    right side has type int
driver-trace.h:222:1: error: cannot size expression
driver-trace.h:248:1: error: incompatible types for operation (<)
driver-trace.h:248:1:    left side has type void *<noident>
driver-trace.h:248:1:    right side has type int
driver-trace.h:446:1: error: incompatible types for operation (<)
driver-trace.h:446:1:    left side has type void *<noident>
driver-trace.h:446:1:    right side has type int

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: do not monitor the connection while scanning
Christian Lamparter [Sun, 19 Jul 2009 20:09:32 +0000 (22:09 +0200)]
mac80211: do not monitor the connection while scanning

mac80211 constantly monitors the connection to the associated AP
in order to check if it is out of reach/dead.

This is absolutely fine most of the time.
Except when there is a scheduled scan for the whole neighborhood.
After all this path could trigger while scanning on different channel.
Or even worse: this AP probing triggers a WARN_ON in rate_lowest_index
when the scan code did a band transition!
( http://www.kerneloops.org/raw.php?rawid=449304 )

Reported-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Christian Lamparter <chunkeey@web.de>
Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoarlan: inverted logic?
Roel Kluin [Sun, 12 Jul 2009 22:10:07 +0000 (00:10 +0200)]
arlan: inverted logic?

Inverted logic

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: make use ath9k_hw_wait int ath9k_hw_reset_tsf
Gabor Juhos [Sat, 20 Jun 2009 22:02:15 +0000 (00:02 +0200)]
ath9k: make use ath9k_hw_wait int ath9k_hw_reset_tsf

We have a dedicated function for this kind of checks, use that
instead of duplicating the code.

Changes-licensed-under: ISC
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: wake up the chip for TSF reset
Gabor Juhos [Sat, 20 Jun 2009 22:02:14 +0000 (00:02 +0200)]
ath9k: wake up the chip for TSF reset

If we are in NETWORK SLEEP state, AR_SLP32_TSF_WRITE_STATUS limit
always exceeds in 'ath9k_hw_reset_tsf', because reading of the
AR_SLP3 register always return with the magic 0xdeadbeef value.

Changes-licensed-under: ISC
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl12xx: fix spelling
Stefan Weil [Sun, 19 Jul 2009 13:00:39 +0000 (15:00 +0200)]
wl12xx: fix spelling

Changes (comments and debug output):
* couldnt -> couldn't
* frmware -> firmware
* recevied -> received

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Acked-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: Comment spellchecking
Luis Correia [Fri, 17 Jul 2009 19:39:19 +0000 (21:39 +0200)]
rt2x00: Comment spellchecking

Fix a bunch of spelling errors in the rt2x00 drivers

Signed-off-by: Luis Correia <luis.f.correia@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: change iwl_enable/disable_interrupts to "inline"
Wey-Yi Guy [Fri, 17 Jul 2009 16:30:27 +0000 (09:30 -0700)]
iwlwifi: change iwl_enable/disable_interrupts to "inline"

iwl_enable_interrupts is being called inside the interrupt,
change from function call to inline

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>
14 years agoiwlwifi: inform user about rfkill state changes
Reinette Chatre [Fri, 17 Jul 2009 16:30:26 +0000 (09:30 -0700)]
iwlwifi: inform user about rfkill state changes

rfkill state changes are mostly available through debug messages.
These are significant enough to always make user aware of so
we turn them into warnings.

Also insert a missing newline in some rfkill related debug message.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: clarify hardware error message
Reinette Chatre [Fri, 17 Jul 2009 16:30:25 +0000 (09:30 -0700)]
iwlwifi: clarify hardware error message

When a hardware error is detected we need to be clear about that
and not create impression that the microcode is able to deal
with it.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: make debug level more user friendly
Reinette Chatre [Fri, 17 Jul 2009 16:30:24 +0000 (09:30 -0700)]
iwlwifi: make debug level more user friendly

* Deprecate the "debug50" module parameter used to obtain
  5000 series and up debugging. Replace it with "debug" module
  parameter to match with original driver and be consistent
  between them. The "debug50" module parameter can still be used,
  except that the module parameter is not writable in keeping
  with its previous state. We currently just mark it as "deprecated"
  and do not have it in the feature-removal-schedule. Some more
  cleanup of module parameters needs to be done and can then be
  entered together.

* Only make "debug" module parameters visible if the driver
  is compiled with CONFIG_IWLWIFI_DEBUG. This will eliminate
  a lot of confusion where users think they have set debug flags
  but yet cannot see any debug output.

* Make module parameters writable. This eliminates the need for the
  "debug_level" sysfs file, which can now also be deprecated and
  added to feature-removal-schedule. This file is in significant
  use though with many iwlwifi documents and text referring users
  to it. We can thus not take its removal lightly and keep it around.

With iwlcore shared between iwlagn and iwl3945 we really do not need
debug module parameters for each but can instead have one debug
module parameter for the iwlcore module. The same issue is here as
with the sysfs file - a lot of iwlwifi documentation and text (like
bug reports) rely on iwlagn and iwl3945 having this module parameter,
so changing this to a module parameter of iwlcore will have significant
impact and we do not do this for that reason.

One consequence of this patch is that if a user is running a system
with both 3945 and later hardware then the setting of the one module
parameter will affect the value of the other. The likelihood of this
seems low - and even if this setup is present it does not seem like an
issue for both modules to run with the same debug level.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: uCode Alive notification with timeout
Wey-Yi Guy [Fri, 17 Jul 2009 16:30:23 +0000 (09:30 -0700)]
iwlwifi: uCode Alive notification with timeout

Wait for REPLY_ALIVE notification from init and runtime uCode.
based on the type of REPLY_ALIVE, different status bit will be set to
wake up the queue:
STATUS_INIT_UCODE_ALIVE for init uCode
STATUS_RT_UCODE_ALIVE for runtime uCode.

If timeout, attempt to download the failing uCode image again. This can
only be done for the init ucode images of all iwlagn devices and the
runtime ucode image of the 5000 series and up. If there is a problem
with the 4965 runtime ucode coming up we restart the interface and thus
trigger a new download of the init ucode also.

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>
14 years agoiwlwifi: update 1000 series API version to match firmware
Jay Sternberg [Fri, 17 Jul 2009 16:30:22 +0000 (09:30 -0700)]
iwlwifi: update 1000 series API version to match firmware

firmware file now contains build number so API needs to be updated.

Signed-off-by: Jay Sternberg <jay.e.sternberg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: checking unknown HW type
Wey-Yi Guy [Fri, 17 Jul 2009 16:30:21 +0000 (09:30 -0700)]
iwlwifi: checking unknown HW type

When deciding NVM type, if the HW type is unknown, report error and exit
with -ENOENT. This check should prevent incorrect behavior by assuming
the wrong NVM type.

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>
14 years agoiwlwifi: Led blinking counting both tx and rx
Wey-Yi Guy [Fri, 17 Jul 2009 16:30:20 +0000 (09:30 -0700)]
iwlwifi: Led blinking counting both tx and rx

For controlling led blinking, counting both tx and rx data traffic; this
will be able to handle traffic in either direction

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>
14 years agoiwlwifi: add led debugfs function
Wey-Yi Guy [Fri, 17 Jul 2009 16:30:19 +0000 (09:30 -0700)]
iwlwifi: add led debugfs function

Adding debugfs file to show current led blinking rate
/sys/kernel/debug/ieee80211/phy0/iwlagn/data/led

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>
14 years agoiwlagn: do not send key clear commands when rfkill enabled
Reinette Chatre [Fri, 17 Jul 2009 16:30:18 +0000 (09:30 -0700)]
iwlagn: do not send key clear commands when rfkill enabled

Do all key clearing except sending sommands to device when rfkill
enabled. When rfkill enabled the interface is brought down and will
be brought back up correctly after rfkill is enabled again.

Same change is not needed for iwl3945 as it ignores return code when
sending key clearing command to device.

This fixes http://bugzilla.kernel.org/show_bug.cgi?id=13742

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Tested-by: Frans Pop <elendil@planet.nl>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: make led functions generic
Wey-Yi Guy [Fri, 17 Jul 2009 16:30:17 +0000 (09:30 -0700)]
iwlwifi: make led functions generic

Led functions are generic for all the devices except 3945, so remove the
reference to 4965

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>
14 years agoiwlwifi: Handle new firmware file with ucode build number in header
Jay Sternberg [Fri, 17 Jul 2009 16:30:16 +0000 (09:30 -0700)]
iwlwifi: Handle new firmware file with ucode build number in header

Adding new API version to account for change to ucode file format.  New
header includes the build number of the ucode.  This build number is the
SVN revision thus allowing for exact correlation to the code that
generated it.

The header adds the build number so that older ucode images can also be
enhanced to include the build in the future.

some cleanup in iwl_read_ucode needed to ensure old header not used and
reduce unnecessary references through pointer with the data is already
in heap variable.

Signed-off-by: Jay Sternberg <jay.e.sternberg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: fix rx signal quality reporting in dmesg
Wey-Yi Guy [Fri, 17 Jul 2009 16:30:15 +0000 (09:30 -0700)]
iwlwifi: fix rx signal quality reporting in dmesg

Fix quality incorrectly reported as signal strength value.

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>
14 years agoiwlagn: modify digital SVR for 1000
Wey-Yi Guy [Fri, 17 Jul 2009 16:30:14 +0000 (09:30 -0700)]
iwlagn: modify digital SVR for 1000

On 1000, there are two Switching Voltage Regulators (SVR). The first one
apply digital voltage level (1.32V) for PCIe block and core. We need to
use this regulator to solve a stability issue related to noisy DC2DC
line in the silicon.

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>
14 years agop54: fix a fw crash caused by statistic feedback
Christian Lamparter [Thu, 16 Jul 2009 18:05:41 +0000 (20:05 +0200)]
p54: fix a fw crash caused by statistic feedback

This patch fixes a bug which crawled into the tree with the split-up
changes.

The memory-manager wasn't aware of the statistic feedback
extra_len space requirements and happily placed following frames
into the allegedly free spots.

Thanks fly out to Larry Finger for taking the time to
test all (permutations of) patches and theories all day long.

Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Christian Lamparter <chunkeey@web.de>
Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>