safe/jmp/linux-2.6
15 years agowext: Extract private call iw_point handling into seperate functions.
David S. Miller [Fri, 21 Dec 2007 11:33:46 +0000 (03:33 -0800)]
wext: Extract private call iw_point handling into seperate functions.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agowext: Extract standard call iw_point handling into seperate function.
David S. Miller [Fri, 21 Dec 2007 11:27:17 +0000 (03:27 -0800)]
wext: Extract standard call iw_point handling into seperate function.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agowext: Make adjust_priv_size() take a "struct iw_point *".
David S. Miller [Fri, 21 Dec 2007 11:24:24 +0000 (03:24 -0800)]
wext: Make adjust_priv_size() take a "struct iw_point *".

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agowext: Remove inline from get_priv_size() and adjust_priv_size().
David S. Miller [Fri, 21 Dec 2007 11:22:38 +0000 (03:22 -0800)]
wext: Remove inline from get_priv_size() and adjust_priv_size().

The compiler inlines when appropriate.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
David S. Miller [Tue, 17 Jun 2008 01:25:48 +0000 (18:25 -0700)]
Merge branch 'master' of /linux/kernel/git/davem/net-2.6

Conflicts:

drivers/net/wireless/rt2x00/Kconfig
drivers/net/wireless/rt2x00/rt2x00usb.c
net/sctp/protocol.c

15 years agoatm: [he] send idle cells instead of unassigned when in SDH mode
Chas Williams [Tue, 17 Jun 2008 00:21:27 +0000 (17:21 -0700)]
atm: [he] send idle cells instead of unassigned when in SDH mode

Signed-off-by: Chas Williams <chas@cmf.nrl.navy.mil>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoatm: [he] limit queries to the device's register space
Robert T. Johnson [Tue, 17 Jun 2008 00:20:52 +0000 (17:20 -0700)]
atm: [he] limit queries to the device's register space

From: "Robert T. Johnson" <rtjohnso@eecs.berkeley.edu>
Signed-off-by: Chas Williams <chas@cmf.nrl.navy.mil>
15 years agoatm: [br2864] fix routed vcmux support
Eric Kinzie [Tue, 17 Jun 2008 00:18:18 +0000 (17:18 -0700)]
atm: [br2864] fix routed vcmux support

From: Eric Kinzie <ekinzie@cmf.nrl.navy.mil>
Signed-off-by: Chas Williams <chas@cmf.nrl.navy.mil>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoatm: [he] only support suni driver on multimode interfaces
Chas Williams [Tue, 17 Jun 2008 00:17:31 +0000 (17:17 -0700)]
atm: [he] only support suni driver on multimode interfaces

Signed-off-by: Chas Williams <chas@cmf.nrl.navy.mil>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoatm: [iphase] doesn't call phy->start due to a bogus #ifndef
Jorge Boncompte [DTI2] [Tue, 17 Jun 2008 00:16:35 +0000 (17:16 -0700)]
atm: [iphase] doesn't call phy->start due to a bogus #ifndef

This causes the suni driver to oops if you try to use sonetdiag to get
the statistics. Also add the corresponding phy->stop call to fix another
oops if you try to remove the module.

Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net>
Signed-off-by: Chas Williams <chas@cmf.nrl.navy.mil>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoatm: [iphase] set drvdata before enabling interrupts
Jorge Boncompte [DTI2] [Tue, 17 Jun 2008 00:16:04 +0000 (17:16 -0700)]
atm: [iphase] set drvdata before enabling interrupts

Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net>
Signed-off-by: Chas Williams <chas@cmf.nrl.navy.mil>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoatm: [br2684] Fix oops due to skb->dev being NULL
Jorge Boncompte [DTI2] [Tue, 17 Jun 2008 00:15:33 +0000 (17:15 -0700)]
atm: [br2684] Fix oops due to skb->dev being NULL

It happens that if a packet arrives in a VC between the call to open it on
the hardware and the call to change the backend to br2684, br2684_regvcc
processes the packet and oopses dereferencing skb->dev because it is
NULL before the call to br2684_push().

Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net>
Signed-off-by: Chas Williams <chas@cmf.nrl.navy.mil>
15 years agonetns: introduce the net_hash_mix "salt" for hashes
Pavel Emelyanov [Tue, 17 Jun 2008 00:14:11 +0000 (17:14 -0700)]
netns: introduce the net_hash_mix "salt" for hashes

There are many possible ways to add this "salt", thus I made this
patch to be the last in the series to change it if required.

Currently I propose to use the struct net pointer itself as this
salt, but since this pointer is most often cache-line aligned, shift
this right to eliminate the bits, that are most often zeroed.

After this, simply add this mix to prepared hashfn-s.

For CONFIG_NET_NS=n case this salt is 0 and no changes in hashfn
appear.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoinet6: add struct net argument to inet6_ehashfn
Pavel Emelyanov [Tue, 17 Jun 2008 00:13:48 +0000 (17:13 -0700)]
inet6: add struct net argument to inet6_ehashfn

Same as for inet_hashfn, prepare its ipv6 incarnation.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoinet: add struct net argument to inet_ehashfn
Pavel Emelyanov [Tue, 17 Jun 2008 00:13:27 +0000 (17:13 -0700)]
inet: add struct net argument to inet_ehashfn

Although this hash takes addresses into account, the ehash chains
can also be too long when, for instance, communications via lo occur.
So, prepare the inet_hashfn to take struct net into account.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoinet: add struct net argument to inet_lhashfn
Pavel Emelyanov [Tue, 17 Jun 2008 00:13:08 +0000 (17:13 -0700)]
inet: add struct net argument to inet_lhashfn

Listening-on-one-port sockets in many namespaces produce long
chains in the listening_hash-es, so prepare the inet_lhashfn to
take struct net into account.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoinet: add struct net argument to inet_bhashfn
Pavel Emelyanov [Tue, 17 Jun 2008 00:12:49 +0000 (17:12 -0700)]
inet: add struct net argument to inet_bhashfn

Binding to some port in many namespaces may create too long
chains in bhash-es, so prepare the hashfn to take struct net
into account.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoudp: add struct net argument to udp_hashfn
Pavel Emelyanov [Tue, 17 Jun 2008 00:12:29 +0000 (17:12 -0700)]
udp: add struct net argument to udp_hashfn

Every caller already has this one. The new argument is currently
unused, but this will be fixed shortly.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoudp: provide a struct net pointer for __udp[46]_lib_mcast_deliver
Pavel Emelyanov [Tue, 17 Jun 2008 00:12:11 +0000 (17:12 -0700)]
udp: provide a struct net pointer for __udp[46]_lib_mcast_deliver

They both calculate the hash chain, but currently do not have
a struct net pointer, so pass one there via additional argument,
all the more so their callers already have such.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoudp: introduce a udp_hashfn function
Pavel Emelyanov [Tue, 17 Jun 2008 00:11:50 +0000 (17:11 -0700)]
udp: introduce a udp_hashfn function

Currently the chain to store a UDP socket is calculated with
simple (x & (UDP_HTABLE_SIZE - 1)). But taking net into account
would make this calculation a bit more complex, so moving it into
a function would help.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoipv4: Remove unused definitions in net/ipv4/tcp_ipv4.c.
Rami Rosen [Tue, 17 Jun 2008 00:07:16 +0000 (17:07 -0700)]
ipv4: Remove unused definitions in net/ipv4/tcp_ipv4.c.

1) Remove ICMP_MIN_LENGTH, as it is unused.

2) Remove unneeded tcp_v4_send_check() declaration.

Signed-off-by: Rami Rosen <ramirose@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoraw: Restore /proc/net/raw correct behavior
Eric Dumazet [Tue, 17 Jun 2008 00:03:32 +0000 (17:03 -0700)]
raw: Restore /proc/net/raw correct behavior

I just noticed "cat /proc/net/raw" was buggy, missing '\n' separators.

I believe this was introduced by commit 8cd850efa4948d57a2ed836911cfd1ab299e89c6
([RAW]: Cleanup IPv4 raw_seq_show.)

This trivial patch restores correct behavior, and applies to current
Linus tree (should also be applied to stable tree as well.)

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet: Fix test for VLAN TX checksum offload capability
Ben Hutchings [Tue, 17 Jun 2008 00:02:28 +0000 (17:02 -0700)]
net: Fix test for VLAN TX checksum offload capability

Selected device feature bits can be propagated to VLAN devices, so we
can make use of TX checksum offload and TSO on VLAN-tagged packets.
However, if the physical device does not do VLAN tag insertion or
generic checksum offload then the test for TX checksum offload in
dev_queue_xmit() will see a protocol of htons(ETH_P_8021Q) and yield
false.

This splits the checksum offload test into two functions:

- can_checksum_protocol() tests a given protocol against a feature bitmask

- dev_can_checksum() first tests the skb protocol against the device
  features; if that fails and the protocol is htons(ETH_P_8021Q) then
  it tests the encapsulated protocol against the effective device
  features for VLANs

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Acked-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosctp: Correclty set changeover_active for SFR-CACC
Vlad Yasevich [Tue, 17 Jun 2008 00:00:29 +0000 (17:00 -0700)]
sctp: Correclty set changeover_active for SFR-CACC

Right now, any time we set a primary transport we set
the changeover_active flag.  As a result, we invoke SFR-CACC
even when there has been no changeover events.

Only set changeover_active, when there is a true changeover
event, i.e. we had a primary path and we are changing to
another transport.

Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosctp: Correctly cleanup procfs entries upon failure.
Wei Yongjun [Mon, 16 Jun 2008 23:59:55 +0000 (16:59 -0700)]
sctp: Correctly cleanup procfs entries upon failure.

This patch remove the proc fs entry which has been created if fail to
set up proc fs entry for the SCTP protocol.

Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agotcp: Revert reset of deferred accept changes in 2.6.26
David S. Miller [Mon, 16 Jun 2008 23:57:40 +0000 (16:57 -0700)]
tcp: Revert reset of deferred accept changes in 2.6.26

Ingo's system is still seeing strange behavior, and he
reports that is goes away if the rest of the deferred
accept changes are reverted too.

Therefore this reverts e4c78840284f3f51b1896cf3936d60a6033c4d2c
("[TCP]: TCP_DEFER_ACCEPT updates - dont retxmt synack") and
539fae89bebd16ebeafd57a87169bc56eb530d76 ("[TCP]: TCP_DEFER_ACCEPT
updates - defer timeout conflicts with max_thresh").

Just like the other revert, these ideas can be revisited for
2.6.27

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoipv6 sit: Avoid extra need for compat layer in PRL management.
YOSHIFUJI Hideaki [Mon, 16 Jun 2008 23:48:20 +0000 (16:48 -0700)]
ipv6 sit: Avoid extra need for compat layer in PRL management.

We've introduced extra need of compat layer for ip_tunnel_prl{}
for PRL (Potential Router List) management.  Though compat_ioctl
is still missing in ipv4/ipv6, let's make the interface more
straight-forward and eliminate extra need for nasty compat layer
anyway since the interface is new for 2.6.26.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agopkt_sched: Change HTB_HYSTERESIS to a runtime parameter htb_hysteresis.
Jesper Dangaard Brouer [Mon, 16 Jun 2008 23:39:32 +0000 (16:39 -0700)]
pkt_sched: Change HTB_HYSTERESIS to a runtime parameter htb_hysteresis.

Add a htb_hysteresis parameter to htb_sch.ko and by sysfs magic make
it runtime adjustable via
/sys/module/sch_htb/parameters/htb_hysteresis mode 640.

Signed-off-by: Jesper Dangaard Brouer <hawk@comx.dk>
Acked-by: Martin Devera <devik@cdi.cz>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agopkt_sched: HTB scheduler, change default hysteresis mode to off.
Jesper Dangaard Brouer [Mon, 16 Jun 2008 23:38:33 +0000 (16:38 -0700)]
pkt_sched: HTB scheduler, change default hysteresis mode to off.

The HTB hysteresis mode reduce the CPU load, but at the
cost of scheduling accuracy.

On ADSL links (512 kbit/s upstream), this inaccuracy introduce
significant jitter, enought to disturbe VoIP.  For details see my
masters thesis (http://www.adsl-optimizer.dk/thesis/), chapter 7,
section 7.3.1, pp 69-70.

Signed-off-by: Jesper Dangaard Brouer <hawk@comx.dk>
Acked-by: Martin Devera <devik@cdi.cz>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/linville/wireles...
David S. Miller [Sun, 15 Jun 2008 00:33:38 +0000 (17:33 -0700)]
Merge branch 'master' of /linux/kernel/git/linville/wireless-2.6

15 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/linville/wireles...
David S. Miller [Sun, 15 Jun 2008 00:15:39 +0000 (17:15 -0700)]
Merge branch 'master' of /linux/kernel/git/linville/wireless-next-2.6

15 years agonet: change proto destroy method to return void
Brian Haley [Sun, 15 Jun 2008 00:04:49 +0000 (17:04 -0700)]
net: change proto destroy method to return void

Change struct proto destroy function pointer to return void.  Noticed
by Al Viro.

Signed-off-by: Brian Haley <brian.haley@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agomac80211: eliminate IBSS warning in rate_lowest_index()
Vladimir Koutny [Fri, 13 Jun 2008 14:50:44 +0000 (16:50 +0200)]
mac80211: eliminate IBSS warning in rate_lowest_index()

In IBSS mode prior to join/creation of new IBSS it is possible that
a frame from unknown station is received and an ibss_add_sta() is
called. This will cause a warning in rate_lowest_index() since the
list of supported rates of our station is not initialized yet.

The fix is to add ibss stations with a rate we received that frame
at; this single-element set will be extended later based on beacon
data. Also there is no need to store stations from a foreign IBSS.

Signed-off-by: Vladimir Koutny <vlado@ksp.sk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: tkip.c use a local struct tkip_ctx in ieee80211_get_tkip_key
Harvey Harrison [Wed, 11 Jun 2008 21:22:02 +0000 (14:22 -0700)]
mac80211: tkip.c use a local struct tkip_ctx in ieee80211_get_tkip_key

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: tkip.c fold ieee80211_gen_rc4key into its one caller
Harvey Harrison [Wed, 11 Jun 2008 21:22:00 +0000 (14:22 -0700)]
mac80211: tkip.c fold ieee80211_gen_rc4key into its one caller

Also change the arguments of the phase1, 2 key mixing to take
a pointer to the encrytion key and the tkip_ctx in the same
order.

Do the dereference of the encryption key in the callers.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: tkip.c consolidate tkip IV writing in helper
Harvey Harrison [Wed, 11 Jun 2008 21:22:00 +0000 (14:22 -0700)]
mac80211: tkip.c consolidate tkip IV writing in helper

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: rx.c use new helpers
Harvey Harrison [Wed, 11 Jun 2008 21:21:59 +0000 (14:21 -0700)]
mac80211: rx.c use new helpers

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: wme.c use new helpers
Harvey Harrison [Wed, 11 Jun 2008 21:21:59 +0000 (14:21 -0700)]
mac80211: wme.c use new helpers

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: use new helpers in util.c - ieee80211_get_bssid()
Harvey Harrison [Wed, 11 Jun 2008 21:21:58 +0000 (14:21 -0700)]
mac80211: use new helpers in util.c - ieee80211_get_bssid()

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: wpa.c use new access helpers
Harvey Harrison [Wed, 11 Jun 2008 21:21:58 +0000 (14:21 -0700)]
mac80211: wpa.c use new access helpers

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: add utility function to get header length
Harvey Harrison [Wed, 11 Jun 2008 21:21:57 +0000 (14:21 -0700)]
mac80211: add utility function to get header length

Take a __le16 directly rather than a host-endian value.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: make ieee80211_get_hdrlen_from_skb return unsigned
Harvey Harrison [Wed, 11 Jun 2008 21:21:57 +0000 (14:21 -0700)]
mac80211: make ieee80211_get_hdrlen_from_skb return unsigned

Many callers already expect it to.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: remove ieee80211_get_morefrag
Harvey Harrison [Wed, 11 Jun 2008 21:21:56 +0000 (14:21 -0700)]
mac80211: remove ieee80211_get_morefrag

Replaced by the new helper ieee80211_has_morefrags which is
more consistent with the intent of the function.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: add helpers for frame control testing
Harvey Harrison [Wed, 11 Jun 2008 21:21:56 +0000 (14:21 -0700)]
mac80211: add helpers for frame control testing

A few general categories:

1) ieee80211_has_* tests if particular fctl bits are set, the helpers are de
in the same order as the fctl defines:

A combined _has_a4 was also added to test when both FROMDS and TODS are set.

2) ieee80211_is_* is meant to test whether the frame control is of a certain
ftype - data, mgmt, ctl, and two special helpers _is_data_qos, _is_data_pres
which also test a subset of the stype space.

When testing for a particular stype applicable only to one ftype, functions
like ieee80211_is_ack have been added.  Note that the ftype is also being
checked in these helpers.  They have been added for all mgmt and ctl stypes
in the same order as the STYPE defines.

3) ieee80211_get_* is meant to take a struct ieee80211_hdr * and returns a
pointer to somewhere in the struct, see get_SA, get_DA, get_qos_ctl.

The intel wireless drivers had helpers that used this namespace, convert the
all to use the new helpers and remove the byteshifting as they were defined
in cpu-order rather than little-endian.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211_hwsim: Shared TX code for received frames and Beacons
Jouni Malinen [Fri, 13 Jun 2008 16:44:48 +0000 (19:44 +0300)]
mac80211_hwsim: Shared TX code for received frames and Beacons

Use a shared function for transmitting the frames instead of
duplicated code in two places.

Signed-off-by: Jouni Malinen <j@w1.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211_hwsim: Minor cleanup
Jouni Malinen [Fri, 13 Jun 2008 16:44:47 +0000 (19:44 +0300)]
mac80211_hwsim: Minor cleanup

Remove unnecessary '__constant_' prefix and use the atomic version of
ieee80211_iterate_active_interfaces().

Signed-off-by: Jouni Malinen <j@w1.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211_hwsim: Clean up documentation
Jouni Malinen [Fri, 13 Jun 2008 16:44:46 +0000 (19:44 +0300)]
mac80211_hwsim: Clean up documentation

Clean up the introduction and fix a typo.

Signed-off-by: Jouni Malinen <j@w1.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211_hwsim: 802.11 radio simulator for mac80211
Jouni Malinen [Wed, 11 Jun 2008 07:42:31 +0000 (10:42 +0300)]
mac80211_hwsim: 802.11 radio simulator for mac80211

mac80211_hwsim is a Linux kernel module that can be used to simulate
arbitrary number of IEEE 802.11 radios for mac80211 on a single
device. It can be used to test most of the mac80211 functionality and
user space tools (e.g., hostapd and wpa_supplicant) in a way that
matches very closely with the normal case of using real WLAN
hardware. From the mac80211 view point, mac80211_hwsim is yet another
hardware driver, i.e., no changes to mac80211 are needed to use this
testing tool.

Signed-off-by: Jouni Malinen <j@w1.fi>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwlwifi: unify SW rf-kill flow
Emmanuel Grumbach [Fri, 13 Jun 2008 07:44:55 +0000 (15:44 +0800)]
iwlwifi: unify SW rf-kill flow

This patch unifies SW rf-kill flow between 4965 and 5000. It enables SW
RF-kill for 5000. This patch also solves a bug in iwl4965_mac_config:
bad mutex locking balance.

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>
15 years agoiwlwifi: remove 4965 prefix from iwl4965_ucode
Ron Rindjunsky [Fri, 13 Jun 2008 07:44:54 +0000 (15:44 +0800)]
iwlwifi: remove 4965 prefix from iwl4965_ucode

The patch removes 4965 prefix from iwl4965_ucode.

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@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>
15 years agoiwlwifi: adding channels to sysfs
Ester Kummer [Fri, 13 Jun 2008 07:44:53 +0000 (15:44 +0800)]
iwlwifi: adding channels to sysfs

This patch returns channel list to sysfs.

Signed-off-by: Ester Kummer <ester.kummer@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>
15 years agomac80211: fix beacon interval value
Tomas Winkler [Thu, 12 Jun 2008 19:38:37 +0000 (22:38 +0300)]
mac80211: fix beacon interval value

This patch fixes setting beacon interval

1. in register_hw it honors value requested by the driver
2. It uses default 100 instead of 1000 or 10000. Scanning for beacon
interval ~1sec and above is not sane

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agorndis_wlan: Use kernel-supplied ARRAY_SIZE() macro.
Robert P. J. Day [Thu, 12 Jun 2008 19:34:42 +0000 (15:34 -0400)]
rndis_wlan: Use kernel-supplied ARRAY_SIZE() macro.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agorndis_wlan: preallocate command buffer for set/get_oid
Jussi Kivilinna [Thu, 12 Jun 2008 17:19:19 +0000 (20:19 +0300)]
rndis_wlan: preallocate command buffer for set/get_oid

Reduce amount of kmalloc/kfree calls in set/get_oid by preallocating command
buffer.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agorndis_wlan: use kzalloc to allocate private data
Jussi Kivilinna [Thu, 12 Jun 2008 17:19:01 +0000 (20:19 +0300)]
rndis_wlan: use kzalloc to allocate private data

rndis_wlan used kmalloc to allocate private data structure and leaving data
uninitialized, but later assumed to be set zero.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: do not fragment while aggregation is in use
Ron Rindjunsky [Thu, 12 Jun 2008 12:42:29 +0000 (15:42 +0300)]
mac80211: do not fragment while aggregation is in use

This patch denies the use of framentation while ampdu is used.

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwlwifi: remove iwlcore_low_level_notify
Emmanuel Grumbach [Thu, 12 Jun 2008 01:47:19 +0000 (09:47 +0800)]
iwlwifi: remove iwlcore_low_level_notify

This patch removes the iwlcore_low_level_notify. The
notification chain is not required in this level.

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>
15 years agoiwlwifi: general code clean up
Emmanuel Grumbach [Thu, 12 Jun 2008 01:47:18 +0000 (09:47 +0800)]
iwlwifi: general code clean up

This patch cleans up iwlwifi's code: Add missing include, remove empty
lines etc...

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>
15 years agoiwlwifi: fix software rf_kill problem when interface is down
Zhu Yi [Thu, 12 Jun 2008 01:47:17 +0000 (09:47 +0800)]
iwlwifi: fix software rf_kill problem when interface is down

The patch fixes the problem that software rf_kill messes up the
card status when it is disabled if the interface is down.

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwlwifi: remove dead code iwl4965_calc_db_from_ratio
Emmanuel Grumbach [Thu, 12 Jun 2008 01:47:15 +0000 (09:47 +0800)]
iwlwifi: remove dead code iwl4965_calc_db_from_ratio

This patch removes iwl4965_calc_db_from_ratio which is dead code.

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>
15 years agoiwlwifi: retfactor get_temperature functions
Emmanuel Grumbach [Thu, 12 Jun 2008 01:47:14 +0000 (09:47 +0800)]
iwlwifi: retfactor get_temperature functions

This patch renames iwl4965_get_tempearture to iwl4965_hw_get_temperature
and replaces usage of original iwl4965_hw_get_temperature by
direct access to priv->temperature.

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>
15 years agoiwlwifi: move iwl4965_rf_kill_ct_config to iwl-core.c
Emmanuel Grumbach [Thu, 12 Jun 2008 01:47:13 +0000 (09:47 +0800)]
iwlwifi: move iwl4965_rf_kill_ct_config to iwl-core.c

This patch moves iwl4965_rf_kill_ct_config to iwl-core.c.

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>
15 years agoiwlwifi: cleans up scanning code
Tomas Winkler [Thu, 12 Jun 2008 01:47:12 +0000 (09:47 +0800)]
iwlwifi: cleans up scanning code

This patch
1. cleans up scanning code.
2. It adds round robin of TX antannas/chains.

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>
15 years agoiwlwifi: move rate helpers to iwlcore
Tomas Winkler [Thu, 12 Jun 2008 01:47:11 +0000 (09:47 +0800)]
iwlwifi: move rate helpers to iwlcore

This patch moves rate helpers to iwlcore.

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>
15 years agoiwlwifi: move scan to iwl-scan.c iwlcore
Tomas Winkler [Thu, 12 Jun 2008 01:47:10 +0000 (09:47 +0800)]
iwlwifi: move scan to iwl-scan.c iwlcore

This patch moves scan code to iwl-scan.c file in iwlcore module.

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>
15 years agoiwlwifi: add bad length check for WEP keys
Emmanuel Grumbach [Thu, 12 Jun 2008 01:47:09 +0000 (09:47 +0800)]
iwlwifi: add bad length check for WEP keys

This patch adds a check for bad length in set key flow. This solves the
Oops reported by Thomas Backlund, Joonwoo Park and Ian Schram.
It also adds some debug printing that can be useful.

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>
15 years agoiwlwifi: refactor setting tx power
Tomas Winkler [Thu, 12 Jun 2008 01:47:08 +0000 (09:47 +0800)]
iwlwifi: refactor setting tx power

This patch
1. Refactors settings of tx power
2. enables iwconfig txpower <value>
3. adds 5000 HW tx power

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>
15 years agoiwlwifi: refactor tx aggregation response flow
Tomas Winkler [Thu, 12 Jun 2008 01:47:07 +0000 (09:47 +0800)]
iwlwifi: refactor tx aggregation response flow

This patch refactors tx aggregation respnse flow
and fixes bug revealed by tx_info to cb patch

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwlwifi: Fix mode changes (ad-hoc <--> managed)
Assaf Krauss [Thu, 12 Jun 2008 01:47:06 +0000 (09:47 +0800)]
iwlwifi: Fix mode changes (ad-hoc <--> managed)

This fix allows to move between modes (ad-hoc to managed, and vice versa).
Since mode changes can only be done while driver is down, check for ibss
support can only be made when the channel is set (afte the driver goes up).

Signed-off-by: Assaf Krauss <assaf.krauss@intel.com>
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>
15 years agoiwlwifi enabling IBSS (Ad-Hoc) mode
Assaf Krauss [Thu, 12 Jun 2008 01:47:05 +0000 (09:47 +0800)]
iwlwifi enabling IBSS (Ad-Hoc) mode

This patch enables ibss mode. It consists of two changes upon entering ibss
mode:
1. Removing the redundant line which clears the driver's station table.
   This line creates a discrepancy between the driver and the FW's station
   table. This prevented the generation of beacons.
2. Assigning a default value to priv's assoc_id. Normally given by an AP in
   STA mode, this field is used as an indication for association. Being 0,
   it prevented normal TX flow.
3. Remove a redundant ADD_STA command that cause uCode error.
4. Delay the set_mode until after the uCode is ready.

Signed-off-by: Assaf Krauss <assaf.krauss@intel.com>
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>
15 years agoiwlwifi: fix resart flow after fw error
Emmanuel Grumbach [Thu, 12 Jun 2008 01:47:04 +0000 (09:47 +0800)]
iwlwifi: fix resart flow after fw error

Clear STATUS_FW_ERROR in the _up_ flow before reseting NIC.
UP flow will otherwise call restart again causing endless restart loop.

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>
15 years agoiwlwifi: fix resume SW RF-kill
Mohamed Abbas [Thu, 12 Jun 2008 01:47:03 +0000 (09:47 +0800)]
iwlwifi: fix resume SW RF-kill

This patch fixes SW RF-kill. If we resumed from S3 state with SW RF-kill
set, the driver wouldn't be able to remove SW RF-kill. This patch fixes
this.

Signed-off-by: Mohamed Abbas <mabbas@linux.intel.com>
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>
15 years agoiwlwifi: format log prints for easier parsing
Tomas Winkler [Thu, 12 Jun 2008 01:47:02 +0000 (09:47 +0800)]
iwlwifi: format log prints for easier parsing

This patch changes uCode log print to for easier parsing.

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>
15 years agoiwlwifi: fix bug when moving from 11gn to 11a or 11an to 11g
Emmanuel Grumbach [Thu, 12 Jun 2008 01:47:01 +0000 (09:47 +0800)]
iwlwifi: fix bug when moving from 11gn to 11a or 11an to 11g

It is wrong to set the rxon channel according to the ht-channel
in case there is a mismatch (e.g. when there is no ht).

Signed-off-by: Guy Cohen <guy.cohen@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>
15 years agoiwlwifi: remove redundant flags regarding to FAT channel
Emmanuel Grumbach [Thu, 12 Jun 2008 01:47:00 +0000 (09:47 +0800)]
iwlwifi: remove redundant flags regarding to FAT channel

This patch removes redundant flags regarding to FAT channel. Use
mac80211's flag instead.

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>
15 years agoiwlwifi: remove unused flag
Tomas Winkler [Thu, 12 Jun 2008 01:46:59 +0000 (09:46 +0800)]
iwlwifi: remove unused flag

This patch removes IEEE80211_CHAN_W_RADAR_DETECT flag.

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>
15 years agoiwlwifi: fix allow iwlwifi to aggregate according to tid load
Ron Rindjunsky [Thu, 12 Jun 2008 01:46:58 +0000 (09:46 +0800)]
iwlwifi: fix allow iwlwifi to aggregate according to tid load

This fix opens back the aggregation decision path for iwlwifi.

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@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>
15 years agoiwlwifi: use ieee80211_conf to examine rate capabilities
Ron Rindjunsky [Thu, 12 Jun 2008 01:46:57 +0000 (09:46 +0800)]
iwlwifi: use ieee80211_conf to examine rate capabilities

This patch switches the use of internal iwlwifi structure with
ieee80211_conf in order to examine ht rate capabilities.

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@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>
15 years agoiwlwifi: add TX aggregation code for 5000 HW
Tomas Winkler [Thu, 12 Jun 2008 01:46:56 +0000 (09:46 +0800)]
iwlwifi: add TX aggregation code for 5000 HW

This patch adds TX aggregation handler for 5000 HW.

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>
15 years agoiwlwifi: map sw and hw ampdu queues
Ron Rindjunsky [Thu, 12 Jun 2008 01:46:55 +0000 (09:46 +0800)]
iwlwifi: map sw and hw ampdu queues

This patch maps sw and hw queues (for aggregations), so the right
mac80211 queue will be waken when ieee80211_wake_queue is invoked.

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@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>
15 years agoiwlwifi: add possibility to disable tx_power calibration
Emmanuel Grumbach [Thu, 12 Jun 2008 01:46:54 +0000 (09:46 +0800)]
iwlwifi: add possibility to disable tx_power calibration

This patch adds the possibility to disable the tx_power calibration.
In 5000 HW, this calibration is implemented in uCode, hence, it is
disabled in driver by default.

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>
15 years agoiwlwifi: clean up in setup/cancel deferred work
Emmanuel Grumbach [Thu, 12 Jun 2008 01:46:53 +0000 (09:46 +0800)]
iwlwifi: clean up in setup/cancel deferred work

This patch makes some clean up in setup/cancel_deferred_work.
iwl_setup_deferred_work does the work that is common to 4965
and 5000, then it calls to HW specific handlers.

This patch also removes uneeded work_struct from iwl_priv.

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>
15 years agoiwlwifi: removes the RUN_TIME_CALIB ifdef
Emmanuel Grumbach [Thu, 12 Jun 2008 01:46:52 +0000 (09:46 +0800)]
iwlwifi: removes the RUN_TIME_CALIB ifdef

This patch removes the possibility not to compile the run time
calibrations. It also renames priv->sensitivity_work to
priv->run_time_calib_work, and moves bg_run_time_calib to iwl4965_base
since it is common to both: 4965 and 5000.

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>
15 years agolibertas: rename some registers to clarify their meaning
Holger Schurig [Thu, 5 Jun 2008 11:09:50 +0000 (13:09 +0200)]
libertas: rename some registers to clarify their meaning

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agolibertas: check for old, unsupported hardware
Holger Schurig [Thu, 5 Jun 2008 11:08:35 +0000 (13:08 +0200)]
libertas: check for old, unsupported hardware

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agolibertas: document register meanings
Holger Schurig [Thu, 5 Jun 2008 11:07:04 +0000 (13:07 +0200)]
libertas: document register meanings

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agolibertas: fix interrupt issue
Holger Schurig [Thu, 5 Jun 2008 11:06:15 +0000 (13:06 +0200)]
libertas: fix interrupt issue

This helps against lost interrupts and aids in debugging this.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: implement EU regulatory domain
Tony Vroon [Wed, 11 Jun 2008 20:23:56 +0000 (16:23 -0400)]
mac80211: implement EU regulatory domain

Implement missing EU regulatory domain for mac80211. Based on the
information in IEEE 802.11-2007 (specifically pages 1142, 1143 & 1148)
and ETSI 301 893 (V1.4.1).
With thanks to Johannes Berg.

Signed-off-by: Tony Vroon <tony@linx.net>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agonl80211: Fix comment merge error
Michael Buesch [Tue, 10 Jun 2008 12:04:14 +0000 (14:04 +0200)]
nl80211: Fix comment merge error

The comments ended up in the wrong place due to a merge error.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwlwifi: removing IWL4965_HT config
Ron Rindjunsky [Mon, 9 Jun 2008 19:54:35 +0000 (22:54 +0300)]
iwlwifi: removing IWL4965_HT config

This patch removes CONFIG_IWL4965_HT #ifdefs for iwl 4965 and 5000. 11n
feature is stable in those drivers and its mode of operation is determined
in mac80211, so this dependency is not needed any more.

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agorndis_wlan: cleanup: rename and remove local pointers
Jussi Kivilinna [Mon, 2 Jun 2008 15:35:44 +0000 (18:35 +0300)]
rndis_wlan: cleanup: rename and remove local pointers

Mixed use of 'dev' and 'usbdev' for usbnet pointer can be confusing. So changing all 'usbnet *dev' to 'usbnet *usbdev'.

Also remove 'net_device *net' pointer from 'rndis_wext_bind' as 'usbdev->net' were already used where needed.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agorndis_wlan: check if set_multicast_list work is already scheduled
Jussi Kivilinna [Mon, 2 Jun 2008 15:35:36 +0000 (18:35 +0300)]
rndis_wlan: check if set_multicast_list work is already scheduled

Don't queue set_multicast_list work if WORK_SET_MULTICAST_LIST
flag already set.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agorndis_wlan: update carrier flag when link state changes
Jussi Kivilinna [Mon, 2 Jun 2008 15:35:29 +0000 (18:35 +0300)]
rndis_wlan: update carrier flag when link state changes

Driver wasn't updating netif_carrier on link state changes but assumed
link layer was always up.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agorndis_wlan: do link-down state change in worker thread
Jussi Kivilinna [Mon, 2 Jun 2008 15:35:21 +0000 (18:35 +0300)]
rndis_wlan: do link-down state change in worker thread

rndis_wext_link_change() is called from within rndis_command() so it
isn't very good place to do any work. Move to worker thread.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoairo: use simple_read_from_buffer()
Akinobu Mita [Mon, 9 Jun 2008 23:44:30 +0000 (16:44 -0700)]
airo: use simple_read_from_buffer()

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Dan Williams <dcbw@redhat.com>
Cc: Michal Schmidt <mschmidt@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agort2x00: Rework alignment check.
Gertjan van Wingerde [Sat, 7 Jun 2008 14:57:09 +0000 (16:57 +0200)]
rt2x00: Rework alignment check.

Rework the alignment check in rt2x00dev.c to be independent of any
potential alignment measures that may be taken before. Just check
whether the payload is aligned based on the pointer addresses.

Note: This is preparatory for the dynamically mapped skb buffers
for the PCI drivers, as these need 4-byte alignment instead of the
currently enforced offset by 2 bytes.

Signed-off-by: Gertjan van Wingerde <gwingerde@kpnplanet.nl>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agort2x00: Remove unused defines
Ivo van Doorn [Sat, 7 Jun 2008 14:54:12 +0000 (16:54 +0200)]
rt2x00: Remove unused defines

MAX_RX_SSI and MAX_NOISE are no longer used,
it is better to remove them entirely.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agort2x00: Clear IEEE80211_TX_CTL_USE_RTS_CTS flag for RTS frame
Ivo van Doorn [Sat, 7 Jun 2008 10:29:05 +0000 (12:29 +0200)]
rt2x00: Clear IEEE80211_TX_CTL_USE_RTS_CTS flag for RTS frame

For RTS/CTS-to-self frames the IEEE80211_TX_CTL_USE_RTS_CTS flag
should be cleared for the tx_info flags.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agort2x00: Use __builtin_choose_expr() instead of ?:
Ivo van Doorn [Fri, 6 Jun 2008 20:58:29 +0000 (22:58 +0200)]
rt2x00: Use __builtin_choose_expr() instead of ?:

To really force the FIELD macros to determine
the first bit of the register field we should
use the __builtin_choose_expr() function.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agort2x00: Fix double usage of skb->cb in USB RX path.
Gertjan van Wingerde [Fri, 6 Jun 2008 20:54:28 +0000 (22:54 +0200)]
rt2x00: Fix double usage of skb->cb in USB RX path.

It is not safe to use the skb->cb area for both the rxd and
skb_frame_desc data at the same time, while they occupy an overlapping
piece of memory. This can lead to hard to trace crashes as pointers
within skb_frame_desc are pointing into nowhere, or the rxd data is
overwritten with non-sense.

Fix it by copying the rxd to a small buffer on the stack.

Signed-off-by: Gertjan van Wingerde <gwingerde@kpnplanet.nl>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>