Luis R. Rodriguez [Wed, 15 Jul 2009 00:23:15 +0000 (20:23 -0400)]
cfg80211: treat ieee80211_regdom hints as user hints
We were treating ieee80211_regdom module parameter hints
as core hints, this means we were not letting the user help
compliance further when using the module parameter. It also
meant that users with a device with a custom regulatory
domain set (wiphy->custom_regulatory) using this module
parameter were being stuck to the original default core
static regualtory domain. We fix this by using the static
cfg80211_regdomain alpha2 as the core hint and treating the
module parameter separately.
All iwlwifi and ath5k/ath9k/ar9170 devices which world roam
set the wiphy->custom_regulatory. This change allows users
using this module parameter to have it trated as a a proper
user hint and not have it ignored.
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luis R. Rodriguez [Wed, 15 Jul 2009 00:22:53 +0000 (20:22 -0400)]
ath9k: disable radio when all devices are marked idle
This uses the new configuration changes indicated up by
mac80211 when all interfaces are marked idle. We need to do
a little more work as we have our own set of virtual
wiphys within ath9k.
Only when all virtual wiphys are inactive do we allow an idle
state change for a wiphy to trigger disabling the radio.
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Gabor Juhos [Wed, 15 Jul 2009 00:17:15 +0000 (20:17 -0400)]
ath9k: serialize ath9k_ps_{wakeup,restore} calls
These functions are changing the power mode of the chip, but this may
have unpredictable effects, if another code are trying to set the power
mode via 'ath9k_hw_setpower' in the same time from another context.
Changes-licensed-under: ISC
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Gabor Juhos [Wed, 15 Jul 2009 00:17:14 +0000 (20:17 -0400)]
ath9k: uninline ath9k_ps_{wakeup,restore} functions
Uninline these functions before we add functional changes to them.
Changes-licensed-under: ISC
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Gabor Juhos [Wed, 15 Jul 2009 00:17:13 +0000 (20:17 -0400)]
ath9k: serialize ath9k_hw_setpower calls
Because ath9k_setpower is called from various contexts, we have to
protect it against concurrent calls.
Changes-licensed-under: ISC
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Vasanthakumar Thiagarajan [Wed, 15 Jul 2009 00:17:12 +0000 (20:17 -0400)]
ath9k: Remove pointless ath9k_ps_restore() in ath_detach()
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Vasanthakumar Thiagarajan [Wed, 15 Jul 2009 00:17:11 +0000 (20:17 -0400)]
ath9k: Handle tx desc shortage more appropriately
Update tx BA window and complete the frame as failed
one if we can't clone the holding descriptor due to
unavailability of descriptors.
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Vasanthakumar Thiagarajan [Wed, 15 Jul 2009 00:17:10 +0000 (20:17 -0400)]
ath9k: Remove bogus assert in ath_clone_txbuf()
oops, this one should be part of the original patch
"ath9k: downgrade assert in ath_clone_txbuf()"
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Senthil Balasubramanian [Wed, 15 Jul 2009 00:17:09 +0000 (20:17 -0400)]
ath9k: Fix TX hang issue with Atheros chipsets
The hardware doesn't generate interrupts in some cases and so work
around this by monitoring the TX status periodically and reset the
chip if required.
This behavior of the hardware not generating the TX interrupts can
be noticed through ath9k debugfs interrupt statistics when heavy
traffic is being sent from STA to AP. One can easily see this behavior
when the STA is transmitting at a higher rates. The interrupt statistics
in the debugfs interface clearly shows that only RX interrupts alone
being generated and TX being stuck.
TX should be monitored through a timer and reset the chip only when
frames are queued to the hardware but TX interrupts are not generated
for the same even after one second. Also, we shouldn't remove holding
descriptor from AC queue if it happens to be the only descriptor and
schedule TX aggregation regarless of queue depth as it improves
scheduling of AMPDUs from software to hardware queue.
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Senthil Balasubramanian [Wed, 15 Jul 2009 00:17:08 +0000 (20:17 -0400)]
ath9k: RX stucks during heavy traffic in HT40 mode.
Running iperf along with p2p traffic on both TX and RX side then
stop one side, then stop the other side, then start it up again,
eventually the STA gets into a mode that it can not pass data at
all.
A hardware workaround for invalid RSSI can make FIFO write pointer
to jump over read pointer, causing RX data corruption and repeated
DMA. Both TX and RX works fine when the workaround is disabled.
To replace the original hardware work around, software looks for
frames with post delimiter CRC error and mark the RSSI invalid so
that the upperlayer will not use the RSSI associated with this
frame. So disable the hardware workaround by updating the appropriate
registers.
Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Senthil Balasubramanian [Wed, 15 Jul 2009 00:17:07 +0000 (20:17 -0400)]
ath9k: Manipulate and report the correct RSSI
RSSI reported by the RX descriptor requires little manipulation.
Manipulate and report the correct RSSI to the stack. This will
fix the improper signal levels reported by iwconfig iw dev wlanX
station dump. Also the Link Quality reported seems to be varying
(falls to zero also sometimes) when iperf is run from STA to AP.
Also use the default noise floor for now as the one reported
during the caliberation seems to be wrong.
The Signal and Link Quality before this patch (taken while TX is
in progress from STA to AP)
09:59:13.
285428037 Link Quality=29/70 Signal level=-81 dBm
09:59:13.
410660084 Link Quality=20/70 Signal level=-90 dBm
09:59:13.
586864392 Link Quality=21/70 Signal level=-89 dBm
09:59:13.
710296281 Link Quality=21/70 Signal level=-89 dBm
09:59:13.
821683064 Link Quality=25/70 Signal level=-85 dBm
09:59:13.
933402989 Link Quality=24/70 Signal level=-86 dBm
09:59:14.
045839276 Link Quality=26/70 Signal level=-84 dBm
09:59:14.
193926673 Link Quality=23/70 Signal level=-87 dBm
09:59:14.
306230262 Link Quality=31/70 Signal level=-79 dBm
09:59:14.
419459667 Link Quality=26/70 Signal level=-84 dBm
09:59:14.
530711167 Link Quality=37/70 Signal level=-73 dBm
09:59:14.
642593962 Link Quality=29/70 Signal level=-81 dBm
09:59:14.
754361169 Link Quality=21/70 Signal level=-89 dBm
09:59:14.
866217355 Link Quality=21/70 Signal level=-89 dBm
09:59:14.
976963623 Link Quality=28/70 Signal level=-82 dBm
09:59:15.
089149809 Link Quality=26/70 Signal level=-84 dBm
09:59:15.
205039887 Link Quality=27/70 Signal level=-83 dBm
09:59:15.
316368003 Link Quality=23/70 Signal level=-87 dBm
09:59:15.
427684036 Link Quality=36/70 Signal level=-74 dBm
09:59:15.
539756380 Link Quality=21/70 Signal level=-89 dBm
09:59:15.
650549093 Link Quality=22/70 Signal level=-88 dBm
09:59:15.
761171672 Link Quality=32/70 Signal level=-78 dBm
09:59:15.
872793750 Link Quality=23/70 Signal level=-87 dBm
09:59:15.
984421694 Link Quality=22/70 Signal level=-88 dBm
09:59:16.
097315093 Link Quality=21/70 Signal level=-89 dBm
The link quality and signal level after this patch (take while
TX is in progress from STA to AP)
17:21:25.
627848091 Link Quality=65/70 Signal level=-45 dBm
17:21:25.
762805607 Link Quality=65/70 Signal level=-45 dBm
17:21:25.
875521888 Link Quality=66/70 Signal level=-44 dBm
17:21:25.
987468448 Link Quality=66/70 Signal level=-44 dBm
17:21:26.
100628151 Link Quality=66/70 Signal level=-44 dBm
17:21:26.
213129671 Link Quality=66/70 Signal level=-44 dBm
17:21:26.
324923070 Link Quality=65/70 Signal level=-45 dBm
17:21:26.
436831357 Link Quality=65/70 Signal level=-45 dBm
17:21:26.
610356973 Link Quality=65/70 Signal level=-45 dBm
17:21:26.
723340047 Link Quality=65/70 Signal level=-45 dBm
17:21:26.
835715293 Link Quality=64/70 Signal level=-46 dBm
17:21:26.
949542748 Link Quality=64/70 Signal level=-46 dBm
17:21:27.
062261613 Link Quality=65/70 Signal level=-45 dBm
17:21:27.
174511563 Link Quality=64/70 Signal level=-46 dBm
17:21:27.
287616232 Link Quality=64/70 Signal level=-46 dBm
17:21:27.
400598119 Link Quality=64/70 Signal level=-46 dBm
17:21:27.
511381404 Link Quality=64/70 Signal level=-46 dBm
17:21:27.
624530421 Link Quality=65/70 Signal level=-45 dBm
17:21:27.
737807109 Link Quality=64/70 Signal level=-46 dBm
17:21:27.
850861352 Link Quality=65/70 Signal level=-45 dBm
17:21:27.
963369436 Link Quality=64/70 Signal level=-46 dBm
17:21:28.
076582289 Link Quality=64/70 Signal level=-46 dBm
Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Vasanthakumar Thiagarajan [Wed, 15 Jul 2009 00:14:13 +0000 (20:14 -0400)]
ath9k: Nuke struct ath_tx_ratectrl_state
Move its only member (u8 per) to struct ath_rate_priv.
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Vasanthakumar Thiagarajan [Wed, 15 Jul 2009 00:14:12 +0000 (20:14 -0400)]
ath9k: Use probe interval instead of rssi reduce interval
Get rid of rssi reduce interval.
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Vasanthakumar Thiagarajan [Wed, 15 Jul 2009 00:14:11 +0000 (20:14 -0400)]
ath9k: Remove unused members from rate control structure
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Vasanthakumar Thiagarajan [Wed, 15 Jul 2009 00:14:10 +0000 (20:14 -0400)]
ath9k: Remove dead code in rate control
ath9k rate control is based on only PER (packet error rate),
remove unused code which was intented to do rssi based rate
selection.
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luis R. Rodriguez [Wed, 15 Jul 2009 00:14:09 +0000 (20:14 -0400)]
ath9k: remove rate control wraper
After the cleanup we just use get_rate as a wrapper, skip
the wrapper.
Cc: Derek Smithies <derek@indranet.co.nz>
Cc: Chittajit Mitra <Chittajit.Mitra@Atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luis R. Rodriguez [Thu, 16 Jul 2009 17:05:41 +0000 (10:05 -0700)]
mac80211: add helper for management / no-ack frame rate decision
All current rate control algorithms agree to send management and no-ack
frames at the lowest rate. They also agree to do this when sta
and the private rate control data is NULL. We add a hlper to mac80211
for this and simplify the rate control algorithm code.
Developers wishing to make enhancements to rate control algorithms
are for broadcast/multicast can opt to not use this in their
gate_rate() mac80211 callback.
Cc: Zhu Yi <yi.zhu@intel.com>
Acked-by: Reinette Chatre <reinette.chatre@intel.com>
Cc: ipw3945-devel@lists.sourceforge.net
Cc: Gabor Juhos <juhosg@openwrt.org>
Acked-by: Felix Fietkau <nbd@openwrt.org>
Cc: Derek Smithies <derek@indranet.co.nz>
Cc: Chittajit Mitra <Chittajit.Mitra@Atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luis R. Rodriguez [Wed, 15 Jul 2009 00:14:07 +0000 (20:14 -0400)]
iwlwifi: use ieee80211_is_data(fc)
iwl-agn-rs.c already uses this.
Cc: Zhu Yi <yi.zhu@intel.com>
Cc: Reinette Chatre <reinette.chatre@intel.com>
Cc: ipw3945-devel@lists.sourceforge.net
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luis R. Rodriguez [Wed, 15 Jul 2009 00:14:06 +0000 (20:14 -0400)]
mac80211: make minstrel/pid RC use ieee80211_is_data(fc)
Cc: Felix Fietkau <nbd@openwrt.org>
Cc: Derek Smithies <derek@indranet.co.nz>
Cc: Chittajit Mitra <Chittajit.Mitra@Atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luis R. Rodriguez [Wed, 15 Jul 2009 00:14:05 +0000 (20:14 -0400)]
ath9k: remove unnecessary IEEE80211_TX_CTL_NO_ACK checks
We check for this condition early on in our mac80211 get_rate()
callback ath_get_rate(), so remove this check later down the path.
Cc: Derek Smithies <derek@indranet.co.nz>
Cc: Chittajit Mitra <Chittajit.Mitra@Atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luis R. Rodriguez [Wed, 15 Jul 2009 00:14:04 +0000 (20:14 -0400)]
ath9k: rename ath_rc_ratefind_ht() to ath_rc_get_highest_rix()
The purpose is to find the highest rate we can use.
Cc: Derek Smithies <derek@indranet.co.nz>
Cc: Chittajit Mitra <Chittajit.Mitra@Atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luis R. Rodriguez [Wed, 15 Jul 2009 00:14:03 +0000 (20:14 -0400)]
ath9k: remap ATH9K_MODE_*
There are a lot of gaps here.
Cc: Derek Smithies <derek@indranet.co.nz>
Cc: Chittajit Mitra <Chittajit.Mitra@Atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luis R. Rodriguez [Wed, 15 Jul 2009 00:14:02 +0000 (20:14 -0400)]
ath9k: remove ATH9K_MODE_11B
This saves us 2733 bytes.
text data bss dec hex filename
252265 3628 1584 257477 3edc5 ath9k-has-b-rate.ko
249905 3628 1584 255117 3e48d ath9k.ko
Cc: Derek Smithies <derek@indranet.co.nz>
Cc: Chittajit Mitra <Chittajit.Mitra@Atheros.com>
Siged-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luis R. Rodriguez [Wed, 15 Jul 2009 00:14:01 +0000 (20:14 -0400)]
ath9k: remove unused ath_rc_isvalid_txmask()
Cc: Derek Smithies <derek@indranet.co.nz>
Cc: Chittajit Mitra <Chittajit.Mitra@Atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luis R. Rodriguez [Wed, 15 Jul 2009 00:14:00 +0000 (20:14 -0400)]
ath9k: rename ath_rc_get_nextlowervalid_txrate()
What this does is get us our next lower rate so call it that,
ath_rc_get_lower_rix().
Cc: Derek Smithies <derek@indranet.co.nz>
Cc: Chittajit Mitra <Chittajit.Mitra@Atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luis R. Rodriguez [Wed, 15 Jul 2009 00:13:59 +0000 (20:13 -0400)]
ath9k: remove pointless wrapper ath_rc_rate_getidx()
This is just calling another helper, so just use the other
helper directly. This should make it clear that when do not
find the next rate we stick to the current one.
Cc: Derek Smithies <derek@indranet.co.nz>
Cc: Chittajit Mitra <Chittajit.Mitra@Atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luis R. Rodriguez [Wed, 15 Jul 2009 00:13:58 +0000 (20:13 -0400)]
ath9k: remove unused stepdown when looking for the next rate
This is not used, remove this.
Cc: Derek Smithies <derek@indranet.co.nz>
Cc: Chittajit Mitra <Chittajit.Mitra@Atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luis R. Rodriguez [Wed, 15 Jul 2009 00:13:57 +0000 (20:13 -0400)]
ath9k: remove unused min rate calculation code
This is not used, and when we need to get the lowest rate
we should simply use mac80211's own rate_lowest_index(sband, sta).
Cc: Derek Smithies <derek@indranet.co.nz>
Cc: Chittajit Mitra <Chittajit.Mitra@Atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luis R. Rodriguez [Wed, 15 Jul 2009 00:13:56 +0000 (20:13 -0400)]
ath9k: cleanup try count for MRR in rate control
This has no functional change and just cleans up the code
to be more legible and removes a useless variable for
Multi Rate Retry.
For regular frames we use 2 retries for MRR segments [0-2].
For the last MRR segment [3] we use 4.
MRR[0] = 2
MRR[1] = 2
MRR[2] = 2
MRR[3] = 4
Cc: Derek Smithies <derek@indranet.co.nz>
Cc: Chittajit Mitra <Chittajit.Mitra@Atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luis R. Rodriguez [Wed, 15 Jul 2009 00:13:55 +0000 (20:13 -0400)]
iwlwifi: remove rs_get_rate workaround
This removes the work around implemented for transmitting on
an unsupported band on iwlwifi. This was added via the patch:
8e1856e82cb8f541e925738bebfbc473420cda68:
iwlwifi: fix rs_get_rate WARN_ON()
Cc: Mohamed Abbas <mohamed.abbas@intel.com>
Cc: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luis R. Rodriguez [Wed, 15 Jul 2009 00:13:54 +0000 (20:13 -0400)]
ath9k: downgrade assert in rc.c for invalid rate
The case where no vaid rate is found should not happen now
but to help debugging and downgrade this to a warn.
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luis R. Rodriguez [Thu, 16 Jul 2009 17:15:09 +0000 (10:15 -0700)]
mac80211: drop frames for sta with no valid rate
When we're associated we should be able to send data to
target sta. If we cannot we may be trying to use the incorrect
band to talk to the sta. Lets catch any such cases, warn, and
drop the frames to not invalidate assumptions being made on
rate control algorithms when they have a valid sta to
communicate with. Any such cases should be handled and fixed.
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jiri Slaby [Tue, 14 Jul 2009 20:37:13 +0000 (22:37 +0200)]
wireless: wl12xx, fix lock imbalance
Add omitted mutex_unlock to one of wl12xx_op_start fail paths (when
wl12xx_chip_wakeup fails).
[v2]
Power off the device, because:
\= cite from http://marc.info/?l=linux-kernel&m=
124755028209880&w=2
If the chip cannot be booted, why should it remain powered on?
In some rare cases, the chip might fail to initialize, but can
recover if powered off and on again, so turning it off at this
point is the right thing to do. =/
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Tue, 14 Jul 2009 13:48:11 +0000 (15:48 +0200)]
iwlwifi: make some logging functions static/unexport
iwl_dump_nic_error_log can be static and iwl_dump_nic_event_log
doesn't need to be exported.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Hin-Tak Leung [Mon, 13 Jul 2009 23:05:56 +0000 (00:05 +0100)]
rtl8187: updating Kconfig with info of branded devices
Adding more detailed info about Asus motherboards and Ralink devices.
Signed-off-by: Hin-Tak Leung <htl10@users.sourceforge.net>
Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Hin-Tak Leung [Mon, 13 Jul 2009 22:20:37 +0000 (23:20 +0100)]
zd1211rw: adding Accton Technology Corp (083a:e501) as a ZD1211B device
New device supported by the zd1211rw driver reported to linux-wireless.
Device string from lsusb:
"ID 083a:e501 Accton Technology Corp. ZD1211B"
RF type from dmesg:
zd1211b chip 083a:e501 v4810 high 00-1a-2a AL2230_RF pa0 g--NS
Signed-off-by: Hin-Tak Leung <htl10@users.sourceforge.net>
Tested-by: Adrián Cereto<ssorgatem@esdebian.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Mon, 13 Jul 2009 11:24:44 +0000 (13:24 +0200)]
cfg80211: fix unregistration
The work that we cancel there requires the cfg80211_mutex,
so we can't cancel it under the mutex, which is fine, we
can just move it to after the locked section.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Mon, 13 Jul 2009 11:23:39 +0000 (13:23 +0200)]
mac80211: cancel the connection monitor timers/work
In "mac80211: monitor the connection" I forgot to
add code to cancel the new timers & work when the
interface is brought down, which isn't a problem
if you just bring it down, but _is_ a problem when
you destroy the interface. Correct this lapse.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Julia Lawall [Sun, 12 Jul 2009 20:05:33 +0000 (22:05 +0200)]
drivers/net: 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>
Acked-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Gábor Stefanik [Sun, 12 Jul 2009 00:03:48 +0000 (02:03 +0200)]
cfg80211: fix disabling WPA via wext (SIOCSIWAUTH)
cfg80211_set_wpa_version completely missed the use case when disabling
WPA, considering IW_AUTH_WPA_VERSION_DISABLED an invalid argument. This
caused weird error messages in wpa_supplicant.
Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Ivo van Doorn [Sat, 11 Jul 2009 16:00:19 +0000 (18:00 +0200)]
rt2x00: Remove DEVICE_STATE_DISABLED_RADIO_HW
The DEVICE_STATE_DISABLED_RADIO_HW flag is only read but never set,
it is an ancient part of one of the many versions of the rfkill implementations
in rt2x00. It is about time is disappears.
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Christian Lamparter [Sat, 11 Jul 2009 15:24:14 +0000 (17:24 +0200)]
ar9170: implement transmit aggregation
This patch roughly implements xmit aggregation for ar9170-like device.
Not all AP are compatible with the driver(and firmware) yet, so YMMV.
A more refined code will definitely need the final HT specification
to be available for the public, lots of firmware modification and
possibly a redesigned driver just for good measure.
Sadly, these conditions won't come true anytime soon...
Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Christian Lamparter [Fri, 10 Jul 2009 23:22:26 +0000 (01:22 +0200)]
p54: generate channel list dynamically
This patch enhances the eeprom parser to generate customized
channel list for every device.
Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Fri, 10 Jul 2009 22:17:32 +0000 (00:17 +0200)]
cfg80211: fix more bugs in mlme handling
The "what-was-I-thinking-if-anything" patch. Clearly,
if cfg80211_send_disassoc() does wdev_lock() and then
calls __cfg80211_send_disassoc(), the latter shouldn't
lock again. And the sme_state test is ... no further
comments.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Stefan Steuerwald [Fri, 10 Jul 2009 18:42:55 +0000 (20:42 +0200)]
rt2x00: Implement set_tim callback for all drivers
Implement set_tim callback for all rt2x00 drivers, this makes the
device wake up powersaving stations properly while in AP mode.
The only way to update the beacon is by simply calling mac80211 and
requesting the new beacon. This means the set_tim() event is mostly the
same as a beacon_done() event which was already defined in rt2x00lib.
Signed-off-by: Stefan Steuerwald <salsasepp@googlemail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Fri, 10 Jul 2009 16:42:31 +0000 (18:42 +0200)]
nl80211: report BSS status
When connected to a BSS, or joined to an IBSS, we'll want
to know in userspace without using wireless extensions, so
report the BSS status in the BSS list. Userspace can query
the BSS list, display all the information and retrieve the
station information as well.
For example (from hwsim):
$ iw dev wlan1 scan dump
BSS 02:00:00:00:00:00 (on wlan1) -- associated
freq: 2462
beacon interval: 100
capability: ESS ShortSlotTime (0x0401)
signal: -50.00 dBm
SSID: j
Supported rates: 1.0* 2.0* 5.5* 11.0* 6.0 9.0 12.0 18.0
DS Paramater set: channel 11
ERP: <no flags>
Extended supported rates: 24.0 36.0 48.0 54.0
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Fri, 10 Jul 2009 16:35:49 +0000 (18:35 +0200)]
cfg80211: fix wext setting SSID
Pavel reported that you can't set the SSID from "foo" to
"bar". I tried reproducing, but used different values,
with different lengths, and thus never saw the obvious
problem.
Reported-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Fri, 10 Jul 2009 15:53:34 +0000 (17:53 +0200)]
cfg80211: don't look at wdev->ssid for giwessid
This variable is only used internally, _while_ connected.
If we use it, the sequence
# iwconfig wlan1 essid foo
<connects>
# iwconfig wlan1 essid ""
<disconnects>
# iwconfig
will still display "foo" as the SSID afterwards, which
is obviously quite bogus. Fix this by only displaying
the wext SSID, if present.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Fri, 10 Jul 2009 14:56:59 +0000 (16:56 +0200)]
mac80211_hwsim: report fixed signal strength
There's no reason to think that hwsim has any
actual signal strength, but for testing it is
very useful to have it report _some_ value to
the stack so I can see if the value ends up
being reported correctly
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Fri, 10 Jul 2009 14:54:07 +0000 (16:54 +0200)]
cfg80211: fix wext stats
Instead of using the wext BSSID which may be NULL if
you haven't explicitly set one, we should instead use
the current_bss pointer -- if that's NULL we aren't
connected anyway. Fixes missing signal quality output
reported to me internally at Intel.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Helmut Schaa [Fri, 10 Jul 2009 12:54:58 +0000 (14:54 +0200)]
cfg80211: update misleading comment
In cfg80211_scan_request n_channels refers to the total number
of channels to scan. Update the misleading comment accordingly.
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Fri, 10 Jul 2009 09:39:26 +0000 (11:39 +0200)]
mac80211: mesh: fix two small problems
1) there's a spin_lock() that needs to be spin_lock_bh()
2) action frames of size 24 might cause an out-of-bounds
memory access (for the 25th byte only, so no big deal)
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Fri, 10 Jul 2009 00:45:38 +0000 (02:45 +0200)]
cfg80211: fix a locking bug
The cfg80211_sme_disassoc() function is already holding
a lock here that cfg80211_mlme_deauth() would take, so
it needs to use __cfg80211_mlme_deauth() instead.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Fri, 10 Jul 2009 13:29:03 +0000 (15:29 +0200)]
mac80211: monitor the connection
With the recent MLME rework I accidentally removed the connection
monitoring code. In order to add it back, this patch will add new
code to monitor both for beacon loss and for the connection actually
working, with possibly separate triggers.
When no unicast frames have been received from the AP for (currently)
two seconds, we will send the AP a probe request. Also, when we don't
see beacons from the AP for two seconds, we do the same (but those
times need not be the same due to the way the code is now written).
Additionally, clean up the parameters to the ieee80211_set_disassoc()
function that I need here, those are all useless except sdata.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Fri, 10 Jul 2009 00:39:48 +0000 (02:39 +0200)]
mac80211: fix multi-use timer
We have, sometimes, multiple things that want to
run but don't have their own timer. Introduce a
new function to mac80211's mlme run_again() that
makes sure that the timer will run again at the
_first_ needed time, use that function and also
properly reprogram the timer once it fired.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Reinette Chatre [Thu, 9 Jul 2009 17:33:41 +0000 (10:33 -0700)]
iwlagn: fix minimum number of queues setting
We need to provide a reasonable minimum that will result in a
working setup if used. Set minimum to be 10 to provide for
4 standard TX queues + 1 command queue + 2 (unused) HCCA queues +
4 HT queues (one per AC).
We allow the user to change the number of queues used via a module
parameter and use this minimum value to check if it is valid. Without
this patch a user can select a value for the number of queues that
will result in a failing setup.
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Reviewed-by: Tomas Winkler <tomas.winkler@intel.com>
Acked-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Reinette Chatre [Thu, 9 Jul 2009 17:33:40 +0000 (10:33 -0700)]
iwl3945: cleanup number of queues settings
* Rename maximum number of queue (TFD_QUEUE_MAX) to IWL39_NUM_QUEUES to
be consistent with rest of iwlwifi.
* Remove unused defines.
* Fix loops that iterate over number of TX queues to stop when maximum is reached
(currently it is maximum + 1).
* Remove queues_num module parameter as it is not used.
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Reinette Chatre [Thu, 9 Jul 2009 17:33:38 +0000 (10:33 -0700)]
iwlwifi: fix permissions on debugfs files
debugfs files are created with 644 permissions which gives everybody
read access. This presents a security issue if a user opens the file and
holds it open at the time the driver removes the file. At this point
invalid memory will be accessed.
Fix this by only allowing root to read debugfs files.
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Wey-Yi Guy [Thu, 9 Jul 2009 17:33:36 +0000 (10:33 -0700)]
iwlwifi: move show_qos to debugfs
This move the show_qos file from sysfs to debugfs because the "one
value per file" sysfs rule.
The file is located in
/sys/kernel/debug/ieee80211/phy0/iwlagn/data
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>
Zhu Yi [Thu, 9 Jul 2009 08:59:49 +0000 (16:59 +0800)]
cfg80211: fix NULL dereference in IBSS SIOCGIWAP
This patch avoids memcpy from wdev->wext.ibss.bssid if it is NULL.
This could happen if we SIOCGIWAP before SIOCSIWAP.
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Marcin Slusarz [Wed, 8 Jul 2009 20:03:13 +0000 (22:03 +0200)]
wireless: fix supported cards for rtl8187
Different revisions of WUSB54GC-EU use different chipsets -
v2 uses rtl8187, but v3 uses Ralink RT3070.
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Cc: Przemyslaw Kulczycki <azrael@autocom.pl>
Cc: John W. Linville <linville@tuxdriver.com>
Cc: Linux wireless <linux-wireless@vger.kernel.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Wed, 8 Jul 2009 12:22:54 +0000 (14:22 +0200)]
cfg80211: rework key operation
This reworks the key operation in cfg80211, and now only
allows, from userspace, configuring keys (via nl80211)
after the connection has been established (in managed
mode), the IBSS been joined (in IBSS mode), at any time
(in AP[_VLAN] modes) or never for all the other modes.
In order to do shared key authentication correctly, it
is now possible to give a WEP key to the AUTH command.
To configure static WEP keys, these are given to the
CONNECT or IBSS_JOIN command directly, for a userspace
SME it is assumed it will configure it properly after
the connection has been established.
Since mac80211 used to check the default key in IBSS
mode to see whether or not the network is protected,
it needs an update in that area, as well as an update
to make use of the WEP key passed to auth() for shared
key authentication.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Wed, 8 Jul 2009 11:29:08 +0000 (13:29 +0200)]
nl80211: introduce new key attributes
We will soon want to nest key attributes into
some new attribute for configuring static WEP
keys at connect() and ibss_join() time, so we
need nested attributes for that. However, key
attributes right now are 'global'. This patch
thus introduces new nested attributes for the
key settings and functions for parsing them.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Javier Cardona [Thu, 9 Jul 2009 21:42:16 +0000 (14:42 -0700)]
mac80211: Assign next hop address to pending mesh frames
Assign next hop address to pending mesh frames once the path is resolved.
Regression. Frames transmitted when a mesh path was wating to be resolved were
being transmitted with an invalid Receiver Address.
[Changes since v1]
Suggested by Johannes:
- Improved frame_queue traversal
- Narower RCU scope
Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: Andrey Yurovsky <andrey@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Tue, 7 Jul 2009 21:46:51 +0000 (23:46 +0200)]
cfg80211: fix two buglets
This fixes two small bugs:
1) the connect variable is already initialised, and the
assignment to auth_type overwrites the previous setting
with a wrong value
2) when all authentication attempts fail, we need to report
that we couldn't connect
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Tue, 7 Jul 2009 21:41:27 +0000 (23:41 +0200)]
cfg80211: fix race in giwrate
cfg80211_wext_giwrate doesn't lock the wdev, so it
cannot access current_bss race-free. Also, there's
little point in trying to ask the driver for an AP
that it never told us about, so avoid that case.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Christian Lamparter [Tue, 7 Jul 2009 17:08:07 +0000 (19:08 +0200)]
p54: re-enable power save feature
This patch re-enables p54's power save features and adds a workaround
which temporarily alters the device's power state in order to allow
ps-polls to be sent and buffered data to be retrieved during psm.
(Incorporates patch originally posted as "p54: fix beacon template dtim
IE corruption". -- JWL)
Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Tue, 7 Jul 2009 11:46:22 +0000 (13:46 +0200)]
mac80211: driver operation debugging
This makes mac80211 use the event tracing framework
to log all operations as given to the driver. This
will need to be extended with more information, but
as a start it should be good.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Tue, 7 Jul 2009 01:54:43 +0000 (03:54 +0200)]
mac80211: fix sparse warning
ieee80211_testmode_cmd can very well be static.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
David S. Miller [Fri, 24 Jul 2009 02:03:51 +0000 (19:03 -0700)]
Merge branch 'master' of /linux/kernel/git/davem/net-2.6
Conflicts:
drivers/net/wireless/iwmc3200wifi/netdev.c
net/wireless/scan.c
Dave Jones [Mon, 20 Jul 2009 17:40:48 +0000 (17:40 +0000)]
Fix typos in comments in via-velocity header.
Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Dave Jones [Fri, 24 Jul 2009 01:11:12 +0000 (18:11 -0700)]
Remove unnecessary forward declarations from velocity NIC driver.
By moving functions to before their first call, we eliminate
the need to define forward references.
Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Dave Jones [Mon, 20 Jul 2009 17:35:21 +0000 (17:35 +0000)]
Fix up CodingStyle problems in via-velocity.c
Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Dave Jones [Tue, 21 Jul 2009 09:15:49 +0000 (09:15 +0000)]
Remove unused zero-copy code from velocity NIC driver.
This code hasn't been enabled in forever.
Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Andi Kleen [Tue, 21 Jul 2009 23:00:40 +0000 (23:00 +0000)]
TCP: Add comments to (near) all functions in tcp_output.c v3
While looking for something else I spent some time adding
one liner comments to the tcp_output.c functions that
didn't have any. That makes the comments more consistent.
I hope I documented everything right.
No code changes.
v2: Incorporated feedback from Ilpo.
v3: Change style of one liner comments, add a few more comments.
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Acked-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
Eric Dumazet [Tue, 21 Jul 2009 21:57:59 +0000 (21:57 +0000)]
af_packet: style cleanups
Some style cleanups to match current code practices.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Uwe Kleine-König [Tue, 21 Jul 2009 11:25:23 +0000 (11:25 +0000)]
net: move macsonic's probe function to .devinit.text
A pointer to mac_sonic_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.
Various other functions that are called by mac_sonic_probe need to move
to .devinit.text, too.
An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Jeff Garzik <jgarzik@redhat.com>
Cc: David S. Miller <davem@davemloft.net>
Tested-by: Finn Thain <fthain@telegraphics.com.au>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: netdev@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Uwe Kleine-König [Tue, 21 Jul 2009 11:25:27 +0000 (11:25 +0000)]
net: move xtsonic's probe function to .devinit.text
A pointer to xtsonic_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.
An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Chris Zankel <chris@zankel.net>
Cc: David S. Miller <davem@davemloft.net>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: netdev@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
Uwe Kleine-König [Tue, 21 Jul 2009 11:25:25 +0000 (11:25 +0000)]
net: move sb1250-mac's probe function to .devinit.text
A pointer to sbmac_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.
An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Weiwei Wang <weiwei.wang@windriver.com>
Cc: Jeff Garzik <jgarzik@redhat.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: Maciej W. Rozycki <macro@linux-mips.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: netdev@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
Uwe Kleine-König [Tue, 21 Jul 2009 11:25:24 +0000 (11:25 +0000)]
net: move meth's probe function to .devinit.text
A pointer to meth_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.
An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: David S. Miller <davem@davemloft.net>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Christoph Lameter <cl@linux-foundation.org>
Cc: Jeff Garzik <jgarzik@redhat.com>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: netdev@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Uwe Kleine-König [Tue, 21 Jul 2009 11:25:22 +0000 (11:25 +0000)]
net: move jazzsonic's probe function to .devinit.text
A pointer to jazz_sonic_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.
As noticed by Geert Uytterhoeven sonic_probe1 is called by
jazz_sonic_probe, so the former has to move to .devinit.text, too.
An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: David S. Miller <davem@davemloft.net>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Finn Thain <fthain@telegraphics.com.au>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: netdev@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Uwe Kleine-König [Tue, 21 Jul 2009 11:25:26 +0000 (11:25 +0000)]
net: move sgiseeq's probe function to .devinit.text
A pointer to sgiseeq_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.
An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Wang Chen <wangchen@cn.fujitsu.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Jeff Garzik <jgarzik@redhat.com>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: netdev@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
Ben Greear [Tue, 21 Jul 2009 19:50:02 +0000 (12:50 -0700)]
veth: Zero timestamp in xmit path.
This patch zero's the timestamp before handing the packet to
the peer interface. This lets the peer recalculate the rx timestamp
if it cares about timestamps.
Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Sebastian Haas [Tue, 21 Jul 2009 19:38:13 +0000 (12:38 -0700)]
can: sja1000: Add support for the new 4 channel EMS CPC-PCI cards
This patch adds support to the ems_pci driver for the new, v2,
4 channel CPC-PCI/PCIe/104P CAN cards from EMS Dr. Thomas Wuensche.
Signed-off-by: Sebastian Haas <haas@ems-wuensche.com>
Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Mike Rapoport [Tue, 21 Jul 2009 19:37:18 +0000 (12:37 -0700)]
dm9000: switch to dev_pm_ops
Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Acked-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ajit Khaparde [Tue, 21 Jul 2009 19:36:19 +0000 (12:36 -0700)]
be2net: Add GRO support to the be2net driver. LRO is not supported anymore.
This patch removes support for INET_LRO and switches over to GRO.
Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Rémi Denis-Courmont [Tue, 21 Jul 2009 01:57:58 +0000 (01:57 +0000)]
Phonet: dropped datagrams accounting
The per-socket drop count is visible via /proc/net/phonet.
Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Rémi Denis-Courmont [Tue, 21 Jul 2009 01:57:59 +0000 (01:57 +0000)]
Phonet: account for dropped RX packets
Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Rémi Denis-Courmont [Tue, 21 Jul 2009 01:57:57 +0000 (01:57 +0000)]
Phonet: sockets list through proc_fs
This provides a list of sockets with their Phonet bind addresses and
some socket debug informations through /proc/net/phonet.
Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Andy Gospodarek [Wed, 22 Jul 2009 09:34:00 +0000 (09:34 +0000)]
ixgbe: remove unnecessary call to device_init_wakeup
Calls to device_init_wakeup should not be necessary in drivers that use
device_set_wakeup_enable since pci_pm_init will set the can_wakeup flag
for the device when initialized.
Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Lucy Liu [Wed, 22 Jul 2009 14:07:33 +0000 (14:07 +0000)]
ixgbe: Don't priority tag control frames in DCB mode
Certain types of control packets (LLDP, LACP, etc.) are not supposed to have a
priority tag or vlan tag inserted. Ixgbe driver is currently priority
tagging everything (if packet is not on a VLAN interface).
This patch modifies DCB mode, so that packets marked with skb priority
TC_PRIO_CONTROL are not priority tagged. It also transmits these packets on
the highest priority traffic class.
Programs (like dcbd) can set the skb priority using a socket option. Or, a tc
filter can be configured to set the priority value. Using the value
TC_PRIO_CONTROL (7) has the benefit that it is already defined in the kernel,
and the bonding LACP code already sets the skb->priority field to this value.
Signed-off-by: Lucy Liu <lucy.liu@intel.com>
Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Yi Zou [Wed, 22 Jul 2009 14:07:12 +0000 (14:07 +0000)]
ixgbe: Enable FCoE offload when DCB is enabled for 82599
Currently, FCoE offload feature is turned on when the kernel config has
CONFIG_FCOE or CONFIG_FCOE_MODULE set. However, we really want to turn
FCoE offload on when there is FCoE traffic passing and turn it off when
it's just LAN traffic. Since FCoE depends on a lossless network provided
by DCB, this allows us to have FCoE turned on/off when user turns on DCB
using dcbtool.
Signed-off-by: Yi Zou <yi.zou@intel.com>
Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Mark Ware [Thu, 23 Jul 2009 17:56:48 +0000 (10:56 -0700)]
net: Rework mdio-ofgpio driver to use of_mdio infrastructure
Changes to the fs_enet driver
aa73832c5a80d6c52c69b18af858d88fa595dd3c
("net: Rework fs_enet driver to use of_mdio infrastructure")
cause kernel crashes when using the mdio-ofgpio driver.
This patch replicates similar changes made to the fs_enet mii-bitbang
drivers. It has been tested on a custom mpc8280 based board using an
NFS mounted root.
Signed-off-by: Mark Ware <mware@elphinstone.net>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
Uwe Kleine-König [Tue, 21 Jul 2009 10:11:39 +0000 (10:11 +0000)]
register at91_ether using platform_driver_probe
at91ether_probe lives in .init.text, so using platform_driver_register
to register it is wrong because binding a device after the init memory
is discarded (e.g. via sysfs) results in an oops.
As requested by David Brownell platform_driver_probe is used instead of
moving the probe function to .devinit.text as proposed initially.
This saves some memory, but devices registered after the driver is
probed are not bound (probably there are none) and binding via sysfs
isn't possible.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: Andrew Victor <linux@maxim.org.za>
Signed-off-by: David S. Miller <davem@davemloft.net>
Rafael J. Wysocki [Wed, 22 Jul 2009 02:58:55 +0000 (02:58 +0000)]
skge: Enable WoL by default if supported
If skge hardware is capable of waking up the system from sleep,
enable magic packet WoL during driver initialisation.
This makes WoL work without calling 'ethtool -s ethX wol g'
for each adapter.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Tested-by: Michael Guntsche <mike@it-loops.com>
Acked-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Wed, 22 Jul 2009 18:18:40 +0000 (11:18 -0700)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-2.6
Alexander Beregalov [Wed, 22 Jul 2009 01:16:51 +0000 (01:16 +0000)]
net: KS8851 needs to depend on MII
fix this build error when CONFIG_MII is not set
drivers/net/ks8851.c:999: undefined reference to `generic_mii_ioctl'
drivers/net/ks8851.c:1050: undefined reference to `mii_link_ok'
drivers/net/ks8851.c:1056: undefined reference to `mii_nway_restart'
drivers/net/ks8851.c:1044: undefined reference to `mii_ethtool_sset'
drivers/net/ks8851.c:1038: undefined reference to `mii_ethtool_gset'
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Acked-by: Ben Dooks <ben@simtec.co.uk>
Ajit Khaparde [Wed, 22 Jul 2009 16:28:55 +0000 (09:28 -0700)]
be2net: Bug fix in the non-lro path. Size of received packet was not updated in statistics properly.
This patch fixes a bug in the non-lro path. Wrong size of received
packet was being passed for updating receive statistics. This patch
is against the net-2.6 git.
Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Anton Vorontsov [Thu, 16 Jul 2009 21:31:47 +0000 (21:31 +0000)]
ucc_geth: Revive fixed link support
Since commit
0b9da337dca972e7a4144e298ec3adb8f244d4a4 ("Rework
ucc_geth driver to use of_mdio infrastructure") the fixed-link
support is broken.
This patch fixes the support by removing !ug_info->phy_node check,
and adds a call to of_phy_connect_fixed_link() if a phy is not attached
to the MAC.
Also, remove an old fixed-link code that we don't use any longer.
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
Anton Vorontsov [Thu, 16 Jul 2009 21:31:42 +0000 (21:31 +0000)]
gianfar: Revive fixed link support
Since commit
fe192a49118f5b1272317d60c7930ece4e13ae49 ("Rework gianfar
driver to use of_mdio infrastructure") the fixed-link support is
broken, the driver oopses at init_phy():
Unable to handle kernel paging request for data at address 0x000000e4
Faulting instruction address: 0xc01cf298
Oops: Kernel access of bad area, sig: 11 [#1]
[...]
NIP [
c01cf298] init_phy+0x80/0xdc
LR [
c01cf250] init_phy+0x38/0xdc
Call Trace:
[
cf81fe80] [
c01d1cf8] gfar_enet_open+0x6c/0x19c
[
cf81fea0] [
c024494c] dev_open+0xfc/0x134
[
cf81fec0] [
c0242edc] dev_change_flags+0x84/0x1ac
[
cf81fee0] [
c0399ee0] ic_open_devs+0x168/0x2d8
[
cf81ff20] [
c039b2e8] ip_auto_config+0x90/0x2a4
[
cf81ff60] [
c0003884] do_one_initcall+0x34/0x1a8
This patch fixes the oops, and removes phy_node checks, and adds a call
to of_phy_connect_fixed_link() if a phy isn't attached..
Also, remove an old fixed-link code that we don't use any longer.
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>