Tomas Winkler [Tue, 14 Oct 2008 19:32:49 +0000 (12:32 -0700)]
iwlwifi: tx command must run on same tfd as packet
This patch makes clear that tx command is attached to the same tfd as
the tx packet
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Tomas Winkler [Tue, 14 Oct 2008 19:32:48 +0000 (12:32 -0700)]
iwlwifi: fix TX cmd dma unmapping
This patch:
1. fixes command DMA unmapping, this might be visible only
on platforms where DMA unmapping is no noop such as PPC64 (not tested)
2. attaches correctly high memory part of the host command buffer
3. changes structure of TFD TB
instead of describing transmit buffer (TB) tuple it describes single
TB and makes code more readable on price of one unaligned access
4. eliminates using of IWL_GET/SET_BITs for TFD handling
5. renames TFD structures to mach the HW spec
6. reduces iwl_tx_info size by reserving first TB to the host command
This patch should not have any visible effect on x86 32
This patch is rework of
iwlwifi: fix DMA code and bugs from
Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Cc: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Tomas Winkler [Tue, 14 Oct 2008 19:32:45 +0000 (12:32 -0700)]
iwlwifi: unify tx antenna toggling
TX antenna toggling is requested for management frames in tx and
scanning. I addition toggling in scanning was incorrect;
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Reviewed-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Tomas Winkler [Tue, 14 Oct 2008 19:32:44 +0000 (12:32 -0700)]
iwlwifi: add iwl_cmd_queue_free for readability
This patch adds iwl_cmd_queue_free function and
separate cmd queue freeing from regular tx queue freeing.
This improves readability and adds one more step in
restructuring of cmd queue handling
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Reviewed-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Tomas Winkler [Tue, 14 Oct 2008 19:32:43 +0000 (12:32 -0700)]
iwlwifi: remove host commands structures from iwl_cmd
This patch removes host commands structures from iwl_cmd
to make more HW oblivious
tx cmd was left it needs special treatment.
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Reviewed-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jay Sternberg [Tue, 14 Oct 2008 19:32:42 +0000 (12:32 -0700)]
iwlwifi: expand error lookup and align output
change desc_lookup from hard coded switch to a simple lookup table and expand
list to include all errors. Also corrected output using this string so info
is aligned and easier to read when debugging issues.
Signed-off-by: Jay Sternberg <jay.e.sternberg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jay Sternberg [Tue, 14 Oct 2008 19:32:41 +0000 (12:32 -0700)]
iwlwifi: define firmware file name once
string repeated for definition of ucode firmware file and in preparation for
multiple firmware files need to consolidate location for their definition.
Signed-off-by: Jay Sternberg <jay.e.sternberg@intel.com>
Acked-by: Tomas Winkler <tomas.winler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Tue, 14 Oct 2008 17:49:22 +0000 (19:49 +0200)]
make ieee80211 invisible
This makes CONFIG_IEEE80211 invisible. The drivers that require it
(ipw2100, ipw2200, hostap) select it, and everybody else really
shouldn't even think about using it. Also, since there really is
no point in compiling anything without crypto support these days,
remove the crypto options and just enable them, leaving only the
debugging option which only shows up when a driver is select that
requires it. This makes it hard to enable, but most people wouldn't
want to anyway.
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>
Tim Gardner [Tue, 14 Oct 2008 16:38:03 +0000 (10:38 -0600)]
ipw2x00: change default policy for auto-associate
Do not attempt association until directed to do so by a user space
application. In particular, this avoids race conditions with
NetworkManager association state.
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Tue, 14 Oct 2008 14:56:51 +0000 (16:56 +0200)]
p54: implement MRR
This implements multi-rate retry in p54. With lots of help
and testing from Christian and the limiting idea from nbd.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Tue, 21 Oct 2008 10:40:02 +0000 (12:40 +0200)]
mac80211/drivers: rewrite the rate control API
So after the previous changes we were still unhappy with how
convoluted the API is and decided to make things simpler for
everybody. This completely changes the rate control API, now
taking into account 802.11n with MCS rates and more control,
most drivers don't support that though.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Tue, 14 Oct 2008 14:38:55 +0000 (16:38 +0200)]
mac80211: add might_sleep to hw_config
Just to catch bugs when changing mac80211.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Wang Chen [Tue, 14 Oct 2008 05:30:33 +0000 (13:30 +0800)]
airo: Kill directly reference of netdev->priv
We have some reasons to kill netdev->priv:
1. netdev->priv is equal to netdev_priv().
2. netdev_priv() wraps the calculation of netdev->priv's offset, obviously
netdev_priv() is more flexible than netdev->priv.
But we cann't kill netdev->priv, because so many drivers reference to it
directly.
OK, becasue Dave S. Miller said, "every direct netdev->priv usage is a bug",
and I want to kill netdev->priv later, I decided to convert all the direct
reference of netdev->priv first.
In this driver, I don't simply use netdev_priv() to replace netdev->priv.
The reason is:
Pointer netdev->priv was changed in this driver, but it shouldn't.
Because the memory was allocated when alloc_netdev() and netdev->priv
should always point to that memory.
So I use netdev->ml_priv to replace netdev->priv.
After replacing, both ai and ai->wifidev->ml_priv point to the same memory.
Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Cc: John W. Linville <linville@tuxdriver.com>
Cc: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Andrey Yurovsky [Tue, 14 Oct 2008 01:23:07 +0000 (18:23 -0700)]
ath5k: fix mesh point operation
This patch fixes mesh point operation (thanks to YanBo for pointing
out the problem): make mesh point interfaces start beaconing when
they come up and configure the RX filter in mesh mode so that mesh
beacons and action frames are received. Add mesh point to the check
in ath5k_add_interface. Tested with multiple AR5211 cards.
Signed-off-by: Andrey Yurovsky <andrey@cozybit.com>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luis R. Rodriguez [Mon, 13 Oct 2008 21:08:10 +0000 (14:08 -0700)]
ath5k: correct ath5k signal quality
This adjusts ath5k's signal quality reporting taking into
consideration received beacons at an RSSI of 35 should indicate
you can use of 54 Mbps on a single stream card (all ath5k cards)
reliably.
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luis R. Rodriguez [Mon, 13 Oct 2008 21:08:09 +0000 (14:08 -0700)]
ath9k: correct signal quality report
This adjusts ath9k's signal quality reporting taking into
consideration received beacons at an RSSI of 45 should indicate
you can use of MCS 15 rate (144 Mbps) reliably on dual stream card.
Keep in mind mac80211 does not yet have aggregation fixed but this
should still provide more accurate results.
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luis R. Rodriguez [Mon, 13 Oct 2008 21:08:07 +0000 (14:08 -0700)]
ath5k/ath9k: correct signal quality
Now that we officially are supporting ath5k I can do this
at work hours.
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Herton Ronaldo Krzesinski [Mon, 13 Oct 2008 18:11:00 +0000 (18:11 +0000)]
rtl8187: add short slot handling for 8187B
This change adds short slot handling for 8187B variant of rtl8187 chips.
Some things to note about changes done:
* Values used are chosen to met 802.11-2007 spec. This raised a question
about SIFS value used with 8187L: 0x22 (34) doesn't match any spec
value. For now just don't change 8187L, but is something to be
looked at.
* On 8187B, the location of EIFS register is at the same place as BRSR+1
of struct rtl818x_csr. Unfortunately there is no clean way to
accomodate 8187B differences currently, just use address of BRSR+1 and
comment about it. The same thing happens for Ack timeout register,
that is on CARRIER_SENSE_COUNTER location of 8187L. The eifs and ack
timeout values are in units of 4us. All these registers information
was gathered from references being the vendor gpl driver and 8180
datasheet, unfortunately there is no information about this on 8187B
datasheet. Also the ack timeout value was inspired by the same
calculation as done on rt2x00.
Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Herton Ronaldo Krzesinski [Mon, 13 Oct 2008 18:10:59 +0000 (18:10 +0000)]
rtl8187: adapt for deprecated IEEE80211_CONF_SHORT_SLOT_TIME flag
This updates 8187L handling for short slot after "mac80211: fix short
slot handling". For 8187B, there was no handling done for short slot
timing so nothing done, support for it will come in a following patch.
Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jiri Slaby [Sun, 12 Oct 2008 20:54:10 +0000 (22:54 +0200)]
Ath5k: add AP mode
Add support for AP mode. This involves:
- enablement in ath5k_beacon_config -- initialize beacon timer
- add AP to the supported modes in ath5k_add_interface
- handle beacon change even for AP in ath5k_config_interface
- remove useless test for IBSS in ath5k_beacon_update
Note that it doesn't enable the AP mode for the driver. It must
be enabled by NL80211_IFTYPE_AP bit added to interface_modes.
v2:
Fixed opmode constant (IEEE80211_ to NL80211_)
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Nick Kossifidis <mickflemm@gmail.com>
Cc: Luis R. Rodriguez <mcgrof@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Sat, 11 Oct 2008 22:39:55 +0000 (00:39 +0200)]
p54/rtl8187: fix up the seqno patch
Sorry about that, for some reason I didn't notice that I'd
left some unused variables in there.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Tue, 14 Oct 2008 14:58:37 +0000 (16:58 +0200)]
mac80211: rewrite HT handling
The HT handling has the following deficiencies, which I've
(partially) fixed:
* it always uses the AP info even if there is no AP,
hence has no chance of working as an AP
* it pretends to be HW config, but really is per-BSS
* channel sanity checking is left to the drivers
* it generally lets the driver control too much
HT enabling is still wrong with this patch if you have more than
one virtual STA mode interface, but that never happens currently.
Once WDS, IBSS or AP/VLAN gets HT capabilities, it will also be
wrong, see the comment in ieee80211_enable_ht().
Additionally, this fixes a number of bugs:
* mac80211: ieee80211_set_disassoc doesn't notify the driver any
more since the refactoring
* iwl-agn-rs: always uses the HT capabilities from the wrong stuff
mac80211 gives it rather than the actual peer STA
* ath9k: a number of bugs resulting from the broken HT API
I'm not entirely happy with putting the HT capabilities into
struct ieee80211_sta as restricted to our own HT TX capabilities,
but I see no cleaner solution for now.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Fri, 10 Oct 2008 23:51:51 +0000 (01:51 +0200)]
mac80211: move bss_conf into vif
Move bss_conf into the vif struct so that drivers can
access it during ->tx without having to store it in
the private data or similar. No driver updates because
this is only for when they want to start using it.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Tue, 14 Oct 2008 17:17:54 +0000 (19:17 +0200)]
mac80211: make retry limits part of hw config
Instead of having a separate callback, use the HW config callback
with a new flag to change retry limits.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Fri, 10 Oct 2008 23:46:25 +0000 (01:46 +0200)]
iwl3945: fix station stuff in RC algorithm
Probably bugs I added.
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>
Johannes Berg [Thu, 9 Oct 2008 10:20:13 +0000 (12:20 +0200)]
nl80211: export HT capabilities
This exports the local HT capabilities in nl80211.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Fri, 10 Oct 2008 11:21:59 +0000 (13:21 +0200)]
mac80211: provide sequence numbers
I've come to think that not providing sequence numbers for
the normal STA mode case was a mistake, at least two drivers
now had to implement code they wouldn't otherwise need, and
I believe at76_usb and adm8211 might be broken.
This patch makes mac80211 assign a sequence number to all
those frames that need one except beacons. That means that
if a driver only implements modes that do not do beaconing
it need not worry about the sequence number.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Larry Finger [Fri, 10 Oct 2008 00:38:52 +0000 (17:38 -0700)]
p54: Move rx_mtu to struct bootrec_desc
The patch entitled "[PATCH] p54: Fix sparse warnings" added the __le16
variable rx_mtu to struct bootrec, but it could equally well be placed
in the struct bootrec_desc, which overlays the 'data' section of bootrec.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Henrique de Moraes Holschuh [Thu, 9 Oct 2008 21:15:33 +0000 (18:15 -0300)]
rfkill: rate-limit rfkill-input workqueue usage (v3)
Limit the number of "expensive" rfkill workqueue operations per second, in
order to not hog system resources too much when faced with a rogue source
of rfkill input events.
The old rfkill-input code (before it was refactored) had such a limit in
place. It used to drop new events that were past the rate limit. This
behaviour was not implemented as an anti-DoS measure, but rather as an
attempt to work around deficiencies in input device drivers which would
issue multiple KEY_FOO events too soon for a given key FOO (i.e. ones that
do not implement mechanical debouncing properly).
However, we can't really expect such issues to be worked around by every
input handler out there, and also by every userspace client of input
devices. It is the input device driver's responsability to do debouncing
instead of spamming the input layer with bogus events.
The new limiter code is focused only on anti-DoS behaviour, and tries to
not lose events (instead, it coalesces them when possible).
The transmitters are updated once every 200ms, maximum. Care is taken not
to delay a request to _enter_ rfkill transmitter Emergency Power Off (EPO)
mode.
If mistriggered (e.g. by a jiffies counter wrap), the code delays processing
*once* by 200ms.
Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: Ivo van Doorn <IvDoorn@gmail.com>
Cc: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Henrique de Moraes Holschuh [Thu, 9 Oct 2008 21:15:32 +0000 (18:15 -0300)]
rfkill: honour EPO state when resuming a rfkill controller
rfkill_resume() would always restore the rfkill controller state to its
pre-suspend state.
Now that we know when we are under EPO, kick the rfkill controller to
SOFT_BLOCKED state instead of to its pre-suspend state when it is resumed
while EPO mode is active.
Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Henrique de Moraes Holschuh [Fri, 10 Oct 2008 00:49:33 +0000 (21:49 -0300)]
rfkill: add master_switch_mode and EPO lock to rfkill and rfkill-input
Add of software-based sanity to rfkill and rfkill-input so that it can
reproduce what hardware-based EPO switches do, blocking all transmitters
and locking down any further attempts to unblock them until the switch is
deactivated.
rfkill-input is responsible for issuing the EPO control requests, like
before.
While an rfkill EPO is active, all transmitters are locked to one of the
BLOCKED states and all attempts to change that through the rfkill API
(userspace and kernel) will be either ignored or return -EPERM errors.
The lock will be released upon receipt of EV_SW SW_RFKILL_ALL ON by
rfkill-input, or should modular rfkill-input be unloaded.
This makes rfkill and rfkill-input extend the operation of an existing
wireless master kill switch to all wireless devices in the system, even
those that are not under hardware or firmware control.
Since the above is the expected operational behavior for the master rfkill
switch, the EPO lock functionality is not optional.
Also, extend rfkill-input to allow for three different behaviors when it
receives an EV_SW SW_RFKILL_ALL ON input event. The user can set which
behavior he wants through the master_switch_mode parameter:
master_switch_mode = 0: EV_SW SW_RFKILL_ALL ON just unlocks rfkill
controller state changes (so that the rfkill userspace and kernel APIs can
now be used to change rfkill controller states again), but doesn't change
any of their states (so they will all remain blocked). This is the safest
mode of operation, as it requires explicit operator action to re-enable a
transmitter.
master_switch_mode = 1: EV_SW SW_RFKILL_ALL ON causes rfkill-input to
attempt to restore the system to the state before the last EV_SW
SW_RFKILL_ALL OFF event, or to the default global states if no EV_SW
SW_RFKILL_ALL OFF ever happened. This is the recommended mode of
operation for laptops.
master_switch_mode = 2: tries to unblock all rfkill controllers (i.e.
enable all transmitters) when an EV_SW SW_RFKILL_ALL ON event is received.
This is the default mode of operation, as it mimics the previous behavior
of rfkill-input.
In order to implement these features in a clean way, the entire event
handling of rfkill-input was refactored into a single worker function.
Protection against input event DoS (repeatedly firing rfkill events for
rfkill-input to process) was removed during the code refactoring. It will
be added back in a future patch.
Note that with these changes, rfkill-input doesn't need to explicitly
handle any radio types for which KEY_<radio type> or SW_<radio type> events
do not exist yet.
Code to handle EV_SW SW_{WLAN,WWAN,BLUETOOTH,WIMAX,...} was added as it
might be needed in the future (and its implementation is not that obvious),
but is currently #ifdef'd out to avoid wasting resources.
Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: Ivo van Doorn <IvDoorn@gmail.com>
Cc: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Henrique de Moraes Holschuh [Thu, 9 Oct 2008 21:15:30 +0000 (18:15 -0300)]
rfkill: export global states to rfkill-input
Export the the global switch states to rfkill-input. This is needed to
properly implement KEY_* handling without disregarding the initial state.
Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Henrique de Moraes Holschuh [Thu, 9 Oct 2008 21:15:29 +0000 (18:15 -0300)]
rfkill: use killable locks instead of interruptible
Apparently, many applications don't expect to get EAGAIN from fd read/write
operations, since POSIX doesn't mandate it.
Use mutex_lock_killable instead of mutex_lock_interruptible, which won't
cause issues.
Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Thu, 9 Oct 2008 10:18:51 +0000 (12:18 +0200)]
mac80211: introduce hw config change flags
This makes mac80211 notify the driver which configuration
actually changed, e.g. channel etc.
No driver changes, this is just plumbing, driver authors are
expected to act on this if they want to.
Also remove the HW CONFIG debug printk, it's incorrect, often
we configure something else.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Thu, 9 Oct 2008 10:18:04 +0000 (12:18 +0200)]
mac80211: kill hw.conf.antenna_sel_{rx,tx}
Never actually used.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Thu, 9 Oct 2008 10:13:49 +0000 (12:13 +0200)]
802.11: clean up/fix HT support
This patch cleans up a number of things:
* the unusable definition of the HT capabilities/HT information
information elements
* variable names that are hard to understand
* mac80211: move ieee80211_handle_ht to ht.c and remove the unused
enable_ht parameter
* mac80211: fix bug with MCS rate 32 in ieee80211_handle_ht
* mac80211: fix bug with casting the result of ieee80211_bss_get_ie
to an information element _contents_ rather than the
whole element, add size checking (another out-of-bounds
access bug fixed!)
* mac80211: remove some unused return values in favour of BUG_ON
checking
* a few minor other things
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Christian Lamparter [Wed, 8 Oct 2008 18:52:22 +0000 (20:52 +0200)]
p54: honour bss_info_changed's short slot time settings
This patch was made on behalf of Johannes request.
"mac80211 and IEEE80211_CONF_SHORT_SLOT_TIME"
Of course, bss_info_changed provides some more useful data.
e.g.: basic_rates, dtim_period, beacon_int and maybe even more.
Everything can be hooked up if it's necessary.
Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rami Rosen [Wed, 8 Oct 2008 09:18:27 +0000 (11:18 +0200)]
mac80211: use HWSIM_STA_MAGIC in hwsim_check_sta_magic() and hwsim_set_sta_magic().
This patch fixes a typo in mac80211_hwsim.c:
use HWSIM_STA_MAGIC in hwsim_check_sta_magic() and hwsim_set_sta_magic()
instead of HWSIM_VIF_MAGIC.
Signed-off-by: Rami Rosen <ramirose@gmail.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Tomas Winkler [Wed, 8 Oct 2008 01:37:30 +0000 (09:37 +0800)]
iwlwifi: refactor rxon time command
This patch refactors rxon time command. It removes the usage of union tsf
in favor of u64 value and hopefully makes code more readable. There are
no functional changes in this patch.
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Tomas Winkler [Wed, 8 Oct 2008 01:37:29 +0000 (09:37 +0800)]
iwlwifi: take a valid antenna upon rate scale init
This patch selects a valid antennae upon rate scale init. This solves a
SYSASSERT complaining that the driver is setting a non valid antenna in
the LQ CMD.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Tomas Winkler [Wed, 8 Oct 2008 01:37:27 +0000 (09:37 +0800)]
iwlwifi: make initial calibration set configurable
This patch adds ability to configure initial calibration set. Not all HW
supported by iwlwifi use the same calibration set, XTAL is one example.
Some clean ups are also included in this patch.
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rami Rosen [Tue, 7 Oct 2008 14:29:11 +0000 (16:29 +0200)]
mac80211: remove unused declaration of struct sta_attribute.
This patch removes unused definition of struct sta_attribute
in net/mac80211/ieee80211_i.h.
Signed-off-by: Rami Rosen <ramirose@gmail.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Wed, 8 Oct 2008 08:59:33 +0000 (10:59 +0200)]
mac80211: fix short slot handling
This patch makes mac80211 handle short slot requests from the AP
properly. Also warn about uses of IEEE80211_CONF_SHORT_SLOT_TIME
and optimise out the code since it cannot ever be hit anyway.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Tue, 7 Oct 2008 10:04:35 +0000 (12:04 +0200)]
mac80211: remove max_antenna_gain config
The antenna gain isn't exactly configurable, despite the belief of
some unnamed individual who thinks that the EEPROM might influence
it.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Tue, 7 Oct 2008 10:04:34 +0000 (12:04 +0200)]
mac80211: clean up ieee80211_hw_config errors
Warn when ieee80211_hw_config returns an error, it shouldn't
happen; remove a number of printks that would happen in such
a case and one printk that is user-triggerable.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Tue, 7 Oct 2008 10:04:33 +0000 (12:04 +0200)]
mac80211: remove wiphy_to_hw
This isn't used by anyone, if we ever need it we can add
it back, until then it's useless.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Tue, 7 Oct 2008 10:04:32 +0000 (12:04 +0200)]
mac80211: minor code cleanups
Nothing very interesting, some checkpatch inspired stuff,
some other things.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Tue, 7 Oct 2008 10:04:31 +0000 (12:04 +0200)]
mac80211: remove writable debugs mesh parameters
These parameters shouldn't be configurable via debugfs, if they
need to be configurable nl80211 support has to be added, if not
then they don't need to be writable here either.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: Javier Cardona <javier@cozybit.com>
Cc: Luis Carlos Cobo <luisca@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Tue, 7 Oct 2008 10:04:30 +0000 (12:04 +0200)]
mac80211: remove aggregation status write support from debugfs
This code uses static variables and thus cannot be kept.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Harvey Harrison [Fri, 31 Oct 2008 07:56:49 +0000 (00:56 -0700)]
misc: replace NIPQUAD()
Using NIPQUAD() with NIPQUAD_FMT, %d.%d.%d.%d or %u.%u.%u.%u
can be replaced with %pI4
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Harvey Harrison [Fri, 31 Oct 2008 07:56:28 +0000 (00:56 -0700)]
fs: replace NIPQUAD()
Using NIPQUAD() with NIPQUAD_FMT, %d.%d.%d.%d or %u.%u.%u.%u
can be replaced with %pI4
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Harvey Harrison [Fri, 31 Oct 2008 07:56:00 +0000 (00:56 -0700)]
drivers: replace NIPQUAD()
Using NIPQUAD() with NIPQUAD_FMT, %d.%d.%d.%d or %u.%u.%u.%u
can be replaced with %pI4
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Harvey Harrison [Fri, 31 Oct 2008 07:54:56 +0000 (00:54 -0700)]
net: replace NIPQUAD() in net/*/
Using NIPQUAD() with NIPQUAD_FMT, %d.%d.%d.%d or %u.%u.%u.%u
can be replaced with %pI4
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Harvey Harrison [Fri, 31 Oct 2008 07:54:29 +0000 (00:54 -0700)]
net: replace NIPQUAD() in net/netfilter/
Using NIPQUAD() with NIPQUAD_FMT, %d.%d.%d.%d or %u.%u.%u.%u
can be replaced with %pI4
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Harvey Harrison [Fri, 31 Oct 2008 07:53:57 +0000 (00:53 -0700)]
net: replace NIPQUAD() in net/ipv4/ net/ipv6/
Using NIPQUAD() with NIPQUAD_FMT, %d.%d.%d.%d or %u.%u.%u.%u
can be replaced with %pI4
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Harvey Harrison [Fri, 31 Oct 2008 07:53:08 +0000 (00:53 -0700)]
net: replace NIPQUAD() in net/ipv4/netfilter/
Using NIPQUAD() with NIPQUAD_FMT, %d.%d.%d.%d or %u.%u.%u.%u
can be replaced with %pI4
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Jarek Poplawski [Fri, 31 Oct 2008 07:47:01 +0000 (00:47 -0700)]
pkt_sched: Add peek emulation for non-work-conserving qdiscs.
This patch adds qdisc_peek_dequeued() wrapper to emulate peek method
with qdisc->dequeue() and storing "peeked" skb in qdisc->gso_skb until
dequeuing. This is mainly for compatibility reasons not to break some
strange configs because peeking is expected for non-work-conserving
parent qdiscs to query work-conserving child qdiscs.
This implementation requires using qdisc_dequeue_peeked() wrapper
instead of directly calling qdisc->dequeue() for all qdiscs ever
querried with qdisc->ops->peek() or qdisc_peek_dequeued().
Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Jarek Poplawski [Fri, 31 Oct 2008 07:46:19 +0000 (00:46 -0700)]
pkt_sched: Use qdisc->ops->peek() instead of ->dequeue() & ->requeue()
Use qdisc->ops->peek() instead of ->dequeue() & ->requeue() pair.
After this patch the only remaining user of qdisc->ops->requeue() is
netem_enqueue(). Based on ideas of Herbert Xu, Patrick McHardy and
David S. Miller.
Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Jarek Poplawski [Fri, 31 Oct 2008 07:45:55 +0000 (00:45 -0700)]
pkt_sched: Add qdisc->ops->peek() implementation.
Add qdisc->ops->peek() implementation for work-conserving qdiscs.
With feedback from Patrick McHardy.
Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Jarek Poplawski [Fri, 31 Oct 2008 07:45:27 +0000 (00:45 -0700)]
pkt_sched: sch_generic: Add generic qdisc->ops->peek() implementation.
With feedback from Patrick McHardy.
Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Patrick McHardy [Fri, 31 Oct 2008 07:44:18 +0000 (00:44 -0700)]
pkt_sched: Add ->peek() methods for fifo, prio and SFQ qdiscs.
From: Patrick McHardy <kaber@trash.net>
Just as a demonstration how easy adding a peek operation to the
work-conserving qdiscs actually is. It doesn't need to keep or change
any internal state in many cases thanks to the guarantee that the
packet will either be dequeued or, if another packet arrives, the
upper qdisc will immediately ->peek again to reevaluate the state.
(This is only slightly modified Patrick's patch.)
Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Jarek Poplawski [Fri, 31 Oct 2008 07:43:45 +0000 (00:43 -0700)]
pkt_sched: sch_generic: Add Qdisc_ops peek() method.
Add Qdisc_ops peek() method in order to replace requeuing.
Based on ideas and patches of Herbert Xu, Patrick McHardy and
David S. Miller.
Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Alexey Dobriyan [Fri, 31 Oct 2008 07:42:25 +0000 (00:42 -0700)]
xfrm: remove unused struct xfrm_policy::next
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Alexey Dobriyan [Fri, 31 Oct 2008 07:41:59 +0000 (00:41 -0700)]
xfrm: C99 for xfrm_dev_notifier
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Fri, 31 Oct 2008 07:17:34 +0000 (00:17 -0700)]
Merge branch 'master' of /linux/kernel/git/davem/net-2.6
Conflicts:
drivers/net/wireless/p54/p54common.c
fernando@oss.ntt.co [Thu, 23 Oct 2008 04:27:19 +0000 (04:27 +0000)]
xfrm: do not leak ESRCH to user space
I noticed that, under certain conditions, ESRCH can be leaked from the
xfrm layer to user space through sys_connect. In particular, this seems
to happen reliably when the kernel fails to resolve a template either
because the AF_KEY receive buffer being used by racoon is full or
because the SA entry we are trying to use is in XFRM_STATE_EXPIRED
state.
However, since this could be a transient issue it could be argued that
EAGAIN would be more appropriate. Besides this error code is not even
documented in the man page for sys_connect (as of man-pages 3.07).
Signed-off-by: Fernando Luis Vazquez Cao <fernando@oss.ntt.co.jp>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Fri, 31 Oct 2008 07:00:33 +0000 (00:00 -0700)]
net: Really remove all of LOOPBACK_TSO code.
As noticed by Saikiran Madugula, commit
7447ef63cf2dfdc444f4c72ae13f604350b2e25f
("loopback: Remove rest of LOOPBACK_TSO code.") got rid of
emulate_large_send_offload() but didn't get rid of the call
site as well.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Fri, 31 Oct 2008 06:57:40 +0000 (23:57 -0700)]
Merge branch 'master' of git://git.infradead.org/users/pcmoore/lblnet-2.6
Alexey Dobriyan [Fri, 31 Oct 2008 06:55:44 +0000 (23:55 -0700)]
netfilter: nf_conntrack_proto_gre: switch to register_pernet_gen_subsys()
register_pernet_gen_device() can't be used is nf_conntrack_pptp module is
also used (compiled in or loaded).
Right now, proto_gre_net_exit() is called before nf_conntrack_pptp_net_exit().
The former shutdowns and frees GRE piece of netns, however the latter
absolutely needs it to flush keymap. Oops is inevitable.
Switch to shiny new register_pernet_gen_subsys() to get correct ordering in
netns ops list.
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Alexey Dobriyan [Fri, 31 Oct 2008 06:55:16 +0000 (23:55 -0700)]
netns: add register_pernet_gen_subsys/unregister_pernet_gen_subsys
netns ops which are registered with register_pernet_gen_device() are
shutdown strictly before those which are registered with
register_pernet_subsys(). Sometimes this leads to opposite (read: buggy)
shutdown ordering between two modules.
Add register_pernet_gen_subsys()/unregister_pernet_gen_subsys() for modules
which aren't elite enough for entry in struct net, and which can't use
register_pernet_gen_device(). PPTP conntracking module is such one.
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Randy Dunlap [Fri, 31 Oct 2008 06:54:35 +0000 (23:54 -0700)]
net: delete excess kernel-doc notation
Remove excess kernel-doc function parameters from networking header
& driver files:
Warning(include/net/sock.h:946): Excess function parameter or struct member 'sk' description in 'sk_filter_release'
Warning(include/linux/netdevice.h:1545): Excess function parameter or struct member 'cpu' description in 'netif_tx_lock'
Warning(drivers/net/wan/z85230.c:712): Excess function parameter or struct member 'regs' description in 'z8530_interrupt'
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Fri, 31 Oct 2008 06:50:18 +0000 (23:50 -0700)]
Merge branch 'davem-fixes' of /linux/kernel/git/jgarzik/netdev-2.6
David S. Miller [Fri, 31 Oct 2008 06:35:23 +0000 (23:35 -0700)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-2.6
David S. Miller [Fri, 31 Oct 2008 06:11:44 +0000 (23:11 -0700)]
pppoe: Fix socket leak.
Move SKB trim before we lookup the socket so we don't have to
put it on failure.
Based upon an initial patch by Jarek Poplawski and suggestions
from Herbert Xu.
Signed-off-by: David S. Miller <davem@davemloft.net>
Trent Piepho [Fri, 31 Oct 2008 01:17:07 +0000 (18:17 -0700)]
gianfar: Don't reset TBI<->SerDes link if it's already up
The link may be up already via the chip's reset strapping, or though action
of U-Boot, or from the last time the interface was brought up. Resetting
the link causes it to go down for several seconds. This can significantly
increase the time from power-on to DHCP completion and a device being
accessible to the network.
Signed-off-by: Trent Piepho <tpiepho@freescale.com>
Acked-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Trent Piepho [Fri, 31 Oct 2008 01:17:06 +0000 (18:17 -0700)]
gianfar: Fix race in TBI/SerDes configuration
The init_phy() function attaches to the PHY, then configures the
SerDes<->TBI link (in SGMII mode). The TBI is on the MDIO bus with the PHY
(sort of) and is accessed via the gianfar's MDIO registers, using the
functions gfar_local_mdio_read/write(), which don't do any locking.
The previously attached PHY will start a work-queue on a timer, and
probably an irq handler as well, which will talk to the PHY and thus use
the MDIO bus. This uses phy_read/write(), which have locking, but not
against the gfar_local_mdio versions.
The result is that PHY code will try to use the MDIO bus at the same time
as the SerDes setup code, corrupting the transfers.
Setting up the SerDes before attaching to the PHY will insure that there is
no race between the SerDes code and *our* PHY, but doesn't fix everything.
Typically the PHYs for all gianfar devices are on the same MDIO bus, which
is associated with the first gianfar device. This means that the first
gianfar's SerDes code could corrupt the MDIO transfers for a different
gianfar's PHY.
The lock used by phy_read/write() is contained in the mii_bus structure,
which is pointed to by the PHY. This is difficult to access from the
gianfar drivers, as there is no link between a gianfar device and the
mii_bus which shares the same MDIO registers. As far as the device layer
and drivers are concerned they are two unrelated devices (which happen to
share registers).
Generally all gianfar devices' PHYs will be on the bus associated with the
first gianfar. But this might not be the case, so simply locking the
gianfar's PHY's mii bus might not lock the mii bus that the SerDes setup
code is going to use.
We solve this by having the code that creates the gianfar platform device
look in the device tree for an mdio device that shares the gianfar's
registers. If one is found the ID of its platform device is saved in the
gianfar's platform data.
A new function in the gianfar mii code, gfar_get_miibus(), can use the bus
ID to search through the platform devices for a gianfar_mdio device with
the right ID. The platform device's driver data is the mii_bus structure,
which the SerDes setup code can use to lock the current bus.
Signed-off-by: Trent Piepho <tpiepho@freescale.com>
CC: Andy Fleming <afleming@freescale.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Arjan van de Ven [Tue, 21 Oct 2008 04:42:39 +0000 (21:42 -0700)]
pci: use pci_ioremap_bar() in drivers/net
Use the newly introduced pci_ioremap_bar() function in drivers/net.
pci_ioremap_bar() just takes a pci device and a bar number, with the goal
of making it really hard to get wrong, while also having a central place
to stick sanity checks.
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Atsushi Nemoto [Tue, 28 Oct 2008 13:30:23 +0000 (22:30 +0900)]
tc35815: Define more Rx status bits
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Divy Le Ray [Wed, 29 Oct 2008 05:40:32 +0000 (22:40 -0700)]
cxgb3 - enable lro control through ethtool
Implement ethtool's get_flags and set_flags methods.
It enables ethtool to control the LRO settings.
Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Rafael J. Wysocki [Wed, 29 Oct 2008 21:22:18 +0000 (14:22 -0700)]
e100: adapt to the reworked PCI PM
Adapt the e100 driver to the reworked PCI PM
* Use the observation that it is sufficient to call pci_enable_wake()
once, unless it fails
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Tested-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: Frans Pop <elendil@planet.nl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Adrian Bunk [Wed, 29 Oct 2008 21:22:15 +0000 (14:22 -0700)]
The overdue eepro100 removal.
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Rafael J. Wysocki [Wed, 29 Oct 2008 21:22:14 +0000 (14:22 -0700)]
skge: adapt skge to use reworked PCI PM
Adapt the skge driver to the reworked PCI PM
* Use device_set_wakeup_enable() and friends as needed
* Remove an open-coded reference to the standard PCI PM registers
* Use pci_prepare_to_sleep() and pci_back_from_sleep() in the
->suspend() and ->resume() callbacks
* Use the observation that it is sufficient to call pci_enable_wake()
once, unless it fails
Tested on Asus L5D (Yukon-Lite rev 7).
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Stephen Hemminger <shemminger@linux-foundation.org>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
David Brownell [Mon, 27 Oct 2008 21:11:34 +0000 (14:11 -0700)]
at91_ether: request/free GPIO for PHY interrupt
When the at91_ether driver is using a GPIO for its PHY interrupt,
be sure to request (and later, if needed, free) that GPIO.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Chunbo Luo [Tue, 28 Oct 2008 01:51:46 +0000 (09:51 +0800)]
amd8111e: fix dma_free_coherent context
Acoording commit
aa24886e379d2b641c5117e178b15ce1d5d366ba,
dma_free_coherent() need irqs enabled.
This patch fix following warning messages:
WARNING: at linux/arch/x86/kernel/pci-dma.c:376 dma_free_coherent+0xaa/0xb0()
Call Trace:
[<
ffffffff8023f80f>] warn_on_slowpath+0x5f/0x90
[<
ffffffff80496ffa>] ? __kfree_skb+0x3a/0xa0
[<
ffffffff802a4723>] ? discard_slab+0x23/0x40
[<
ffffffff8021274a>] dma_free_coherent+0xaa/0xb0
[<
ffffffff8043668f>] amd8111e_close+0x10f/0x1b0
[<
ffffffff8049f3ae>] dev_close+0x5e/0xb0
[<
ffffffff8049efa1>] dev_change_flags+0xa1/0x1e0
[<
ffffffff806b2171>] ic_close_devs+0x36/0x4e
[<
ffffffff806b29ee>] ip_auto_config+0x581/0x10f3
[<
ffffffff803a6e19>] ? kobject_add+0x69/0x90
[<
ffffffff803a698a>] ? kobject_get+0x1a/0x30
[<
ffffffff803a785b>] ? kobject_uevent+0xb/0x10
[<
ffffffff803a6c62>] ? kset_register+0x52/0x60
[<
ffffffff803a6f9b>] ? kset_create_and_add+0x6b/0xa0
[<
ffffffff804e2e74>] ? tcp_ca_find+0x24/0x50
[<
ffffffff806b246d>] ? ip_auto_config+0x0/0x10f3
[<
ffffffff8020903c>] _stext+0x3c/0x150
[<
ffffffff802772d3>] ? register_irq_proc+0xd3/0xf0
[<
ffffffff802f0000>] ? mb_cache_create+0x80/0x1f0
[<
ffffffff80688693>] kernel_init+0x141/0x1b8
[<
ffffffff80688552>] ? kernel_init+0x0/0x1b8
[<
ffffffff8020d609>] child_rip+0xa/0x11
[<
ffffffff80688552>] ? kernel_init+0x0/0x1b8
[<
ffffffff80688552>] ? kernel_init+0x0/0x1b8
[<
ffffffff8020d5ff>] ? child_rip+0x0/0x11
Signed-off-by: Chunbo Luo <chunbo.luo@windriver.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Jay Cliburn [Wed, 29 Oct 2008 16:01:36 +0000 (11:01 -0500)]
atl1: fix vlan tag regression
Commit
401c0aabec4b97320f962a0161a846d230a6f7aa introduced a regression
in the atl1 driver by storing the VLAN tag in the wrong TX descriptor
field.
This patch causes the VLAN tag to be stored in its proper location.
Tested-by: Ramon Casellas <ramon.casellas@cttc.es>
Signed-off-by: Jay Cliburn <jacliburn@bellsouth.net>
Cc: stable@kernel.org
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Mike Frysinger [Wed, 29 Oct 2008 13:56:06 +0000 (09:56 -0400)]
SMC91x: delete unused local variable "lp"
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Brice Goglin [Thu, 30 Oct 2008 07:59:33 +0000 (08:59 +0100)]
myri10ge: fix stop/go mmio ordering
Use mmiowb() to ensure "stop" and "go" commands are sent in order on ia64.
Signed-off-by: Brice Goglin <brice@myri.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Andy Gospodarek [Fri, 31 Oct 2008 00:41:16 +0000 (17:41 -0700)]
bonding: fix panic when taking bond interface down before removing module
A panic was discovered with bonding when using mode 5 or 6 and trying to
remove the slaves from the bond after the interface was taken down.
When calling 'ifconfig bond0 down' the following happens:
bond_close()
bond_alb_deinitialize()
tlb_deinitialize()
kfree(bond_info->tx_hashtbl)
bond_info->tx_hashtbl = NULL
Unfortunately if there are still slaves in the bond, when removing the
module the following happens:
bonding_exit()
bond_free_all()
bond_release_all()
bond_alb_deinit_slave()
tlb_clear_slave()
tx_hash_table = BOND_ALB_INFO(bond).tx_hashtbl
u32 next_index = tx_hash_table[index].next
As you might guess we panic when trying to access a few entries into the
table that no longer exists.
I experimented with several options (like moving the calls to
tlb_deinitialize somewhere else), but it really makes the most sense to
be part of the bond_close routine. It also didn't seem logical move
tlb_clear_slave around too much, so the simplest option seems to add a
check in tlb_clear_slave to make sure we haven't already wiped the
tx_hashtbl away before searching for all the non-existent hash-table
entries that used to point to the slave as the output interface.
Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Jay Vosburgh [Fri, 31 Oct 2008 00:41:15 +0000 (17:41 -0700)]
bonding: Clean up resource leaks
This patch reworks the resource free logic performed at the time
a bonding device is released. This (a) closes two resource leaks, one
for workqueues and one for multicast lists, and (b) improves commonality
of code between the "destroy one" and "destroy all" paths by performing
final free activity via destructor instead of explicitly (and differently)
in each path.
"Sean E. Millichamp" <sean@bruenor.org> reported the workqueue
leak, and included a different patch.
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Jay Vosburgh [Fri, 31 Oct 2008 00:41:14 +0000 (17:41 -0700)]
bonding: fix miimon failure counter
During the rework of the mii monitor for:
commit
f0c76d61779b153dbfb955db3f144c62d02173c2
Author: Jay Vosburgh <fubar@us.ibm.com>
Date: Wed Jul 2 18:21:58 2008 -0700
bonding: refactor mii monitor
I left out the increment of the link failure counter. This
patch corrects that omission.
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Linus Torvalds [Fri, 31 Oct 2008 01:36:16 +0000 (18:36 -0700)]
Merge branch 'for-linus' of git://neil.brown.name/md
* 'for-linus' of git://neil.brown.name/md:
md: destroy partitions and notify udev when md array is stopped.
Linus Torvalds [Fri, 31 Oct 2008 01:35:09 +0000 (18:35 -0700)]
Merge git://git./linux/kernel/git/rusty/linux-2.6-for-linus
* git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus:
lguest: fix irq vectors.
lguest: fix early_ioremap.
lguest: fix example launcher compile after moved asm-x86 dir.
Linus Torvalds [Fri, 31 Oct 2008 01:33:46 +0000 (18:33 -0700)]
Merge branch 'x86-fixes-for-linus-2' of git://git./linux/kernel/git/tip/linux-2.6-tip
* 'x86-fixes-for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
x86: cpu_index build fix
x86/voyager: fix missing cpu_index initialisation
x86/voyager: fix compile breakage caused by
dc1e35c6e95e8923cf1d3510438b63c600fee1e2
x86: fix /dev/mem mmap breakage when PAT is disabled
x86/voyager: fix compile breakage casued by x86: move prefill_possible_map calling early
x86: use CONFIG_X86_SMP instead of CONFIG_SMP
x86/voyager: fix boot breakage caused by x86: boot secondary cpus through initial_code
x86, uv: fix compile error in uv_hub.h
i386/PAE: fix pud_page()
x86: remove debug code from arch_add_memory()
x86: start annotating early ioremap pointers with __iomem
x86: two trivial sparse annotations
x86: fix init_memory_mapping for [
dc000000 -
e0000000) - v2
Linus Torvalds [Fri, 31 Oct 2008 01:32:03 +0000 (18:32 -0700)]
Merge branch 'sched-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip
* 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
sched: remove sched-design.txt from 00-INDEX
sched: change sched_debug's mode to 0444
Linus Torvalds [Fri, 31 Oct 2008 01:31:42 +0000 (18:31 -0700)]
Merge branch 'tracing-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip
* 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
ftrace: handle archs that do not support irqs_disabled_flags
Linus Torvalds [Fri, 31 Oct 2008 01:31:27 +0000 (18:31 -0700)]
Merge branch 'core-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip
* 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
resources: fix x86info results ioremap.c:226 __ioremap_caller+0xf2/0x2d6() WARNINGs
Rusty Russell [Fri, 31 Oct 2008 16:24:27 +0000 (11:24 -0500)]
lguest: fix irq vectors.
do_IRQ: cannot handle IRQ -1 vector 0x20 cpu 0
------------[ cut here ]------------
kernel BUG at arch/x86/kernel/irq_32.c:219!
We're not ISA: we have a 1:1 mapping from vectors to irqs.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Rusty Russell [Fri, 31 Oct 2008 16:24:27 +0000 (11:24 -0500)]
lguest: fix early_ioremap.
dmi_scan_machine breaks under lguest:
lguest: unhandled trap 14 at 0xc04edeae (0xffa00000)
This is because we use current_cr3 for the read_cr3() paravirt
function, and it isn't set until the first cr3 change. We got away
with it until this happened.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Rusty Russell [Fri, 31 Oct 2008 16:24:25 +0000 (11:24 -0500)]
lguest: fix example launcher compile after moved asm-x86 dir.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Ingo Molnar [Thu, 30 Oct 2008 23:43:03 +0000 (00:43 +0100)]
x86: cpu_index build fix
fix:
arch/x86/kernel/cpu/common.c: In function 'early_identify_cpu':
arch/x86/kernel/cpu/common.c:553: error: 'struct cpuinfo_x86' has no member named 'cpu_index'
as cpu_index is only available on SMP.
Signed-off-by: Ingo Molnar <mingo@elte.hu>