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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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/)
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>
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>
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>
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.
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 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>
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>
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>
* 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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>