]> Git Repo - linux.git/log
linux.git
14 years agostarfire: use BUILD_BUG_ON for netdrv_addr_t
Akinobu Mita [Fri, 27 Aug 2010 19:08:45 +0000 (19:08 +0000)]
starfire: use BUILD_BUG_ON for netdrv_addr_t

Detect size mismatch for netdrv_addr_t at build time rather than
checking at module load time.

Signed-off-by: Akinobu Mita <[email protected]>
Cc: Ion Badulescu <[email protected]>
Cc: "David S. Miller" <[email protected]>
Cc: [email protected]
Signed-off-by: David S. Miller <[email protected]>
14 years agostarfire: use PCI_VDEVICE
Akinobu Mita [Fri, 27 Aug 2010 19:08:36 +0000 (19:08 +0000)]
starfire: use PCI_VDEVICE

Signed-off-by: Akinobu Mita <[email protected]>
Cc: Ion Badulescu <[email protected]>
Cc: "David S. Miller" <[email protected]>
Cc: [email protected]
Signed-off-by: David S. Miller <[email protected]>
14 years agophonet: use for_each_set_bit
Akinobu Mita [Fri, 27 Aug 2010 19:08:26 +0000 (19:08 +0000)]
phonet: use for_each_set_bit

Replace open-coded loop with for_each_set_bit().

Signed-off-by: Akinobu Mita <[email protected]>
Cc: "David S. Miller" <[email protected]>
Cc: [email protected]
Signed-off-by: David S. Miller <[email protected]>
14 years agomlx4: use bitmap library
Akinobu Mita [Fri, 27 Aug 2010 19:08:13 +0000 (19:08 +0000)]
mlx4: use bitmap library

Replace loops calling set_bit() and clear_bit() with bitmap_set() and
bitmap_clear().

Unlike loops calling set_bit() and clear_bit(), bitmap_set() and
bitmap_clear() are not atomic. But this is ok.
Because the bitmap operations are protected by bitmap->lock
except for initialization of the bitmap in mlx4_bitmap_init().

Signed-off-by: Akinobu Mita <[email protected]>
Cc: Roland Dreier <[email protected]>
Cc: [email protected]
Cc: "David S. Miller" <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
14 years agoeconet: kill unnecessary spin_lock_init()
Akinobu Mita [Fri, 27 Aug 2010 16:41:56 +0000 (16:41 +0000)]
econet: kill unnecessary spin_lock_init()

The spinlock aun_queue_lock is initialized statically. It is unnecessary
to initialize by spin_lock_init() at module load time.

This is detected by the semantic patch.

// <smpl>
@def@
declarer name DEFINE_SPINLOCK;
identifier spinlock;
@@

DEFINE_SPINLOCK(spinlock);

@@
identifier def.spinlock;
@@

- spin_lock_init(&spinlock);
// </smpl>

Signed-off-by: Akinobu Mita <[email protected]>
Cc: Julia Lawall <[email protected]>
Cc: "David S. Miller" <[email protected]>
Cc: [email protected]
Signed-off-by: David S. Miller <[email protected]>
14 years agoslip: Use net_device_stats from struct net_device
Tobias Klauser [Thu, 26 Aug 2010 22:12:08 +0000 (22:12 +0000)]
slip: Use net_device_stats from struct net_device

Use net_device->stats for stats instead of private variable copies in
struct slip. Use ndo_get_stat64 so the additions can be performed on a private
destination buffer.

Cc: Eric Dumazet <[email protected]>
Signed-off-by: Tobias Klauser <[email protected]>
Acked-by: Eric Dumazet <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
14 years agomac80211: fix offchannel queue stop
Johannes Berg [Fri, 27 Aug 2010 11:45:28 +0000 (13:45 +0200)]
mac80211: fix offchannel queue stop

Somebody noticed this problem, and I outlined
to them how to fix it, but haven't heard back
from them. So while I was adding the state
field I figured I could use it to fix it.

The problem, as I understand it, is that when
we go offchannel while the driver has a queue
stopped, the driver will likely start draining
the queue and then enable it while offchannel.
This in turn will enable the interface queue,
and that leads to transmitting data frames on
the wrong channel.

Fix this by keeping track of offchannel status
per interface, and not enabling the interface
queues on interfaces that are offchannel when
the driver enables a queue.

Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
14 years agomac80211_hwsim: support runtime iftype changes
Johannes Berg [Fri, 27 Aug 2010 10:35:59 +0000 (12:35 +0200)]
mac80211_hwsim: support runtime iftype changes

Add the trivial support for runtime interface
type changes to mac80211_hwsim for testing.

Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
14 years agomac80211: support runtime interface type changes
Johannes Berg [Fri, 27 Aug 2010 10:35:58 +0000 (12:35 +0200)]
mac80211: support runtime interface type changes

Add support to mac80211 for changing the interface
type even when the interface is UP, if the driver
supports it.

To achieve this
 * add a new driver callback for switching,
 * split some of the interface up/down code out
   into new functions (do_open/do_stop), and
 * maintain an own __SDATA_RUNNING bit that will
   not be set during interface type, so that any
   other code doesn't use the interface.

Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
14 years agomac80211: split out concurrent vif checks
Johannes Berg [Fri, 27 Aug 2010 10:35:57 +0000 (12:35 +0200)]
mac80211: split out concurrent vif checks

Split the concurrent virtual interface checks
into a new function that can be used to check
for any given new interface type.

Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
14 years agomac80211: simplify zero address checks
Johannes Berg [Fri, 27 Aug 2010 10:35:56 +0000 (12:35 +0200)]
mac80211: simplify zero address checks

The libertas_tf special code for zero addresses
is a bit too complex, it compares against a stack
value instead of using is_zero_ether_addr() and
tries to update all interfaces even if just the
one that's being brought up needs to be changed.
Additionally, the repeated check for a valid MAC
address need only be done if we actually changed
it on the fly.

Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
14 years agomac80211: switch to ieee80211_sdata_running
Johannes Berg [Fri, 27 Aug 2010 10:35:55 +0000 (12:35 +0200)]
mac80211: switch to ieee80211_sdata_running

Since the introduction of ieee80211_sdata_running(),
some new code was introduced that uses netif_running()
instead. Switch all these instances over.

Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
14 years agomac80211: clean up ifdown/cleanup paths
Johannes Berg [Fri, 27 Aug 2010 10:35:54 +0000 (12:35 +0200)]
mac80211: clean up ifdown/cleanup paths

There's a lot of redundant code in mac80211's
interface cleanup/down, for example freeing
AP beacons is done both when the interface is
set DOWN as well as when it is torn down, of
which only the former has any effect.

Also, a bunch of things should be closer to
where they matter, like the MLME timers that
we should cancel when disassociating, rather
than only when the interface is set DOWN.

Clean up all this code.

Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
14 years agomac80211: use subqueue helpers
Johannes Berg [Fri, 27 Aug 2010 11:36:49 +0000 (13:36 +0200)]
mac80211: use subqueue helpers

There are subqueue helpers so that we don't
need to get the TX queue and then wake/stop
it, use those helpers.

Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
14 years agomac80211: allow changing port control protocol
Johannes Berg [Fri, 27 Aug 2010 11:26:54 +0000 (14:26 +0300)]
mac80211: allow changing port control protocol

Some vendor specified mechanisms for 802.1X-style
functionality use a different protocol than EAP
(even if EAP is vendor-extensible). Support this
in mac80211 via the cfg80211 API for it.

Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Juuso Oikarinen <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
14 years agocfg80211: allow changing port control protocol
Johannes Berg [Fri, 27 Aug 2010 11:26:53 +0000 (14:26 +0300)]
cfg80211: allow changing port control protocol

Some vendor specified mechanisms for 802.1X-style
functionality use a different protocol than EAP
(even if EAP is vendor-extensible). Allow setting
the ethertype for the protocol when a driver has
support for this. The default if unspecified is
EAP, of course.

Note: This is suitable only for station mode, not
      for AP implementation.

Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Juuso Oikarinen <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
14 years agomac80211: allow vendor specific cipher suites
Johannes Berg [Fri, 27 Aug 2010 11:26:52 +0000 (14:26 +0300)]
mac80211: allow vendor specific cipher suites

Allow drivers to specify their own set of cipher
suites to advertise vendor-specific ciphers. The
driver is then required to implement hardware
crypto offload for it.

Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Juuso Oikarinen <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
14 years agocfg80211: allow vendor specific cipher suites
Johannes Berg [Fri, 27 Aug 2010 11:26:51 +0000 (14:26 +0300)]
cfg80211: allow vendor specific cipher suites

cfg80211 currently rejects all cipher suites it
doesn't know about for key length checking
purposes. This can lead to inconsistencies when
a driver advertises an algorithm that cfg80211
doesn't know about. Remove this rejection so
drivers can specify any algorithm they like.

Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Juuso Oikarinen <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
14 years agocfg80211 docbook: remove erronous !A
Johannes Berg [Fri, 27 Aug 2010 09:29:24 +0000 (11:29 +0200)]
cfg80211 docbook: remove erronous !A

My previous patch erroneously included an
!A line (for some checking I am working on)
that isn't yet supported by the docbook
tools, so remove it.

Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
14 years agoath9k_htc: Enable ANI in associated state only
Rajkumar Manoharan [Fri, 27 Aug 2010 06:39:00 +0000 (12:09 +0530)]
ath9k_htc: Enable ANI in associated state only

While scanning, ANI is triggered unnecessarily where sta is in
unassociated state. And cancelling ani work in ath9k_htc_stop
is not required.

Signed-off-by: Rajkumar Manoharan <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
14 years agowl12xx: remove unneeded locking
Johannes Berg [Thu, 26 Aug 2010 11:30:27 +0000 (13:30 +0200)]
wl12xx: remove unneeded locking

With the scan callback now being callable from
any context, these unlocks/locks can go away.
This makes the code easier to understand, since
callers of these functions must no longer be
aware that the mutex may be dropped.

As Stanislaw is working on iwlwifi scanning, I
didn't change it to take advantage of the new
mac80211 semantics.

Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
14 years agomac80211: allow scan to complete from any context
Johannes Berg [Thu, 26 Aug 2010 11:30:26 +0000 (13:30 +0200)]
mac80211: allow scan to complete from any context

The ieee80211_scan_completed() function was a frequent
source of potential deadlocks, since it is called by
drivers but may call back into drivers, so drivers had
to make sure to call it without any locks held, which
frequently lead to more complex code in drivers. Avoid
that problem by allowing the function to be called in
any context, and queueing the actual work it does.
Also update the documentation for it to indicate this.

Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
14 years agomac80211: remove unused scan expire define
Johannes Berg [Thu, 26 Aug 2010 11:30:25 +0000 (13:30 +0200)]
mac80211: remove unused scan expire define

Since cfg80211 manages the BSS list completely,
this define hasn't been used for a long time
and will never be used again.

Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
14 years agoath9k: Change the default LED pattern.
Vivek Natarajan [Wed, 25 Aug 2010 14:04:52 +0000 (19:34 +0530)]
ath9k: Change the default LED pattern.

All major Atheros customers require the led to be in continuous
ON state rather than the blinking pattern.

Signed-off-by: Vivek Natarajan <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
14 years agoath5k: fix off-by-one in pilot magnitude mask
Bob Copeland [Wed, 25 Aug 2010 01:37:14 +0000 (21:37 -0400)]
ath5k: fix off-by-one in pilot magnitude mask

If the symbol offset is 46, it will be counted in both
the third and fourth bytes of the mask, and in this
case the shift will be negative which can pollute
high order bits in the mask.  This may negatively impact
OFDM symbol detection.

Signed-off-by: Bob Copeland <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
14 years agoath5k: re-order one of the frees on unwind
Dan Carpenter [Sat, 21 Aug 2010 19:24:59 +0000 (21:24 +0200)]
ath5k: re-order one of the frees on unwind

There was a small misordering here.  In the original code, if we were to
go to err_free_ah then it wouldn't free the irq.

Signed-off-by: Dan Carpenter <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
14 years agoiwlwifi: allow using multiple contexts
Johannes Berg [Mon, 23 Aug 2010 08:46:58 +0000 (10:46 +0200)]
iwlwifi: allow using multiple contexts

We're now ready to start using multiple contexts.
We do this by keeping track of the valid interface
types per context (exclusive [ibss] and normal)
and checking which context is "free" when a new
interface is added.

Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Wey-Yi Guy <[email protected]>
14 years agoiwlwifi: follow main beacon interval
Johannes Berg [Mon, 23 Aug 2010 08:46:57 +0000 (10:46 +0200)]
iwlwifi: follow main beacon interval

It is necessary that the PAN context always
use the same beacon interval as the BSS
context unless it is in dual-station mode,
ie. the PAN context is a station as well,
so implement that.

Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Wey-Yi Guy <[email protected]>
14 years agoiwlagn: always send RXON timing
Johannes Berg [Mon, 23 Aug 2010 08:46:56 +0000 (10:46 +0200)]
iwlagn: always send RXON timing

The PAN context requires also getting
RXON timing when we send an unassociated
RXON in some cases.

Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Wey-Yi Guy <[email protected]>
14 years agoiwlwifi: pass context to iwl_send_rxon_timing
Johannes Berg [Mon, 23 Aug 2010 08:46:55 +0000 (10:46 +0200)]
iwlwifi: pass context to iwl_send_rxon_timing

Sometimes we need to send RXON timing even
when we don't have a virtual interface yet,
so pass the context and allow passing one
without a virtual interface pointer.

Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Wey-Yi Guy <[email protected]>
14 years agoiwlwifi: send PAN parameters
Johannes Berg [Fri, 27 Aug 2010 16:44:50 +0000 (09:44 -0700)]
iwlwifi: send PAN parameters

In order for the microcode to be able to handle
multiple interfaces, we need to give it the PAN
parameters that state how to allocate the time
between the two interfaces. Do this, and update
it wherever necessary.

Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Wey-Yi Guy <[email protected]>
14 years agoiwlagn: send beacon before committing associated RXON
Johannes Berg [Mon, 23 Aug 2010 08:46:53 +0000 (10:46 +0200)]
iwlagn: send beacon before committing associated RXON

Newer AGN microcode requires know the beacon
before starting the AP so that it can start
beaconing right away. Implement that.

Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Wey-Yi Guy <[email protected]>
14 years agoiwlagn: send RXON timing before associating
Johannes Berg [Mon, 23 Aug 2010 08:46:52 +0000 (10:46 +0200)]
iwlagn: send RXON timing before associating

The PAN functionality requires us to send the
timing including a valid DTIM period to the
microcode before associating, so request this
data from mac80211 and send it to the device.

Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Wey-Yi Guy <[email protected]>
14 years agoiwlagn: queue frames according to context
Johannes Berg [Mon, 23 Aug 2010 08:46:51 +0000 (10:46 +0200)]
iwlagn: queue frames according to context

Frames for different contexts need to be put
on different queues, and multicast after DTIM
frames have a special queue yet which also
depends on the context, so put all this into
the context.

Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Wey-Yi Guy <[email protected]>
14 years agoiwlagn: remove iw_mode check for beacon
Johannes Berg [Mon, 23 Aug 2010 08:46:50 +0000 (10:46 +0200)]
iwlagn: remove iw_mode check for beacon

Since we have the beacon context now, we no
longer need to rely on iw_mode but can check
the beacon context interface's type. However,
that check must be in the work item instead
due to locking constraints (mutex must be
held when dereferencing beacon_ctx pointer).

Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Wey-Yi Guy <[email protected]>
14 years agoiwlagn: detect PAN capability
Johannes Berg [Mon, 23 Aug 2010 08:46:49 +0000 (10:46 +0200)]
iwlagn: detect PAN capability

Detect whether or not the ucode is PAN
capable and adjust the valid contexts
accordingly. To be able to do this, add
the PAN context to the array as well.

Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Wey-Yi Guy <[email protected]>
14 years agoiwlwifi: add PAN API
Johannes Berg [Mon, 23 Aug 2010 08:46:48 +0000 (10:46 +0200)]
iwlwifi: add PAN API

Define the new host commands and notifications
REPLY_WIPAN_PARAMS
REPLY_WIPAN_RXON
REPLY_WIPAN_RXON_TIMING
REPLY_WIPAN_RXON_ASSOC
REPLY_WIPAN_QOS_PARAM
REPLY_WIPAN_WEPKEY
REPLY_WIPAN_P2P_CHANNEL_SWITCH
REPLY_WIPAN_NOA_NOTIFICATION

and their corresponding structures along with the PAN
station flag, the PAN AP sta ID and new dev types for
the second context.

Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Wey-Yi Guy <[email protected]>
14 years agoiwlwifi: introduce beacon context
Johannes Berg [Mon, 23 Aug 2010 08:46:47 +0000 (10:46 +0200)]
iwlwifi: introduce beacon context

Only one context can be beaconing at a time,
but we need to track which one. Introduce a
new variable priv->beacon_ctx to do that.

Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Wey-Yi Guy <[email protected]>
14 years agoiwlwifi: move HT configuration data into context
Johannes Berg [Mon, 23 Aug 2010 08:46:46 +0000 (10:46 +0200)]
iwlwifi: move HT configuration data into context

A lot of HT configuration semantically belongs into
the context, even if right now it will never be
different between contexts. Move it so we're better
prepared for future changes in mac80211.

Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Wey-Yi Guy <[email protected]>
14 years agoiwlwifi: add context pointer to station
Johannes Berg [Mon, 23 Aug 2010 08:46:45 +0000 (10:46 +0200)]
iwlwifi: add context pointer to station

Sometimes we only pass around station
pointers but need to find the context
they belong to, so store it in there.

Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Wey-Yi Guy <[email protected]>
14 years agoiwlwifi: store default station flags in context
Johannes Berg [Mon, 23 Aug 2010 08:46:44 +0000 (10:46 +0200)]
iwlwifi: store default station flags in context

Since the default context is initialised to zero,
and the default flags are zero, no more code is
needed to initialise them right now, but another
context can have different default flags.

Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Wey-Yi Guy <[email protected]>
14 years agoiwlwifi: make hw crypto context aware
Johannes Berg [Mon, 23 Aug 2010 08:46:43 +0000 (10:46 +0200)]
iwlwifi: make hw crypto context aware

HW crypto needs to be aware of the context, and there
are different command IDs for the WEP keys per context,
so move the key tracking variables and command IDs into
the context structure.

Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Wey-Yi Guy <[email protected]>
14 years agoiwlwifi: move AP sta ID to context
Johannes Berg [Mon, 23 Aug 2010 08:46:42 +0000 (10:46 +0200)]
iwlwifi: move AP sta ID to context

Each context needs to use a different AP sta
ID, so we need to move that into the context
struct instead of hardcoding it.

Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Wey-Yi Guy <[email protected]>
14 years agoiwlwifi: clamp scanning dwell time to all contexts
Johannes Berg [Mon, 23 Aug 2010 08:46:41 +0000 (10:46 +0200)]
iwlwifi: clamp scanning dwell time to all contexts

The dwell time should at least fit into all
context's beacon intervals.

Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Wey-Yi Guy <[email protected]>
14 years agoiwlwifi: move virtual interface pointer into context
Johannes Berg [Mon, 23 Aug 2010 08:46:40 +0000 (10:46 +0200)]
iwlwifi: move virtual interface pointer into context

iwlwifi occasionally needs to find the virtual
interface pointer to give it to mac80211, but right
now it only keeps one. Move it into the context so
that we can keep one pointer each.

Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Wey-Yi Guy <[email protected]>
14 years agoiwlwifi: add context into tx descriptor
Johannes Berg [Mon, 23 Aug 2010 08:46:39 +0000 (10:46 +0200)]
iwlwifi: add context into tx descriptor

In status processing we'll need to find the context
for a given frame, so add a context pointer to the
TX info for each frame.

Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Wey-Yi Guy <[email protected]>
14 years agoiwlwifi: move QoS into context
Johannes Berg [Mon, 23 Aug 2010 08:46:38 +0000 (10:46 +0200)]
iwlwifi: move QoS into context

Since mac80211 doesn't currently enable/disable
QoS per interface, we can't yet do it properly,
but we can already prepare for it and move the
QoS data and command ID into the context struct.

Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Wey-Yi Guy <[email protected]>
14 years agoiwlwifi: contextify command sending
Johannes Berg [Mon, 23 Aug 2010 08:46:37 +0000 (10:46 +0200)]
iwlwifi: contextify command sending

Some commands will have different command IDs
for different contexts, so we need to store
those IDs in the context structure and use
them instead of hardcoding the commands.

Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Wey-Yi Guy <[email protected]>
14 years agoiwlwifi: contextify-stations-completely
Johannes Berg [Fri, 27 Aug 2010 15:55:52 +0000 (08:55 -0700)]
iwlwifi: contextify-stations-completely

The microcode tracks stations per context, so
the driver needs to do that as well for adding,
deleting and restoring them, especially in the
implicit removal case when we send an RXON.

Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Wey-Yi Guy <[email protected]>
14 years agoiwlwifi: contextify broadcast station
Johannes Berg [Fri, 27 Aug 2010 15:53:46 +0000 (08:53 -0700)]
iwlwifi: contextify broadcast station

The broadcast station ID is per context, so
add a variable for the ID in the context and
use it everywhere we previously hardcoded it.

Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Wey-Yi Guy <[email protected]>
14 years agoiwlwifi: define PAN queues/FIFOs
Johannes Berg [Mon, 23 Aug 2010 08:46:34 +0000 (10:46 +0200)]
iwlwifi: define PAN queues/FIFOs

PAN capable microcode has a different
queue assignment (not just more queues
for PAN) due to the way multicast is
handled for AP mode.

Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Wey-Yi Guy <[email protected]>
14 years agoiwlwifi: prepare for PAN queue/fifo assignment
Johannes Berg [Mon, 23 Aug 2010 08:46:33 +0000 (10:46 +0200)]
iwlwifi: prepare for PAN queue/fifo assignment

PAN ucode will require a different queue assignment,
in particular queue 9 instead of 4 should be used for
commands.

This is required because the ucode will stop/start
queues 4 and 8 depending on the PAN state, since
queue 8 will be used for PAN multicast (after DTIM).

Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Wey-Yi Guy <[email protected]>
14 years agoiwlwifi: initial contextification
Johannes Berg [Mon, 23 Aug 2010 08:46:32 +0000 (10:46 +0200)]
iwlwifi: initial contextification

In order to support multiple interfaces, we must move
a lot of data into per-context structures so we can
use the contexts the device offers. To start with,
this makes a lot of code context-aware, more changes
will move more things into the context structure.

Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Wey-Yi Guy <[email protected]>
14 years agobnx2x: fix wrong return from bnx2x_trylock_hw_lock
Eric Dumazet [Fri, 27 Aug 2010 05:03:53 +0000 (22:03 -0700)]
bnx2x: fix wrong return from bnx2x_trylock_hw_lock

bnx2x_trylock_hw_lock() returns a bool :

true if succeeded to acquire the lock.
false in case of error.

-EINVAL is not an acceptable value, since its promoted to true.

Signed-off-by: Eric Dumazet <[email protected]>
Acked-by: Eilon Greenstein <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
14 years agogro: __napi_gro_receive() optimizations
Eric Dumazet [Fri, 27 Aug 2010 05:03:08 +0000 (22:03 -0700)]
gro: __napi_gro_receive() optimizations

compare_ether_header() can have a special implementation on 64 bit
arches if CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS is defined.

__napi_gro_receive() and vlan_gro_common() can avoid a conditional
branch to perform device match.

On x86_64, __napi_gro_receive() has now 38 instructions instead of 53

As gcc-4.4.3 still choose to not inline it, add inline keyword to this
performance critical function.

Signed-off-by: Eric Dumazet <[email protected]>
CC: Herbert Xu <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
14 years agostmmac: Make time functionality depend upon RTC_HCTOSYS_DEVICE
David S. Miller [Fri, 27 Aug 2010 03:32:02 +0000 (20:32 -0700)]
stmmac: Make time functionality depend upon RTC_HCTOSYS_DEVICE

Based upon a report by Stephen Rothwell.

Signed-off-by: David S. Miller <[email protected]>
14 years agoqlcnic: PCI ID addition
Sritej Velaga [Thu, 26 Aug 2010 14:03:05 +0000 (14:03 +0000)]
qlcnic: PCI ID addition

Added PCI ID to board info.

Signed-off-by: Sritej Velaga <[email protected]>
Signed-off-by: Anirban Chakraborty <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
14 years agoqlcnic: Fix driver load issue in FW hang
Anirban Chakraborty [Thu, 26 Aug 2010 14:02:52 +0000 (14:02 +0000)]
qlcnic: Fix driver load issue in FW hang

If there is a FW hang when the driver loads, it can not determine the FW operational
mode. Fix it by checking the FW state first before issuing any FW commands to
determine its capabilities and thereby detecting driver operational mode.

Signed-off-by: Anirban Chakraborty <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
14 years agoqlcnic: Fix missing error codes
Sony Chacko [Thu, 26 Aug 2010 14:02:41 +0000 (14:02 +0000)]
qlcnic: Fix missing error codes

In the original code, the error codes returned from some of the functions
are not caught and sent up the caller chain. Fixed it here.

Signed-off-by: Sony Chacko <[email protected]>
Signed-off-by: Anirban Chakraborty <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
14 years agonet: use scnprintf() to avoid potential buffer overflow
Changli Gao [Tue, 24 Aug 2010 13:32:58 +0000 (13:32 +0000)]
net: use scnprintf() to avoid potential buffer overflow

strlcpy() returns the total length of the string they tried to create, so
we should not use its return value without any check. scnprintf() returns
the number of characters written into @buf not including the trailing '\0',
so use it instead here.

Signed-off-by: Changli Gao <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
14 years agonet/sctp: Use pr_fmt and pr_<level>
Joe Perches [Tue, 24 Aug 2010 13:21:08 +0000 (13:21 +0000)]
net/sctp: Use pr_fmt and pr_<level>

Change SCTP_DEBUG_PRINTK and SCTP_DEBUG_PRINTK_IPADDR to
use do { print } while (0) guards.
Add SCTP_DEBUG_PRINTK_CONT to fix errors in log when
lines were continued.
Add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
Add a missing newline in "Failed bind hash alloc"

Signed-off-by: Joe Perches <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
14 years agoipvs: switch to GFP_KERNEL allocations
Simon Horman [Thu, 26 Aug 2010 02:54:31 +0000 (02:54 +0000)]
ipvs: switch to GFP_KERNEL allocations

Switch from GFP_ATOMIC allocations to GFP_KERNEL ones in
ip_vs_add_service() and ip_vs_new_dest(), as we hold a mutex and are
allowed to sleep in this context.

Signed-off-by: Eric Dumazet <[email protected]>
Signed-off-by: Simon Horman <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
14 years agoIPVS: convert __ip_vs_securetcp_lock to a spinlock
Simon Horman [Thu, 26 Aug 2010 02:54:30 +0000 (02:54 +0000)]
IPVS: convert __ip_vs_securetcp_lock to a spinlock

Also rename __ip_vs_securetcp_lock to ip_vs_securetcp_lock.

Spinlock conversion was suggested by Eric Dumazet.

Acked-by: Eric Dumazet <[email protected]>
Signed-off-by: Simon Horman <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
14 years agoIPVS: convert __ip_vs_sched_lock to a spinlock
Simon Horman [Thu, 26 Aug 2010 02:54:29 +0000 (02:54 +0000)]
IPVS: convert __ip_vs_sched_lock to a spinlock

Also rename __ip_vs_sched_lock to ip_vs_sched_lock.

Acked-by: Eric Dumazet <[email protected]>
Signed-off-by: Simon Horman <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
14 years agoIPVS: ICMPv6 checksum calculation
Simon Horman [Thu, 26 Aug 2010 20:21:26 +0000 (13:21 -0700)]
IPVS: ICMPv6 checksum calculation

Cc: Xiaoyu Du <[email protected]>
Signed-off-by: Julian Anastasov <[email protected]>
Signed-off-by: Simon Horman <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
14 years agobna: Fixed build break for allyesconfig
Rasesh Mody [Thu, 26 Aug 2010 06:00:27 +0000 (23:00 -0700)]
bna: Fixed build break for allyesconfig

This is the patch to fix the build break caused by multiple
definitions of symbols between Brocade's FC/FCOE driver(BFA)
and 10G Networking Driver(BNA).

Changes are:

1. locally used functions are made static

2. unused functions are removed

3. using unique namespaces for the function names that must be
globally visible

Signed-off-by: Debashis Dutt <[email protected]>
Signed-off-by: Rasesh Mody <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
14 years agor6040: Free irq line on error path
Denis Kirjanov [Tue, 24 Aug 2010 23:57:55 +0000 (23:57 +0000)]
r6040: Free irq line on error path

Free irq line on error path.

Signed-off-by: Denis Kirjanov <[email protected]>
Acked-by: Florian Fainelli <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
14 years agos2io: remove lro parameter
Amerigo Wang [Wed, 25 Aug 2010 00:23:39 +0000 (00:23 +0000)]
s2io: remove lro parameter

Remove "lro" parameter of s2io driver.

Signed-off-by: WANG Cong <[email protected]>
Cc: [email protected]
Acked-by: Jon Mason <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
14 years agobe2net: stats for packets received due to internal switching in ASIC.
Ajit Khaparde [Wed, 25 Aug 2010 00:32:56 +0000 (00:32 +0000)]
be2net: stats for packets received due to internal switching in ASIC.

Counters for packets received due to internal switching are already available.
This change will start displaying them in ethtool -S

Signed-off-by: Ajit Khaparde <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
14 years agobe2net: fix to dynamically generate MAC Address for VFs
Ajit Khaparde [Wed, 25 Aug 2010 00:32:33 +0000 (00:32 +0000)]
be2net: fix to dynamically generate MAC Address for VFs

The BE ASIC/firmware doesnot reserve and assign MAC address for VFs.
This results in the VF interfaces being created with MAC Address 0.
The code change proposed takes the MAC address of PF to generate a seed.
MAC Address for VFs are assigned incrementally starting from the seed.
These addresses are programmed in the ASIC by the PF and the VF driver
queries for the MAC address during its probe.

Signed-off-by: Ajit Khaparde <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
14 years agobridge: avoid ethtool on non running interface
stephen hemminger [Tue, 24 Aug 2010 13:12:56 +0000 (13:12 +0000)]
bridge: avoid ethtool on non running interface

If bridge port is offline, don't call ethtool to query speed.

Signed-off-by: Stephen Hemminger <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
14 years agoqlge: Fix a deadlock when the interface is going down
Breno Leitao [Tue, 24 Aug 2010 12:50:40 +0000 (12:50 +0000)]
qlge: Fix a deadlock when the interface is going down

Currently qlge can deadlock when the interface is going
down, and the mpi_port_cfg_work() is executing on another
processor. It happens because unregister_netdev() holds
the rtnl lock, and the mpi_port_cfg_work() also request
this lock.

Since unregiter_netdev() may wait mpi_port_cfg_work(), who
also request the holding lock, it can cause an deadlock,
displaying the following error:

 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
 rmmod         D 00000080c6c1d190     0  3993   2081 0x00008080
 Call Trace:
 [c000000975f56ee0] [c0000000000152a0] .__switch_to+0x100/0x1d0
 [c000000975f56f70] [c0000000005781b4] .schedule+0x3a4/0x8c0
 [c000000975f570c0] [c000000000578e8c] .schedule_timeout+0x24c/0x350
 [c000000975f571e0] [c000000000578a88] .wait_for_common+0x198/0x210
 [c000000975f572c0] [c0000000000abbb4] .__cancel_work_timer+0x2c4/0x2e0
 [c000000975f57400] [d0000000078e7a20] .ql_adapter_down+0x80/0x260 [qlge]
 [c000000975f574b0] [d0000000078e7d80] .qlge_close+0x70/0x130 [qlge]
 [c000000975f57540] [c000000000497ef8] .__dev_close+0x98/0xf0
 [c000000975f575d0] [c000000000497f74] .dev_close+0x24/0x60
 [c000000975f57650] [c000000000498080] .rollback_registered_many+0xd0/0x2b0
 [c000000975f576f0] [c000000000498338] .rollback_registered+0x38/0x50
 [c000000975f57780] [c0000000004983d8] .unregister_netdevice_queue+0x88/0xe0
 [c000000975f57810] [c000000000498574] .unregister_netdev+0x24/0x40
 [c000000975f57890] [d0000000078f6f38] .qlge_remove+0x3c/0x78 [qlge]
 [c000000975f57920] [c0000000002d9298] .pci_device_remove+0x48/0x90
 [c000000975f579a0] [c000000000372850] .__device_release_driver+0xa0/0x130
 [c000000975f57a30] [c000000000372a08] .driver_detach+0x128/0x150
 [c000000975f57ad0] [c000000000371134] .bus_remove_driver+0xc4/0x1a0
 [c000000975f57b70] [c00000000037357c] .driver_unregister+0x8c/0xd0
 [c000000975f57c00] [c0000000002d968c] .pci_unregister_driver+0x5c/0x110
 [c000000975f57ca0] [d0000000078f6ee4] .qlge_exit+0x1c/0x34 [qlge]

Signed-off-by: Breno Leitao <[email protected]>
Signed-off-by: Ron Mercer <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
14 years agobridge: fix locking comment
Stephen Hemminger [Tue, 24 Aug 2010 13:08:10 +0000 (13:08 +0000)]
bridge: fix locking comment

The carrier check is not called from work queue in current code.

Signed-off-by: Stephen Hemminger <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
14 years agonet/netfilter/ipvs: Eliminate memory leak
Julia Lawall [Tue, 24 Aug 2010 04:39:49 +0000 (04:39 +0000)]
net/netfilter/ipvs: Eliminate memory leak

__ip_vs_service_get and __ip_vs_svc_fwm_get increment a reference count, so
that reference count should be decremented before leaving the function in an
error case.

A simplified version of the semantic match that finds this problem is:
(http://coccinelle.lip6.fr/)

// <smpl>
@r exists@
local idexpression x;
expression E;
identifier f1;
iterator I;
@@

x = __ip_vs_service_get(...);
<... when != x
     when != true (x == NULL || ...)
     when != if (...) { <+...x...+> }
     when != I (...) { <+...x...+> }
(
 x == NULL
|
 x == E
|
 x->f1
)
...>
* return ...;
// </smpl>

Signed-off-by: Julia Lawall <[email protected]>
Signed-off-by: Simon Horman <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
14 years agodrivers/net/irda: Eliminate memory leak
Julia Lawall [Tue, 24 Aug 2010 04:38:33 +0000 (04:38 +0000)]
drivers/net/irda: Eliminate memory leak

dev_alloc_skb allocates some memory, so that memory should be freed before
leaving the function in an error case.

Corrected some typos in a nearby comment as well.

A simplified version of the semantic match that finds this problem is:
(http://coccinelle.lip6.fr/)

// <smpl>
@r exists@
local idexpression x;
expression E;
identifier f1;
iterator I;
@@

x = dev_alloc_skb(...);
<... when != x
     when != true (x == NULL || ...)
     when != if (...) { <+...x...+> }
     when != I (...) { <+...x...+> }
(
 x == NULL
|
 x == E
|
 x->f1
)
...>
* return ...;
// </smpl>

Signed-off-by: Julia Lawall <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
14 years agotyphoon: fix a race in typhoon_do_get_stats
Eric Dumazet [Tue, 24 Aug 2010 04:18:13 +0000 (04:18 +0000)]
typhoon: fix a race in typhoon_do_get_stats

Its important to store 'final' values in counters,
not using them as temporary variables,
or this might break some SNMP applications.

Signed-off-by: Eric Dumazet <[email protected]>
Acked-by: David Dillow <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
14 years agoplip: remove superflous return
Dan Carpenter [Tue, 24 Aug 2010 02:01:05 +0000 (02:01 +0000)]
plip: remove superflous return

This return isn't reachable and it obscures the goto on the line before.

Signed-off-by: Dan Carpenter <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
14 years agostmmac: make ioaddr 'void __iomem *' rather than unsigned long
Giuseppe CAVALLARO [Mon, 23 Aug 2010 20:40:42 +0000 (20:40 +0000)]
stmmac: make ioaddr 'void __iomem *' rather than unsigned long

This avoids unnecessary casting and adds the ioaddr in the
private structure.
This patch also removes many warning when compile the driver.

Signed-off-by: Giuseppe Cavallaro <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
14 years agostmmac: remove dead option in the driver's Kconfig
Giuseppe CAVALLARO [Mon, 23 Aug 2010 20:40:41 +0000 (20:40 +0000)]
stmmac: remove dead option in the driver's Kconfig

This patch removes the CPU_SUBTYPE_ST40 dependency in the
driver's Kconfig.
In fact, this option has been removed in the commit:
 f96691872439ab2071171d4531c4a95b5d493ae5
as reported by Christian Dietrich.

Note that the driver remains tested on STM platforms, only.

Signed-off-by: Giuseppe Cavallaro <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
14 years agostmmac: fix_mac_speed is called during 10/100<->1000 speed changes
Pawel Moll [Mon, 23 Aug 2010 20:40:40 +0000 (20:40 +0000)]
stmmac: fix_mac_speed is called during 10/100<->1000 speed changes

This patch modifies the stmmac_adjust_link() function so the
fix_mac_speed() is called not only when link speed is changing
between 10 and 100 Mbps (as required in RMII mode) but also
for 1000 Mbps.

Signed-off-by: Pawel Moll <[email protected]>
Signed-off-by: Giuseppe Cavallaro <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
14 years agobnx2x: small fix in stats handling
Eric Dumazet [Mon, 23 Aug 2010 19:44:08 +0000 (19:44 +0000)]
bnx2x: small fix in stats handling

Use a private variable to fold rx_dropped value, instead of shared
destination buffer, as it might break SNMP applications.

Signed-off-by: Eric Dumazet <[email protected]>
CC: Eilon Greenstein <[email protected]>
CC: Dmitry Kravkov <[email protected]>
Acked-By: Eilon Greenstein <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
14 years agodrivers/net: Remove address use from assignments of function pointers
Joe Perches [Mon, 23 Aug 2010 18:20:03 +0000 (18:20 +0000)]
drivers/net: Remove address use from assignments of function pointers

"foo = &function" is more commonly written "foo = function"

Done with coccinelle script:

// <smpl>
@r@
identifier f;
@@

f(...) { ... }

@@
identifier r.f;
@@

- &f
+ f
// </smpl>

drivers/net/tehuti.c used a function and struct with the
same name, the function was renamed.

Compile tested x86 only.

Signed-off-by: Joe Perches <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
14 years agoqlcnic: change reg name
Amit Kumar Salecha [Wed, 25 Aug 2010 04:03:05 +0000 (04:03 +0000)]
qlcnic: change reg name

Change QLCNIC_CRB_DEV_REF_COUNT to QLCNIC_CRB_DRV_ACTIVE to match
document.

Signed-off-by: Amit Kumar Salecha <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
14 years agoqlcnic: fix fw recovery for PF
Amit Kumar Salecha [Wed, 25 Aug 2010 04:03:04 +0000 (04:03 +0000)]
qlcnic: fix fw recovery for PF

Privilege function should wait for npar state to be operational
before creating context.

Signed-off-by: Amit Kumar Salecha <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
14 years agoqlcnic: support port vlan id
Amit Kumar Salecha [Wed, 25 Aug 2010 04:03:03 +0000 (04:03 +0000)]
qlcnic: support port vlan id

On NIC Partition capable adapter, Administrator can configure to
tag packet with particular vlan id. Packet will be tagged and strip with
that vlan id. Also if 'Tagging' flag is disable, other packet will be drop.

Signed-off-by: Amit Kumar Salecha <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
14 years agoqlcnic: eswitch config fixes
Rajesh Borundia [Wed, 25 Aug 2010 04:03:02 +0000 (04:03 +0000)]
qlcnic: eswitch config fixes

o remove validation before deleting vlan id
o Add missing 'break' while deleting vlan id.

Signed-off-by: Rajesh Borundia <[email protected]>
Signed-off-by: Amit Kumar Salecha <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
14 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
John W. Linville [Wed, 25 Aug 2010 18:51:42 +0000 (14:51 -0400)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem

Conflicts:
drivers/net/wireless/libertas/if_sdio.c

14 years agoiwlwifi: fix compile error without debugging support
Wey-Yi Guy [Tue, 24 Aug 2010 14:27:56 +0000 (07:27 -0700)]
iwlwifi: fix compile error without debugging support

Encounter compiler error when iwlwifi debugging support is
disabled, fix it.

This compiler error was introduced by the previous WiFi/BT coexist patchset.

Signed-off-by: Wey-Yi Guy <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
14 years agomac80211: fix mesh advertisement
Johannes Berg [Wed, 25 Aug 2010 12:34:01 +0000 (14:34 +0200)]
mac80211: fix mesh advertisement

When a mac80211-based driver advertises mesh mode
support, this will be advertised to userspace.
However, if mac80211 was compiled without mesh
support, then that won't actually be true. Fix
this by removing the bit for mesh if mesh isn't
compiled in.

Since this synchronizes what we advertise to
cfg80211 and actually support, it means we can
now rely on cfg80211's interface type checks
and need not check again in mac80211.

Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
14 years agop54: better rssi->dbm conversion for longbow phys
Christian Lamparter [Tue, 24 Aug 2010 21:29:05 +0000 (23:29 +0200)]
p54: better rssi->dbm conversion for longbow phys

This patch should fix the dodgy signal and noise value
reports for most longbow (p54spi) users:

e.g.: (an older tcpdump extract)
> 2.0 Mb/s 2437 MHz (0x00a0) -49dB signal -41dB noise
> 1.0 Mb/s 2437 MHz (0x00a0) 4dB signal -41dB noise

The formula is taken from stlc45xx:
http://gitorious.org/stlc45xx/mainline/blobs/master/stlc45xx.c#line1199

Signed-off-by: Christian Lamparter <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
14 years agomac80211: fix rcu-unsafe pointer dereference
Christian Lamparter [Tue, 24 Aug 2010 17:22:42 +0000 (19:22 +0200)]
mac80211: fix rcu-unsafe pointer dereference

This patch fixes a potential crash (null-pointer de-
reference) which was introduced in my previous patch:
 "mac80211: AMPDU rx reorder timeout timer"

During a BA teardown, the pointer to the soon-to-be-gone
tid_ampdu_rx element will be nullified. Therefore the
release timer mechanism has to be careful not to
accidentally access the item without any RCU protection.

Signed-off-by: Christian Lamparter <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
14 years agonl80211: fix missing nesting
Johannes Berg [Tue, 24 Aug 2010 10:15:53 +0000 (12:15 +0200)]
nl80211: fix missing nesting

commit 95a6ccbb46c70cff376684c752831c014c87029d
Author: Johannes Berg <[email protected]>
Date:   Thu Aug 12 15:38:38 2010 +0200

    cfg80211/mac80211: extensible frame processing

introduced a netlink bug that caused parsing errors
in userspace because it forgot to close a nesting,
which would advertise a nesting length of zero to
userspace, which then completely threw off parsing
and led to

Illegal nla->nla_type == 0

being printed by libnl.

Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
14 years agort2x00: fix "buffer size not provably correct" build warning
Arnaud Patard (Rtp) [Mon, 23 Aug 2010 21:02:22 +0000 (23:02 +0200)]
rt2x00: fix "buffer size not provably correct" build warning

rt2x00 debugfs interface doesn't check the size of the data coming
from userspace, leading to a build warning. Fix That.

v2: return EINVAL if input is too long

Signed-off-by: Arnaud Patard <[email protected]>
Acked-by: Ivo van Doorn <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
14 years agort2x00: Fix max TX power settings
Ivo van Doorn [Mon, 23 Aug 2010 17:56:07 +0000 (19:56 +0200)]
rt2x00: Fix max TX power settings

During initialization each driver reads the default TX power
for each individual channel. However mac80211 only accepts the
maximum value (which is also handled as default value).

As a result, the TX power of the device was being limited to
the default value, which is often quite low compared to the
real maximum acceptable value.

This patch allows each driver to set the maximum value on a
per-channel basis which is forwarded to mac80211. The default
value will be preserved for now, in case we want to update
mac80211 to differentiate between the maximum and default txpower.

This fixes bug complaining about limited TX power values like:
https://bugzilla.kernel.org/show_bug.cgi?id=16358

Signed-off-by: Ivo van Doorn <[email protected]>
Acked-by: Helmut Schaa <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
14 years agort2x00: Fix channel configuration for RF3052
Ivo van Doorn [Mon, 23 Aug 2010 17:55:43 +0000 (19:55 +0200)]
rt2x00: Fix channel configuration for RF3052

We missed a check for RF3052 in the config_channel
configuration function. As a result the channel is not
properly configured for RF3052 devices. This also
requires rt2800_config_channel_rf3xxx to support 5GHz
channels, so we must apply the TXPOWER_A_TO_DEV and
TXPOWER_G_TO_DEV conversions during rt2800_config_channel()

Signed-off-by: Ivo van Doorn <[email protected]>
Acked-by: Helmut Schaa <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
14 years agort2x00: Merge rt2800{pci/usb} radio enabling/disabling code to rt2800lib
Ivo van Doorn [Mon, 23 Aug 2010 17:55:22 +0000 (19:55 +0200)]
rt2x00: Merge rt2800{pci/usb} radio enabling/disabling code to rt2800lib

The functions rt2800pci_enable_radio and rt2800usb_disable_radio are
almost equal and can be merged into rt2800lib. This reduces the number
of functions which must be exported from rt2800lib to the drivers at
the same time.

Also rt2800pci_disable_radio and rt2800usb_disable_radio are almost
equal and can be merged into rt2800lib in a similar fashion.

Signed-off-by: Ivo van Doorn <[email protected]>
Acked-by: Helmut Schaa <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
14 years agort2x00: Fix rt2800 retry calculation
Ivo van Doorn [Mon, 23 Aug 2010 17:55:01 +0000 (19:55 +0200)]
rt2x00: Fix rt2800 retry calculation

The retry count for a frame is calculated by the realized MCS rate
subtracting of the requested MCS rate. However during TX done reporting
we accidently override the requested MCS rate with the realized MCS
rate. This causes the retry count to be reset to 0 always, and feeding
invalid rate information into minstrel_ht.

Signed-off-by: Ivo van Doorn <[email protected]>
Acked-by: Helmut Schaa <[email protected]>
Acked-by: Gertjan van Wingerde <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
14 years agort2x00: Remove Q_INDEX_CRYPTO and ENTRY_OWNER_DEVICE_CRYPTO
Ivo van Doorn [Mon, 23 Aug 2010 17:54:41 +0000 (19:54 +0200)]
rt2x00: Remove Q_INDEX_CRYPTO and ENTRY_OWNER_DEVICE_CRYPTO

Q_INDEX_CRYPTO and ENTRY_OWNER_DEVICE_CRYPTO where initially
added with the plan to implement hardware encryption for rt2500pci.
However there are no plans to do so anymore as the crypto
mechanism in rt2500pci is very different then any other Ralink
device.

So we can now safely remove the definitions, and don't think
about this feature anymore. :)

Signed-off-by: Ivo van Doorn <[email protected]>
Acked-by: Helmut Schaa <[email protected]>
Acked-by: Gertjan van Wingerde <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
14 years agort2x00: Move direct access to queue->entries to rt2x00queue.c
Ivo van Doorn [Mon, 23 Aug 2010 17:54:21 +0000 (19:54 +0200)]
rt2x00: Move direct access to queue->entries to rt2x00queue.c

All access to queue->entries through the Q_INDEX/Q_INDEX_DONE
variables must be done using spinlock protection. It is best
to manage this completely from rt2x00queue.c.

For safely looping through all entries in the queue, the function
rt2x00queue_for_each_entry is added which will walk from from a index
range in a safe manner.

This also fixes rt2x00usb which walked the entries list from
0 to length to kill each entry (killing entries must be done
from Q_INDEX_DONE to Q_INDEX to enforce TX status reporting to
occur in the correct order.

Signed-off-by: Ivo van Doorn <[email protected]>
Acked-by: Gertjan van Wingerde <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
14 years agort2x00: Reduce indenting
Ivo van Doorn [Mon, 23 Aug 2010 17:54:02 +0000 (19:54 +0200)]
rt2x00: Reduce indenting

Cosmetic change, reduce indenting.

Signed-off-by: Ivo van Doorn <[email protected]>
Acked-by: Helmut Schaa <[email protected]>
Acked-by: Gertjan van Wingerde <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
This page took 0.108254 seconds and 4 git commands to generate.