Harvey Harrison [Thu, 27 Nov 2008 08:12:47 +0000 (00:12 -0800)]
decnet: remove private wrappers of endian helpers
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Reviewed-by: Steven Whitehouse <swhiteho@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Since all other gen_estimator functions use bstats and rate_est params
together, and searching for them is optimized now, let's use this also
in gen_estimator_active(). The return type of gen_estimator_active()
is changed to bool, and gen_find_node() parameters to const, btw.
In tcf_act_police_locate() a check for ACT_P_CREATED is added before
calling gen_estimator_active().
Signed-off-by: Jarek Poplawski <jarkao2@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This patch fixes a regression (introduced by
"p54: more definitions form lmac_longbow.h and pda.h")
It turned out that the "ret" variable wasn't initialized and
this caused the following warnings/errors to appear:
wmaster1: failed to set TX queue parameters for queue 2
wmaster1: failed to set TX queue parameters for queue 3
wmaster1: failed to set TX queue parameters for queue 1
wmaster1: failed to set TX queue parameters for queue 0
Signed-off-by: Christian Lamparter <chunkeey@web.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith [Mon, 24 Nov 2008 06:38:35 +0000 (12:08 +0530)]
ath9k: Use proper TX channel width for setting channels
The TX channel width of the BSS can be obtained only after association.
In all cases, default to HT20 if HT is enabled, and set
chan width to HT40 only if the BSS supports it.
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jouni Malinen [Sat, 22 Nov 2008 20:00:31 +0000 (22:00 +0200)]
nl80211: Change max TX power to be in mBm instead of dBm
In order to be consistent with NL80211_ATTR_POWER_RULE_MAX_EIRP,
change NL80211_FREQUENCY_ATTR_MAX_TX_POWER to use mBm and U32 instead
of dBm and U8. This is a userspace interface change, but the previous
version had not yet been pushed upstream and there are no userspace
programs using this yet, so there is justification to get this change in
as long as it goes in before the previous version gets out.
Signed-off-by: Jouni Malinen <j@w1.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
David Kilroy [Sat, 22 Nov 2008 10:37:28 +0000 (10:37 +0000)]
orinoco: Provide option to avoid unnecessary fw caching
Make firmware caching on startup optional, and make it default.
When the option is not selected and PM_SLEEP is configured, then
cache firmware in the suspend pm_notifier. This configuration saves
about 64k RAM in normal use, but can lead to a situation where the
driver is configured to use a different firmware.
Signed-off by: David Kilroy <kilroyd@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
We correct this by handling the requeue directly on
the ath_rx_tasklet() and trying to allocate an skb
*prior* to sending up the last hardware processed
skb. If we run out of memory this gauranteees we have
skbs to work with while it simply drops new received
frames.
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
We "optimize" away the get_state() hook call on rfkill_toggle_radio
when doing a forced state change. This means the resume path is not
calling get_state() as it should.
Call it manually on the resume handler, as we don't want to mess with
the EPO path by removing the optimization. This has the added benefit
of making it explicit that rfkill->state could have been modified
before we hit the rfkill_toggle_radio() call in the class resume
handler.
Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Acked-by: Ivo van Doorn <IvDoorn@gmail.com> Cc: Matthew Garrett <mjg59@srcf.ucam.org> Cc: Alan Jenkins <alan-jenkins@tuffmail.co.uk> Signed-off-by: John W. Linville <linville@tuxdriver.com>
The rfkill class API requires that the driver connected to a class
call rfkill_force_state() on resume to update the real state of the
rfkill controller, OR that it provides a get_state() hook.
This means there is potentially a hidden call in the resume code flow
that changes rfkill->state (i.e. rfkill_force_state()), so the
previous state of the transmitter was being lost.
The simplest and most future-proof way to fix this is to explicitly
store the pre-sleep state on the rfkill structure, and restore from
that on resume.
Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Acked-by: Ivo van Doorn <IvDoorn@gmail.com> Cc: Matthew Garrett <mjg59@srcf.ucam.org> Cc: Alan Jenkins <alan-jenkins@tuffmail.co.uk> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Vivek Natarajan [Sat, 22 Nov 2008 06:19:50 +0000 (22:19 -0800)]
mac80211: Look out for some other AP when disassoc is received.
When a disassoc packet is received from the AP with a reason code of
'leaving the BSS', mac80211 should go into DISABLED state just as it
would do if the AP suddenly went away for some reason, as that is what
will happen shortly after the AP leaves anyway.
Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com> Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Thu, 20 Nov 2008 14:16:22 +0000 (15:16 +0100)]
ath5k: Clean up eeprom parsing and add missing calibration data
This patch brings the ath5k eeprom parsing code in sync with the work
done on ath_info by Nick Kossifidis and integrates the missing parts
based on the code of the Atheros Legacy HAL release.
Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Winkler, Tomas [Wed, 19 Nov 2008 23:32:27 +0000 (15:32 -0800)]
iwlwifi: TX update chicken bits
This instructs FH to increment the retry count of a packet when
it is brought from the memory to TX-FIFO to save transactions
during aggregation flow.
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Winkler, Tomas [Wed, 19 Nov 2008 23:32:26 +0000 (15:32 -0800)]
iwlwifi: TX setup fix confusion between TX queue and TX DMA channel
This patch configures correctly TX DMA channel. It is not
the same as TX queue.
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Acked-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>
Winkler, Tomas [Wed, 19 Nov 2008 23:32:25 +0000 (15:32 -0800)]
iwlwifi: 4965 define firmware file name once
Apply same idiom as in 5000 introduced by
'iwlwifi: define firmware file name once'
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Tomas Winkler [Wed, 19 Nov 2008 23:32:24 +0000 (15:32 -0800)]
iwlwifi: enable base band calibration in 5000 HW
This patch adds base band calibration support.
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Winkler, Tomas [Wed, 19 Nov 2008 23:32:23 +0000 (15:32 -0800)]
iwlwifi: move iwl_clear_stations_table to iwl-sta.c
This patch moves iwl_clear_stations_table into iwl-sta.c
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Abhijeet Kolekar [Wed, 19 Nov 2008 23:32:22 +0000 (15:32 -0800)]
iwl3945 : Fix ad-hoc mode for 3945
Patch fixes the ad-hoc mode by
1) Removing redundant clear_stations_table which prevented generation of
beacons.
2) Setting assoc_id to 1. It was never set so preventing tx flow
in iwl3945_tx_skb.
Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Bob Copeland [Tue, 18 Nov 2008 04:40:38 +0000 (23:40 -0500)]
ath5k: set mac address in add_interface
Configure the mac address in add_interface and clear it in
remove_interface so that users can change the mac address
to something other than the one in the eeprom. Also avoid
setting it at attach time so that we won't ack packets
until fully set up.
Signed-off-by: Bob Copeland <me@bobcopeland.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith [Tue, 18 Nov 2008 03:39:54 +0000 (09:09 +0530)]
ath9k: Fix bug in deciphering channel flags
CHANNEL_CCK flag is set for all 2 Ghz channels, so IS_CHAN_CCK() would
turn out to be true for all channles in that band.
Use IS_CHAN_B() now, which checks the channel mode and not the channel
flags.
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith [Tue, 18 Nov 2008 03:38:13 +0000 (09:08 +0530)]
ath9k: General code scrub
Replace TRUE/FALSE macros with VALID/INVALID macros.
Follow a consistent variable convention.
Remove unnecessary comments.
Add all RC phy macros into a single enum.
Merge functions into reasonably sized entities.
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith [Tue, 18 Nov 2008 03:37:30 +0000 (09:07 +0530)]
ath9k: Use rate_driver_data
Remove the hack using vif, and use rate_driver_data within
skb->cb to hold driver specific rate information.
Setup the rate series in the skb's tx control area and remove
all references to ath9k specific rate series ( using struct ath_rc_series ).
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith [Tue, 18 Nov 2008 03:37:06 +0000 (09:07 +0530)]
ath9k: Remove ath_rate_softc
Move the hw rate tables to ath_softc, and access them directly.
tx_triglevel_max is global, move it to ath_rate_node.
Now that ath_rate_softc is gone, rate control attach becomes simpler.
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Larry Finger [Mon, 17 Nov 2008 15:08:21 +0000 (09:08 -0600)]
rtl8187: Fix transmission count sent to mac80211
In the commit entitled "mac80211/drivers: rewrite the rate control
API", the meaning of the packet transmit count was changed from the
number of retries to the total number. In driver rtl8187, this change
was missed.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Acked-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br> Tested-by: Hin-Tak Leung <htl10@users.sourceforge.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Larry Finger [Sun, 16 Nov 2008 23:09:25 +0000 (17:09 -0600)]
mac80211: Fix pid rate-setting algorithm to allow rate changes
In commit 9ea2c74 named "mac80211/drivers: rewrite the rate control API",
the meaning of status.rates[i].count was changed from number of retries
to total number of tries. As a result, the pid rate-setting algorithm fails
because every packet appears to have needed a retransmit.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Ivo van Doorn [Sat, 15 Nov 2008 23:08:50 +0000 (00:08 +0100)]
rt2x00: Don't switch off LED on initialization
When we switch off the LEDS during initialization
we kill rt73usb from proper functioning. The immediate
result after the first LED command are MCU failures
and a complete breakdown of TX/RX.
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Andrey Borzenkov [Sat, 15 Nov 2008 14:15:09 +0000 (17:15 +0300)]
orinoco: indicate it is using dBm in wireless_stats and spy
Since WE7 /proc/net/wireless checks whether level and noise are in dBm
and shows them accordingly. Indicate that we return signal and noice
levels in dBm.
Before:
Inter-| sta-| Quality | Discarded packets | Missed | WE
face | tus | link level noise | nwid crypt frag retry misc | beacon | 22
eth1: 0000 65. 219. 165. 0 0 148 41 0 0
After:
Inter-| sta-| Quality | Discarded packets | Missed | WE
face | tus | link level noise | nwid crypt frag retry misc | beacon | 22
eth1: 0000 65. -37. -91. 0 0 0 0 0 0
While at it, replace raw numbers with appropriate macro.
Signed-off-by: Andrey Borzenkov <arvidjaar@mail.ru> Signed-off-by: Pavel Roskin <proski@gnu.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Patrick McHardy [Wed, 26 Nov 2008 11:57:44 +0000 (03:57 -0800)]
netfilter: ctnetlink: fix GFP_KERNEL allocation under spinlock
The previous fix for the conntrack creation race (netfilter: ctnetlink:
fix conntrack creation race) missed a GFP_KERNEL allocation that is
now performed while holding a spinlock. Switch to GFP_ATOMIC.
Reported-and-tested-by: Zoltan Borbely <bozo@andrews.hu> Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Eric Dumazet [Wed, 26 Nov 2008 09:08:18 +0000 (01:08 -0800)]
net: release skb->dst in sock_queue_rcv_skb()
When queuing a skb to sk->sk_receive_queue, we can release its dst,
not anymore needed. Since current cpu did the dst_hold(), refcount is
probably still hot int this cpu caches.
This avoids readers to access the original dst to decrement its
refcount, possibly a long time after packet reception. This should
speedup UDP and RAW receive path.
Signed-off-by: Eric Dumazet <dada1@cosmosbay.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Eric Dumazet [Wed, 26 Nov 2008 05:16:35 +0000 (21:16 -0800)]
net: Use a percpu_counter for sockets_allocated
Instead of using one atomic_t per protocol, use a percpu_counter
for "sockets_allocated", to reduce cache line contention on
heavy duty network servers.
Note : We revert commit (248969ae31e1b3276fc4399d67ce29a5d81e6fd9
net: af_unix can make unix_nr_socks visbile in /proc),
since it is not anymore used after sock_prot_inuse_add() addition
Signed-off-by: Eric Dumazet <dada1@cosmosbay.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Found that while trying average rate policing, it was possible to
request average rate policing without a rate estimator. This results
in no policing which is harmless but incorrect.
Since policing could be setup in two steps, need to check
in the kernel.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Arjan van de Ven [Wed, 26 Nov 2008 05:08:13 +0000 (21:08 -0800)]
net: make skb_truesize_bug() call WARN()
The truesize message check is important enough to make it print "BUG"
to the user console... lets also make it important enough to spit a
backtrace/module list etc so that kerneloops.org can track them.
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Fix the defactoring of ei_XXX functions in 8390 and 8390p.
Remove the tx_timeout hack since no driver including the 3c503
overrides tx_timeout at this time, looks like a legacy thing.
Also, since several drivers all have same hooks, provide common
netdev_ops.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Alexey Dobriyan [Wed, 26 Nov 2008 02:00:48 +0000 (18:00 -0800)]
netns xfrm: per-netns sysctls
Make
net.core.xfrm_aevent_etime
net.core.xfrm_acq_expires
net.core.xfrm_aevent_rseqth
net.core.xfrm_larval_drop
sysctls per-netns.
For that make net_core_path[] global, register it to prevent two
/proc/net/core antries and change initcall position -- xfrm_init() is called
from fs_initcall, so this one should be fs_initcall at least.
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Alexey Dobriyan [Wed, 26 Nov 2008 01:58:31 +0000 (17:58 -0800)]
netns PF_KEY: part 2
* interaction with userspace -- take netns from userspace socket.
* in ->notify hook take netns either from SA or explicitly passed --
we don't know if SA/SPD flush is coming.
* stub policy migration with init_net for now.
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>