]> git.karo-electronics.de Git - mv-sheeva.git/log
mv-sheeva.git
15 years agonet: add Xilinx emac lite device driver
John Linn [Thu, 20 Aug 2009 09:52:16 +0000 (02:52 -0700)]
net: add Xilinx emac lite device driver

This patch adds support for the Xilinx Ethernet Lite device.  The
soft logic core from Xilinx is typically used on Virtex and Spartan
designs attached to either a PowerPC or a Microblaze processor.

Signed-off-by: Sadanand M <sadanan@xilinx.com>
Signed-off-by: John Linn <john.linn@xilinx.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoppp_generic: Help GCC see that 'flen' is always initialized.
David S. Miller [Wed, 19 Aug 2009 20:55:55 +0000 (13:55 -0700)]
ppp_generic: Help GCC see that 'flen' is always initialized.

It's too stupid to see that we always set flen to something
before we use it in ppp_mp_explode():

drivers/net/ppp_generic.c: In function 'ppp_push':
drivers/net/ppp_generic.c:1314: warning: 'flen' may be used uninitialized in this function
drivers/net/ppp_generic.c:1314: note: 'flen' was declared here

This started warning after commit a53a8b56827cc429c6d9f861ad558beeb5f6103f
("ppp: fix lost fragments in ppp_mp_explode() (resubmit)")

So just put an explicit unconditional initialization there to
hush it up.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosky2: version 1.25
Stephen Hemminger [Tue, 18 Aug 2009 15:17:11 +0000 (15:17 +0000)]
sky2: version 1.25

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosky2: no recycling
Stephen Hemminger [Tue, 18 Aug 2009 15:17:10 +0000 (15:17 +0000)]
sky2: no recycling

Recycling turns out to be a bad idea!  For most use cases, the
packet can not be reused: TCP packets are cloned. Even for the ideal
case of forwarding, it hurts performance because of CPU ping/pong.
On a multi-core system forwarding of 64 byte packets is worse
much worse: recycling = 24% forwarded vs no recycling = 42% forwarded

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosky2: optimize transmit completion
Stephen Hemminger [Tue, 18 Aug 2009 15:17:09 +0000 (15:17 +0000)]
sky2: optimize transmit completion

Don't reference the list element in hardware transmit ring on transmit
completion. The list element is updated by hardware, therefore
it causes a cache miss. Do book keeping in software structure.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosky2: dynamic size transmit ring
Stephen Hemminger [Tue, 18 Aug 2009 15:17:08 +0000 (15:17 +0000)]
sky2: dynamic size transmit ring

Allocate and size transmit ring based on parameters. Saves excess
space and allows configuring larger rings for testing.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosky2: simplify list element error
Stephen Hemminger [Tue, 18 Aug 2009 15:17:07 +0000 (15:17 +0000)]
sky2: simplify list element error

The code for list element error (which should only happen on hardware
errors) should be cleaner and safer. Gets rid of unused ring_size
argument, which makes next patch easier.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosky2: transmit ring 64 bit conservation
Stephen Hemminger [Tue, 18 Aug 2009 15:17:06 +0000 (15:17 +0000)]
sky2: transmit ring 64 bit conservation

This patch saves elements on transmit ring by only updating the upper
64 bit address when it changes. With many workloads skb's are located
in same region, so it saves space.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosky2: use upper/lower 32 bits
Stephen Hemminger [Tue, 18 Aug 2009 15:17:05 +0000 (15:17 +0000)]
sky2: use upper/lower 32 bits

Use the existing macros to show where DMA address is being broken
apart. This is cosmetic only.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agomdio: mdio_if_info::mmds should not be __bitwise
Ben Hutchings [Wed, 19 Aug 2009 03:13:03 +0000 (20:13 -0700)]
mdio: mdio_if_info::mmds should not be __bitwise

I misunderstood the meaning of __bitwise.  In practice it makes sparse
warn about every use of mmds which is certainly not what we want.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agobe2net: destroy mcc queue before tx queues
Sathya Perla [Mon, 17 Aug 2009 00:58:41 +0000 (00:58 +0000)]
be2net: destroy mcc queue before tx queues

As mcc queue uses the tx event queue.

Signed-off-by: Sathya Perla <sathyap@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agobe2net: refactor be_msix_(un)register() code.
Sathya Perla [Mon, 17 Aug 2009 00:58:26 +0000 (00:58 +0000)]
be2net: refactor be_msix_(un)register() code.

Signed-off-by: Sathya Perla <sathyap@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agobe2net: Set mac addr in hw regardless of netif_running()
Sathya Perla [Mon, 17 Aug 2009 00:58:04 +0000 (00:58 +0000)]
be2net: Set mac addr in hw regardless of netif_running()

be_mac_addr_set() currently is broken when netif_running() is false.

Signed-off-by: Sathya Perla <sathyap@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agophonet: fix build when PROC_FS is disabled
Randy Dunlap [Mon, 17 Aug 2009 10:35:49 +0000 (10:35 +0000)]
phonet: fix build when PROC_FS is disabled

Fix phonet build when PROC_FS is not enabled:

net/built-in.o: In function `pn_sock_open':
socket.c:(.text+0x23c649): undefined reference to `seq_open_net'
net/built-in.o:(.rodata+0x21018): undefined reference to `seq_release_net'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Acked-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agotrace_skb: fix build when CONFIG_NET is not enabled
Randy Dunlap [Mon, 17 Aug 2009 23:00:30 +0000 (16:00 -0700)]
trace_skb: fix build when CONFIG_NET is not enabled

Fix trace_skb_sources build when CONFIG_NET is not enabled:

kernel/built-in.o: In function `probe_skb_dequeue':
trace_skb_sources.c:(.text+0xd9152): undefined reference to `init_net'
trace_skb_sources.c:(.text+0xd9188): undefined reference to `dev_get_by_index'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agocan: Use WARN_ONCE() instead of BUG_ON() for sanity check in receive path
Oliver Hartkopp [Thu, 13 Aug 2009 22:54:25 +0000 (22:54 +0000)]
can: Use WARN_ONCE() instead of BUG_ON() for sanity check in receive path

To ensure a proper handling of CAN frames transported in skbuffs some checks
need to be performed at receive time.

As stated by Michael Olbrich and Luotao Fu BUG_ON() might be to restrictive.
This is right as we can just drop the non conform skbuff and the Kernel can
continue working.

This patch replaces the BUG_ON() with a WARN_ONCE() so that the system remains
healthy but we made the problem visible (once).

Signed-off-by: Oliver Hartkopp <oliver@hartkopp.net>
Signed-off-by: Urs Thuermann <urs@isnogud.escape.de>
CC: Michael Olbrich <m.olbrich@pengutronix.de>
CC: Luotao Fu <l.fu@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosky2: remove restarting workaround flag
Stephen Hemminger [Fri, 14 Aug 2009 13:33:17 +0000 (13:33 +0000)]
sky2: remove restarting workaround flag

The whole restarting flag was introduced by Mike McCormack
and was a temporary duct tape patch around issues with transmits
inflight during restart. The problems it was covering are now
fixed and the code should have been reverted.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoixgbe: Add support for NETIF_F_FCOE_MTU to 82599 devices
Yi Zou [Fri, 14 Aug 2009 12:42:17 +0000 (12:42 +0000)]
ixgbe: Add support for NETIF_F_FCOE_MTU to 82599 devices

Enable netdev feature flag bit NETIF_F_FCOE_MTU for 82599 devices and enable
jumbo frame correspondingly when NETIF_F_FCOE_MTU is set.

Signed-off-by: Yi Zou <yi.zou@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet: Add NETIF_F_FCOE_MTU to indicate support for a different MTU for FCoE
Yi Zou [Fri, 14 Aug 2009 12:41:57 +0000 (12:41 +0000)]
net: Add NETIF_F_FCOE_MTU to indicate support for a different MTU for FCoE

Add NETIF_F_FCOE_MTU to indicate that the NIC can support a secondary MTU for
converged traffic of LAN and Fiber Channel over Ethernet (FCoE). The MTU for
FCoE is 2158 = 14 (FCoE header) + 24 (FC header) + 2112 (FC max payload) +
4 (FC CRC) + 4 (FCoE trailer).

Signed-off-by: Yi Zou <yi.zou@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoixgbe: updates vlan feature flags to enable FCoE offloads on vlan interface
Vasu Dev [Fri, 14 Aug 2009 12:41:28 +0000 (12:41 +0000)]
ixgbe: updates vlan feature flags to enable FCoE offloads on vlan interface

Updates netdev->vlan_features for NETIF_F_FCOE_CRC and NETIF_F_FSO, so that
FCoE CRC and GSO offloads will get used for FCoE over ixgbe based vlan
interface.

Signed-off-by: Vasu Dev <vasu.dev@intel.com>
Signed-off-by: Yi Zou <yi.zou@intel.com>
Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agovlan: adds fcoe offload related net_device_ops and updates fcoe_ddp_xid field
Vasu Dev [Fri, 14 Aug 2009 12:41:07 +0000 (12:41 +0000)]
vlan: adds fcoe offload related net_device_ops and updates fcoe_ddp_xid field

Adds fcoe offload related net_device_ops functions vlan_dev_fcoe_ddp_setup
and vlan_dev_fcoe_ddp_done, their implementation simply calls real eth device
net_device_ops for FCoE DDP setup and done operations.

Updates VLAN netdev field value for fcoe_ddp_xid from real eth device netdev.

Above changes are required for fcoe DDP offload working on a VLAN interface.

Signed-off-by: Vasu Dev <vasu.dev@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
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 [Fri, 14 Aug 2009 23:07:21 +0000 (16:07 -0700)]
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6

15 years agosky2: version 1.24
Stephen Hemminger [Fri, 14 Aug 2009 05:15:20 +0000 (05:15 +0000)]
sky2: version 1.24

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosky2: fix pause negotiation
Stephen Hemminger [Fri, 14 Aug 2009 22:36:41 +0000 (15:36 -0700)]
sky2: fix pause negotiation

The sky2 driver combines auto speed negotiation with automatic negotiation
of pause parameters; but the ethtool interface expects them to be
split. This patch allows autonegotiation to be used for speed, but
manually disable flow control.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosky2: lock less transmit completion
Stephen Hemminger [Fri, 14 Aug 2009 22:33:19 +0000 (15:33 -0700)]
sky2: lock less transmit completion

Transmit completion can safely run lockless against transmit start.
In the normal case, completion is done from NAPI and only looks
at elements that are at the tail of the ring.  When doing shutdown
or reset, the transmiter should be completely block by NAPI disable
and blocking of transmit queue.

Based on earlier work by Mike McCormack.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosky2: cleanup restart operations
Stephen Hemminger [Fri, 14 Aug 2009 22:31:25 +0000 (15:31 -0700)]
sky2: cleanup restart operations

This unifies the places that bounce the device (suspend/resume
and restart). And makes the operations have the same semantics
as normal dev_open/dev_stop.

This also avoids setting the multicast addresses twice when
device is brought up.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosky2: hold RTNL when doing suspend/shutdown operations
Stephen Hemminger [Fri, 14 Aug 2009 05:15:16 +0000 (05:15 +0000)]
sky2: hold RTNL when doing suspend/shutdown operations

The suspend and shutdown code plays with shared state. Use consistent
locking, for extra protection.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosky2: hold spinlock around phy_power_down
Stephen Hemminger [Fri, 14 Aug 2009 05:15:15 +0000 (05:15 +0000)]
sky2: hold spinlock around phy_power_down

Avoid any possible problems with accessing PHY registers on shutdown.
This is a purely theoretical issue and is not related to any of the
outstanding bug reports. Since receiver and transmitter are already
shutdown and phy interrupts for this device are already disabled,
there should already be enough protection. Suggested by Mike McCormack.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosky2: Reset tx train after interrupts disabled.
Mike McCormack [Fri, 14 Aug 2009 05:15:14 +0000 (05:15 +0000)]
sky2: Reset tx train after interrupts disabled.

Reseting the tx chain too soon results in invalid tx queue positions
being delivered in the status queue.  This also makes sure there's no
overlap between the cleanup done by sky2_tx_clean() and
sky2_tx_done().

Signed-off-by: Mike McCormack <mikem@ring3k.org>
Acked-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosky2: Move tx reset functionality to sky2_tx_reset()
Mike McCormack [Fri, 14 Aug 2009 05:15:13 +0000 (05:15 +0000)]
sky2: Move tx reset functionality to sky2_tx_reset()

This is pure refactoring.

Signed-off-by: Mike McCormack <mikem@ring3k.org>
Acked-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosky2: Avoid rewinding sky2->tx_prod
Mike McCormack [Fri, 14 Aug 2009 05:15:12 +0000 (05:15 +0000)]
sky2: Avoid rewinding sky2->tx_prod

Keep sky2->tx_prod consistent since int might be examined by
an softirq poll or restart.

Signed-off-by: Mike McCormack <mikem@ring3k.org>
Acked-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
David S. Miller [Fri, 14 Aug 2009 19:29:17 +0000 (12:29 -0700)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6

15 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
David S. Miller [Fri, 14 Aug 2009 19:27:19 +0000 (12:27 -0700)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6

15 years agob43: Implement RC calibration for rev.0/1 LP-PHYs
Gábor Stefanik [Thu, 13 Aug 2009 12:19:02 +0000 (14:19 +0200)]
b43: Implement RC calibration for rev.0/1 LP-PHYs

Also implement get/set BB mult, get/set TX gain, set RX gain,
disable/restore CRS, run/stop DDFS, RX IQ est and QDIV roundup
in the process.

Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
Acked-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: Set HW state properly
Sujith [Thu, 13 Aug 2009 04:04:37 +0000 (09:34 +0530)]
ath9k: Set HW state properly

This patch fixes a bug in ath9k_stop() where the HW
was not put into FULL_SLEEP state. Not doing so will
cause issues in suspend-resume and the HW will not respond
to chip resets.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: Fix bug in PCI resume
Sujith [Thu, 13 Aug 2009 04:04:35 +0000 (09:34 +0530)]
ath9k: Fix bug in PCI resume

This patch fixes a bug where the device was enabled
before restoring the PCI state.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: Remove duplicate variables
Sujith [Thu, 13 Aug 2009 04:04:32 +0000 (09:34 +0530)]
ath9k: Remove duplicate variables

diversity_control and antenna_switch_swap are already
present in ath9k_ops_config. Remove duplicate occurrences
in ath_hw.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: Remove has_hw_phycounters
Sujith [Thu, 13 Aug 2009 04:04:25 +0000 (09:34 +0530)]
ath9k: Remove has_hw_phycounters

PHY counters are available in all chipsets supported
by ath9k. Remove the check.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: update kconfig to indicate support for AR9002 family
Luis R. Rodriguez [Wed, 12 Aug 2009 21:45:16 +0000 (14:45 -0700)]
ath9k: update kconfig to indicate support for AR9002 family

ath9k supports the AR9002 family of chipsets. This includes
the AR9285 and the miniPCI AR9223 and AR9220 (which themselves
have AR9280+AR5133).

We now refer people to the wiki page as it seems this is not
as popular as we would have hoped.

Reported-by: JD <jd1008@gmail.com>
Cc: Dakota Lee <Dakota.Lee@Atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agocfg80211: allow driver to override PS default
Johannes Berg [Wed, 12 Aug 2009 21:33:20 +0000 (23:33 +0200)]
cfg80211: allow driver to override PS default

Sometimes drivers might have a good reason to override
the PS default, like iwlwifi right now where it affects
RX performance significantly at this point. This will
allow them to override the default, if desired, in a
way that users can still change it according to their
trade-off choices, not the driver's, like would happen
if the driver just disabled PS completely then.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agocfg80211: check for and abort dangling scan requests
Johannes Berg [Wed, 12 Aug 2009 20:21:21 +0000 (22:21 +0200)]
cfg80211: check for and abort dangling scan requests

If you trigger a scan request on an interface and then
take it down, or rmmod the module or unplug the device
the driver might "forget" to cancel the scan request.
That is a bug in the driver, but the current behaviour
is that we just hang endlessly waiting for the netdev
refcount to become 0 which it never will. To improve
robustness, check for this situation in cfg80211, warn
about it and clean up behind the driver. I don't just
clean up silently because it's likely that the driver
also has some internal state it has now leaked.

Additionally, this fixes a locking bug, clearing the
scan_req pointer should be done under the rdev lock.

Finally, we also need to _wait_ for the scan work and
not just abort it since it might be pending and wanting
to do a cleanup.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: Fix invalid length passed to IE parser for PLINK CONFIRM frames
David Woo [Wed, 12 Aug 2009 18:03:44 +0000 (11:03 -0700)]
mac80211: Fix invalid length passed to IE parser for PLINK CONFIRM frames

The length of the fixed portion of plink confirm frames is 4 bytes longer than
the other plink_action frames.  This path corrects an error in the length
adjustment done for these type of frames.

Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: Mark a destination sequence number as valid when a PREQ is received.
David Woo [Wed, 12 Aug 2009 18:03:43 +0000 (11:03 -0700)]
mac80211: Mark a destination sequence number as valid when a PREQ is received.

If a PREQ frame is received giving us a fresher DSN than what we have, record
the new dsn and mark it as valid.  This patch fixes a bug in the setting of the
MESH_PATH_DSN_VALID flag.

Also, minor fix to coding style on that file.

Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath5k: use bit shift operators for cache line size
Luis R. Rodriguez [Wed, 12 Aug 2009 16:57:01 +0000 (09:57 -0700)]
ath5k: use bit shift operators for cache line size

This matches ath9k, providing consistency when reading both drivers.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath5k: use common ath.ko ath_rxbuf_alloc()
Luis R. Rodriguez [Wed, 12 Aug 2009 16:57:00 +0000 (09:57 -0700)]
ath5k: use common ath.ko ath_rxbuf_alloc()

Now that its shared we can remove ath5k's own implementation.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath: add common ath_rxbuf_alloc() and make ath9k use it
Luis R. Rodriguez [Wed, 12 Aug 2009 16:56:59 +0000 (09:56 -0700)]
ath: add common ath_rxbuf_alloc() and make ath9k use it

Turns out ath5k and ath9k can share the same helper to
allocates RX skbs. We allocate skbs aligned to the cache line
size. This requirement seems to have come from AR5210; when
this was not done it seems sometimes we'd get bogus data. I'm
also told it may have been a performance enhancement
consideration. In the end I can't be sure we can remove this
on new hardware so just keep this and start sharing it through
ath.ko.

Make ath9k start using this, ath5k is next.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agowl1251: remove unused definitions from wl1251_reg.h
Kalle Valo [Wed, 12 Aug 2009 11:42:59 +0000 (14:42 +0300)]
wl1251: remove unused definitions from wl1251_reg.h

Luis reported that IRQ_MASK conflicts with include/pcmcia/cs.h on
compat-wireless. Remove that and a bunch of other unused defines
from wl1251_reg.h.

Reported-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agowl1251: remove wl1251_ops.c
Kalle Valo [Wed, 12 Aug 2009 11:42:51 +0000 (14:42 +0300)]
wl1251: remove wl1251_ops.c

Commit "wl1251: remove wl1251_ops" originally removed file wl1251_ops.c,
but while I rebased the patch the removal got lost. Now remote the file
for real.

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwl3945: fix compilation error in iwl3945_pass_packet_to_mac80211()
Kalle Valo [Wed, 12 Aug 2009 11:07:27 +0000 (14:07 +0300)]
iwl3945: fix compilation error in iwl3945_pass_packet_to_mac80211()

Commit "iwlwifi: Traffic type and counter for debugFs" broke iwl3945 in
a case when CONFIG_IWLWIFI_LEDS is disabled:

drivers/net/wireless/iwlwifi/iwl-3945.c:580: error: 'hdr' undeclared (first use in this function)

Fix it by removing the ifdef check for hdr variable.

Signed-off-by: Kalle Valo <kalle.valo@iki.fi>
Acked-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agob43: LP-PHY: Refactor TX gain table I/O
Gábor Stefanik [Tue, 11 Aug 2009 20:24:22 +0000 (22:24 +0200)]
b43: LP-PHY: Refactor TX gain table I/O

Make it possible to write individual gain table entries.
Allow gain table entries to be written outside gain table init.
Add version-agnostic helpers for writing gain tables.
Use the new TX gain table helpers during table init.

Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agousbnet: add rx queue pausing
Jussi Kivilinna [Tue, 11 Aug 2009 19:57:16 +0000 (22:57 +0300)]
usbnet: add rx queue pausing

Add rx queue pausing to usbnet. This is needed by rndis_wlan so that it can
control rx queue and prevent received packets from being send forward before
rndis_wlan receives and handles 'media connect'-indication. Without this
establishing WPA connections is hard and fail often.

[v2] - removed unneeded use of skb_clone

Cc: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agob43: Implement RC calibration for rev.2+ LP PHYs
Gábor Stefanik [Tue, 11 Aug 2009 19:53:06 +0000 (21:53 +0200)]
b43: Implement RC calibration for rev.2+ LP PHYs

Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agob43: LP-PHY: Implement reading band SPROM
Gábor Stefanik [Tue, 11 Aug 2009 19:47:00 +0000 (21:47 +0200)]
b43: LP-PHY: Implement reading band SPROM

Some of the new variables in b43_phy_lp appear to be dead code in
the vendor driver; they will be removed if they remain unused when
LP-PHY implementation is finished.

Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agolibertas: name the network device wlan%d
Daniel Mack [Tue, 11 Aug 2009 14:09:34 +0000 (16:09 +0200)]
libertas: name the network device wlan%d

Devices created by the libertas driver are currently called eth%d. Which
is wrong, because the device does not at all have anything to do with
Ethernet. And it is also confusing when used on devices with more than
one network device.

Fix this by calling it wlan%d.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Cc: Roel Kluin <roel.kluin@gmail.com>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: Fix unresolved mesh frames queued without valid control.vif
Javier Cardona [Tue, 11 Aug 2009 00:29:29 +0000 (17:29 -0700)]
mac80211: Fix unresolved mesh frames queued without valid control.vif

Mesh frames that could not be immediately resolved were queued with a NULL
info->control.vif.  This patch moves the call to mesh_nexthop_lookup closer to
the point where it is handed over to ieee80211_tx().  This ensures that the
unresolved frames are ready to be sent once the path is resolved.

Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agotrivial: remove duplicate "different" from comment
Thadeu Lima de Souza Cascardo [Tue, 11 Aug 2009 14:18:42 +0000 (11:18 -0300)]
trivial: remove duplicate "different" from comment

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agowl1271: fix compiler warnings on 64 bit archs
Luciano Coelho [Tue, 11 Aug 2009 08:58:27 +0000 (11:58 +0300)]
wl1271: fix compiler warnings on 64 bit archs

There were a few warnings when compiling the wl1271 driver on 64 bit
architectures.  This was due to size mismatch of integers.

This commit fixes the following warnings:

drivers/net/wireless/wl12xx/wl1271_main.c: In function 'wl1271_irq_work':
drivers/net/wireless/wl12xx/wl1271_main.c:184: warning: large integer implicitly truncated to unsigned type
drivers/net/wireless/wl12xx/wl1271_boot.c: In function 'wl1271_boot_upload_firmware_chunk':
drivers/net/wireless/wl12xx/wl1271_boot.c:103: warning: format '%d' expects type 'int', but argument 2 has type 'size_t'
drivers/net/wireless/wl12xx/wl1271_boot.c:150: warning: format '%d' expects type 'int', but argument 2 has type 'size_t'
drivers/net/wireless/wl12xx/wl1271_boot.c: In function 'wl1271_boot_enable_interrupts':
drivers/net/wireless/wl12xx/wl1271_boot.c:278: warning: large integer implicitly truncated to unsigned type

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agob43: Fix a typo in the sync_stx routine
Gábor Stefanik [Mon, 10 Aug 2009 22:54:26 +0000 (00:54 +0200)]
b43: Fix a typo in the sync_stx routine

I completely missed the "one's complement" instruction from the specs.

Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agossb: Implement the remaining rev.8 SPROM vars needed for LP-PHY
Gábor Stefanik [Mon, 10 Aug 2009 19:23:08 +0000 (21:23 +0200)]
ssb: Implement the remaining rev.8 SPROM vars needed for LP-PHY

Also add a "SPEX32" macro for extracting 32-bit SPROM variables.

Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: Move mpath and mpp growth to mesh workqueue.
Javier Cardona [Mon, 10 Aug 2009 19:15:52 +0000 (12:15 -0700)]
mac80211: Move mpath and mpp growth to mesh workqueue.

This prevents calling rcu_synchronize from within the tx path by moving the
table growth code to the mesh workqueue.

Move mesh_table_free and mesh_table_grow from mesh.c to mesh_pathtbl.c and
declare them static.

Also, re-enable mesh in Kconfig and update the configuration description.

Signed-off-by: Javier Cardona <javier@cozybit.com>
Tested-by: Andrey Yurovsky <andrey@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: Assign a default mesh beaconing interval.
Javier Cardona [Mon, 10 Aug 2009 19:15:51 +0000 (12:15 -0700)]
mac80211: Assign a default mesh beaconing interval.

The mesh stack was enabling beaconing without specifying an interval.  This
patch defines a default beaconing interval of 1s.

Incidentally, this fixes mesh beaconing in mac80211_hwsim devices.

Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: Early detection of broken mesh paths when using minstrel.
Javier Cardona [Mon, 10 Aug 2009 19:15:50 +0000 (12:15 -0700)]
mac80211: Early detection of broken mesh paths when using minstrel.

This change triggers a path discovery as soon as the link quality degrades
below a certain threshold.  This results in a faster path recovery time than
by simply relying on the periodic path refresh mechanism to detect broken
links.

Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: Update the station failed frames average when minstrel is used.
Javier Cardona [Mon, 10 Aug 2009 19:15:49 +0000 (12:15 -0700)]
mac80211: Update the station failed frames average when minstrel is used.

The fail_avg value is used to compute the mesh metric, and was only being set
by the pid rate control module. This fixes the mesh path selection mechanism
for cards that use mistrel for rate control.

Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: Use 3-address format for mesh broadcast frames.
Javier Cardona [Mon, 10 Aug 2009 19:15:48 +0000 (12:15 -0700)]
mac80211: Use 3-address format for mesh broadcast frames.

The 11s task group recently changed the frame mesh multicast/broadcast frame
format to use 3-address.  This was done to avoid interactions with widely
deployed lazy-WDS access points.

This patch changes the format of group addressed frames, both mesh-originated
and proxied, to use the data format defined in draft D2.08 and forward.  The
address fields used for group addressed frames is:

In 802.11 header
 ToDS:0  FromDS:1
 addr1: DA  (broadcast/multicast address)
 addr2: TA
 addr3: Mesh SA

In address extension header:
 addr4: SA  (only present if frame was proxied)

Note that this change breaks backward compatibility with earlier mesh stack
versions.

Signed-off-by: Andrey Yurovsky <andrey@cozybit.com>
Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: Use correct sign for mesh active path refresh.
Andrey Yurovsky [Mon, 10 Aug 2009 19:15:47 +0000 (12:15 -0700)]
mac80211: Use correct sign for mesh active path refresh.

On locally originated traffic, we refresh active paths after a timeout.  The
decision to do this was using the wrong sign and therefore the refresh timer
was triggered for every frame.

Signed-off-by: Andrey Yurovsky <andrey@cozybit.com>
Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: Improve dequeing from mpath frame queue.
Javier Cardona [Mon, 10 Aug 2009 19:15:46 +0000 (12:15 -0700)]
mac80211: Improve dequeing from mpath frame queue.

Also, fix typo in comment.

Signed-off-by: Javier Cardona <javier@cozybit.com>
Tested-by: Andrey Yurovsky <andrey@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agob43: Update LP-PHY rev2+ baseband init to match the specs
Gábor Stefanik [Mon, 10 Aug 2009 18:57:06 +0000 (20:57 +0200)]
b43: Update LP-PHY rev2+ baseband init to match the specs

The rev2+ BB init spec has changed behind us, and thus the code is
no longer up to date. Update the code to match the current specs.
Also implement save/restore dig filt state, as required by the
new specification.

Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agob43: Implement LP-PHY baseband table initialization
Gábor Stefanik [Mon, 10 Aug 2009 18:39:47 +0000 (20:39 +0200)]
b43: Implement LP-PHY baseband table initialization

Implement LP-PHY baseband table init for all revisions.

Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: small tx code cleanup
Johannes Berg [Mon, 10 Aug 2009 14:04:15 +0000 (16:04 +0200)]
mac80211: small tx code cleanup

It's really easier to read if it's not indented
as much, so invert the condition and rearrange
the code so the smaller chunk is indented instead.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: sequence number micro-optimisation
Johannes Berg [Mon, 10 Aug 2009 14:02:40 +0000 (16:02 +0200)]
mac80211: sequence number micro-optimisation

There's no need to mask the variable with 0xFFF0
since we ever only use it as a u16 and the lowest
four bits can't ever be non-zero. The compiler
cannot infer the latter, and therefore has to emit
code to do the masking.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: take statistics before encryption
Johannes Berg [Mon, 10 Aug 2009 14:01:54 +0000 (16:01 +0200)]
mac80211: take statistics before encryption

When encryption is used, the number of bytes
sent to the peer increases by the IV and ICV.
This is accounted if software encryption is
used, but not if the devices does hardware
encryption. To make the numbers comparable,
never account for that overhead.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoMAINTAINERS: add information for wl1271 wireless driver
Luciano Coelho [Mon, 10 Aug 2009 08:15:13 +0000 (11:15 +0300)]
MAINTAINERS: add information for wl1271 wireless driver

Add maintainer information section for the wl1271 wireless driver and fix the
information for wl1271.

Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Acked-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath5k: Use SWI to trigger calibration
Nick Kossifidis [Mon, 10 Aug 2009 00:31:31 +0000 (03:31 +0300)]
ath5k: Use SWI to trigger calibration

* Get rid of calibration timer, instead use a software interrupt
  to schedule the calibration tasklet.

 a) We don't need a timer for this, there is no need for accuracy
   even with round_jiffies i think this is a waste of resources.
   Also we don't need to run calibration if we are idle (no
   interrupts).

 b) When we add ANI support we 'll just extend the poll function
   and calibration tasklet and handle all periodic phy calibration
   on one place (much cleaner).

 c) Having calibration on a tasklet is better since during calibration
   we can't transmit or receive (antennas are detached to measure
   noise floor), previously calibration could run in parallel with
   tx/rx and interfere (packet loss).

 v2: kill tasklet on stop_hw, stop/wake queues
 v3: use time_is_before_eq_jiffies to compare timestamp with current
     time

Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath5k: Preserve pcicfg bits during attach
Nick Kossifidis [Mon, 10 Aug 2009 00:30:32 +0000 (03:30 +0300)]
ath5k: Preserve pcicfg bits during attach

* During attach preserve pcicfg bits when enabling pci core
   sw retry fix.

Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath5k: Wakeup fixes
Nick Kossifidis [Mon, 10 Aug 2009 00:29:02 +0000 (03:29 +0300)]
ath5k: Wakeup fixes

* Don't put chip to full sleep because there are problems during
   wakeup. Instead hold MAC/Baseband on warm reset state via a new
   function ath5k_hw_on_hold.

 * Minor cleanups

Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Tested-by: Ben Greear <greearb@candelatech.com>
Tested-by: Johannes Stezenbach <js@sig21.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath5k: Linear PCDAC code fixes
Nick Kossifidis [Mon, 10 Aug 2009 00:27:59 +0000 (03:27 +0300)]
ath5k: Linear PCDAC code fixes

* Set correct xpd curve indices for high/low gain curves during
   rfbuffer setup on RF5112B with both calibration curves available.

 * Don't return zero min power when we have the same pcdac value
   twice because it breaks interpolation. Instead return the right
   x barrier as we do when we have equal power levels for 2 different
   pcdac values.

Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Acked-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath5k: Check EEPROM before tweaking SERDES
Nick Kossifidis [Mon, 10 Aug 2009 00:26:55 +0000 (03:26 +0300)]
ath5k: Check EEPROM before tweaking SERDES

* Read PCI-E infos offset from EEPROM and if it points to
   serdes section (0x40), enable serdes programming (further tweaking
   of serdes values during attach). This follows Legacy and Sam's
   HAL sources.

Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Acked-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agort2x00: Fix beacon de-synchronization while update beacon
Igor Perminov [Sun, 9 Aug 2009 22:58:54 +0000 (00:58 +0200)]
rt2x00: Fix beacon de-synchronization while update beacon

When beacon is being updated to refresh TIM (AP mode), beacon frames are
de-synchronizing (i.e. two neighbor beacon frames - before and after
update - are being transmitted with a wrong time interval).
That is because xxx_write_beacon should disable beacon generation only
while beacon data are being uploaded to the device, but it should not
disable the beacon clock.

Signed-off-by: Igor Perminov <igor.perminov@inbox.ru>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agob43: LP-PHY: Implement STX synchronization
Gábor Stefanik [Sun, 9 Aug 2009 18:15:09 +0000 (20:15 +0200)]
b43: LP-PHY: Implement STX synchronization

The v2+ radio init (B2063) is now complete, modulo BCM4325 support.

Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agortl818x: Add some documentation to the TX desc flags
Michael Buesch [Sun, 9 Aug 2009 15:57:30 +0000 (17:57 +0200)]
rtl818x: Add some documentation to the TX desc flags

Add some TX desc flags docs.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agocfg80211: add missing device list locking
Johannes Berg [Sun, 9 Aug 2009 09:51:29 +0000 (11:51 +0200)]
cfg80211: add missing device list locking

When calling into the wext code from the NETDEV_UP
notifier, we need to hold the devlist_mtx mutex as
the wext code ends up calling into channel checks.

Reported-by: Kalle Valo <kalle.valo@iki.fi>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Tested-by: Kalle Valo <kalle.valo@iki.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: Fix regression on receiving PS poll frames
Luis R. Rodriguez [Sun, 9 Aug 2009 01:55:16 +0000 (21:55 -0400)]
ath9k: Fix regression on receiving PS poll frames

In the the patch:

ath9k: use new FIF_PSPOLL configure filter

I forgot to add the new FIF_PSPOLL to the supported mask.
Without this we mask out the FIF_PSPOLL flag therefore
we'd ignore it from mac80211.

Cc: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: remove max_bandwidth
Pat Erley [Sat, 8 Aug 2009 21:53:19 +0000 (17:53 -0400)]
mac80211: remove max_bandwidth

This removes the max_bandwidth attribute.  It is only ever
written to, and is duplicated by max_bandwidth_khz in the
regulatory code.

Signed-off-by: Pat Erley <pat-lkml@erley.org>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agort2x00: FIF_PSPOLL filter flag support
Igor Perminov [Sat, 8 Aug 2009 21:55:55 +0000 (23:55 +0200)]
rt2x00: FIF_PSPOLL filter flag support

This patch implements FIF_PSPOLL filter flag support in rt2x00 drivers,
which has been introduced in mac80211 (see
http://marc.info/?l=linux-wireless&m=124897986330807&w=2).

Signed-off-by: Igor Perminov <igor.perminov@inbox.ru>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agort2x00: Fix for race condition while update beacon
Igor Perminov [Sat, 8 Aug 2009 21:55:18 +0000 (23:55 +0200)]
rt2x00: Fix for race condition while update beacon

The patch "Implement set_tim callback for all drivers" can cause kernel
oops in rt73usb_write_beacon. The oops is caused by one of the following
race conditions:
* In case of two near calls to set_tim: rt2x00lib_beacondone_iter is
cleaning the beacon skb, whereas rt73usb_write_beacon is still using it.
* In case of two near updates of beacon: first as the result of set_tim
and second as the result of a call from an application (e.g. hostapd).
This patch fixes the race condition by rearranging the update logic and
guarding rt2x00_intf->beacon->skb with a mutex.

Signed-off-by: Igor Perminov <igor.perminov@inbox.ru>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agort2x00: Fix rounding errors in RSSI average calculation
Lars Ericsson [Sat, 8 Aug 2009 21:54:51 +0000 (23:54 +0200)]
rt2x00: Fix rounding errors in RSSI average calculation

Small changes in signal level was not detected up by the
MOVING_AVERAGE() due to a rounding error, using 'int' type.

rt2x00lib_antenna_diversity_eval:
rssi:   -62 -62 -62 -62 -62 -62 -62 -62 -62 -62 -62 -62 -62 -62 -62
rssi_avg: -57 -57 -57 -57 -57 -57 -57 -57 -57 -57 -57 -57 -57 -57 -57

The signal level reported back could be significantly (5dBm)
different from the actual value. A level +3dBm is the same as
double the AP output power.

Signed-off-by: Lars Ericsson <Lars_Ericsson@telia.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agort2x00: Fix quality houskeeping for software diversity
Lars Ericsson [Sat, 8 Aug 2009 21:54:24 +0000 (23:54 +0200)]
rt2x00: Fix quality houskeeping for software diversity

Antanna quality statistics is not handled correctly, which leads to
software diversity being shutdown completly.

The main problem is that during antenna diversity statistics can
be reset resulting in loosing the signal strength just before
evaluation.

rssi history is not updated correctly leading to incorrect comparison
material for basing antenna switching on.

Signed-off-by: Lars Ericsson <Lars_Ericsson@telia.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agort2x00: Align ieee80211 header to 4-byte boundary for PCI devices
Ivo van Doorn [Sat, 8 Aug 2009 21:53:47 +0000 (23:53 +0200)]
rt2x00: Align ieee80211 header to 4-byte boundary for PCI devices

Some hardware require the ieee80211 header to be aligned to a
4-byte boundary before mapping it to the DMA. Otherwise some
frames (like beacons) will not be send out correctly by the
device.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agort2x00: Use IEEE80211_TX_CTL_MORE_FRAMES flag
Ivo van Doorn [Sat, 8 Aug 2009 21:53:26 +0000 (23:53 +0200)]
rt2x00: Use IEEE80211_TX_CTL_MORE_FRAMES flag

Check the IEEE80211_TX_CTL_MORE_FRAMES flag to help determining
if the DMA queue should be kicked. At the moment this is combined
with the ieee80211_has_morefrags() but we might remove that later.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agort2x00: Remove usage of deprecated radio_enabled & IEEE80211_CONF_CHANGE_RADIO_ENABLED
Ivo van Doorn [Sat, 8 Aug 2009 21:53:04 +0000 (23:53 +0200)]
rt2x00: Remove usage of deprecated radio_enabled & IEEE80211_CONF_CHANGE_RADIO_ENABLED

In the config() callback function the fields radio_enabled and
the change flag IEEE80211_CONF_CHANGE_RADIO_ENABLED have been
deprecated. This removes the usage of those fields by improving
antenna change detection in the antenna configuration function.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agodrivers/net/wireless/ath/ath5k: Change constant name
Julia Lawall [Sat, 8 Aug 2009 13:22:26 +0000 (15:22 +0200)]
drivers/net/wireless/ath/ath5k: Change constant name

Elsewhere, the tqi_type field is compared to constants having a name
beginning with AR5K_TX_QUEUE, rather than AR5K_TX_QUEUE_ID.  I have thus
converted AR5K_TX_QUEUE_ID_CAB to AR5K_TX_QUEUE_CAB.  This does, however,
change the value, so perhaps something else was wanted.

Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agocfg80211: fix locking for SIWFREQ
Johannes Berg [Sat, 8 Aug 2009 09:03:58 +0000 (11:03 +0200)]
cfg80211: fix locking for SIWFREQ

"cfg80211: validate channel settings across interfaces"
contained a locking bug -- in the managed-mode SIWFREQ
call it would end up running into a lock recursion.

This fixes it by not checking that particular interface
for a channel that it needs to stay on, which is as it
should be as that's the interface we're setting the
channel for.

Reported-by: Reinette Chatre <reinette.chatre@intel.com>
Reported-by: Kalle Valo <kalle.valo@iki.fi>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Tested-by: Kalle Valo <kalle.valo@iki.fi>
Tested-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwlwifi: automatically adjust sleep level
Johannes Berg [Fri, 7 Aug 2009 22:41:51 +0000 (15:41 -0700)]
iwlwifi: automatically adjust sleep level

Depending on required latency requested by pm_qos (via mac80211)
we can automatically adjust the sleep state. Also, mac80211 has
a user-visible dynamic sleep feature where we are supposed to
stay awake after sending/receiving frames to better receive
response frames to our packets, this can be integrated into the
sleep command.

Currently, and this patch doesn't change that yet, we default
to using sleep level 1 if PS is enabled. With a module parameter
to iwlcore, automatic adjustment to changing network latency
requirements can be enabled -- this isn't yet the default due
to requiring more testing.

The goal is to enable automatic adjustment and then go into the
deepest possible sleep state possible depending on the networking
latency requirements.

This patch does, however, enable IEEE80211_HW_SUPPORTS_DYNAMIC_PS
to avoid the double-timer (one in software and one in the device)
when transmitting -- the exact timeout may be ignored but that is
not of big concern.

Note also that we keep the hard-coded power indices around for
thermal throttling -- the specification of that calls for using
the specified power levels. Those can also be selected in debugfs
to allow easier testing of such parameters.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwlwifi: display correct critical temperature infomation
Wey-Yi Guy [Fri, 7 Aug 2009 22:41:50 +0000 (15:41 -0700)]
iwlwifi: display correct critical temperature infomation

Do not send CT KILL config command twice and correct critical
temperature informatiom in dmesg

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwlwifi: fix missing EXPORT_SYMBOL
Reinette Chatre [Fri, 7 Aug 2009 22:41:49 +0000 (15:41 -0700)]
iwlwifi: fix missing EXPORT_SYMBOL

When compiling without CONFIG_IWLWIFI_DEBUGFS there is a missing
iwl_update_stats symbol. This is fixed by making this function an inline in
the case when CONFIG_IWLWIFI_DEBUGFS is not set due to the hot path in
which it is used.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwlwifi: refactor some thermal throttle code
Johannes Berg [Fri, 7 Aug 2009 22:41:48 +0000 (15:41 -0700)]
iwlwifi: refactor some thermal throttle code

Some of the thermal throttle data structures and code
are really very intermingled with the sleep (power)
control code. They really do belong together in a way
since the thermal throttle code uses powersaving to
achieve its goal, but it's making it hard to work on
the powersave code. Split this up to make that easier.
I've also changed the antenna defines to an enum and
used the same enum for RX and TX.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwlwifi: handle the case when set power fail
Wey-Yi Guy [Fri, 7 Aug 2009 22:41:47 +0000 (15:41 -0700)]
iwlwifi: handle the case when set power fail

Modify the power update function, when driver fail to set the power, it
should not continue move forward and try to change the rx chain
configuration.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwlwifi: fix legacy thermal throttling power index
Wey-Yi Guy [Fri, 7 Aug 2009 22:41:46 +0000 (15:41 -0700)]
iwlwifi: fix legacy thermal throttling power index

For legacy thermal throttling, set the new Thermal Throttling
state and change power index when thermal throttling manager detects
temperature changed. The current implementation sets the state to the
previous Thermal Throttling state, which causes system to enter wrong
power index. The worse case, it will trying to set the
lower power index when device reach critical temperature, it will cuase
issue for both system and the device.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwlwifi: fix thermal throttling locking problem
Wey-Yi Guy [Fri, 7 Aug 2009 22:41:45 +0000 (15:41 -0700)]
iwlwifi: fix thermal throttling locking problem

Move all the thermal throttling functions to background task to make
sure do not change power and rx chain in interrupt handler.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwlwifi: revert uCode Alive notification with timeout
Reinette Chatre [Fri, 7 Aug 2009 22:41:44 +0000 (15:41 -0700)]
iwlwifi: revert uCode Alive notification with timeout

commit "iwlwifi: uCode Alive notification with timeout" introduced a more
reliable mechanism for ucode loading. Unfortunately we hit a problem with
it frequently enough to make a 4965 unusable. The problem can be seen in
debug log below. What this code attempts is to set runtime ucode up to
load, start a timer to wait for the alive response from runtime ucode, and
if it times out it tries again. As can be seen below we receive the alive
response and wake the waiting task _before_ the tasks starts waiting. The
task thus times out as the alive response is not received while it is
waiting for it and it restarts the device. This starts the cycle all over
again.

[29739.000819] ieee80211 phy0: U iwl_mac_start enter
[29739.005751] ieee80211 phy0: U iwl_prepare_card_hw iwl_prepare_card_hw enter
[29739.012798] ieee80211 phy0: U iwl_set_hw_ready hardware ready
[29739.057200] ieee80211 phy0: U iwl4965_load_bsm Begin load bsm
[29739.063366] ieee80211 phy0: U iwl4965_verify_bsm Begin verify bsm
[29739.072485] ieee80211 phy0: U iwl4965_verify_bsm BSM bootstrap uCode image OK
[29739.079671] ieee80211 phy0: U iwl4965_load_bsm BSM write complete, poll 0 iterations
[29739.257019] ieee80211 phy0: I iwl_rx_reply_alive Alive ucode status 0x00000001 revision 0x1 0x9
[29739.260964] ieee80211 phy0: I iwl_rx_reply_alive Initialization Alive received.
[29739.260964] ieee80211 phy0: U __iwl_up iwlagn is coming up
[29739.278571] ieee80211 phy0: U iwl_mac_start Start UP work done.
[29739.284509] ieee80211 phy0: U iwlcore_verify_inst_sparse ucode inst image size is 788
[29739.292432] ieee80211 phy0: U iwlcore_verify_inst_sparse ucode inst image size is 10312
[29739.302004] ieee80211 phy0: U iwl_verify_ucode Initialize uCode is good in inst SRAM
[29739.309746] ieee80211 phy0: U iwl4965_hw_get_temperature Running temperature calibration
[29739.317833] ieee80211 phy0: U iwl4965_hw_get_temperature Calib values R[1-3]: -36 13522 -13496 R4: -2726
[29739.327337] ieee80211 phy0: U iwl4965_hw_get_temperature Calibrated temperature: 310K, 37C
[29739.335598] ieee80211 phy0: U iwl4965_init_alive_start Initialization Alive received.
[29739.343477] ieee80211 phy0: U iwl4965_set_ucode_ptrs Runtime uCode pointers are set.
[29739.351283] ieee80211 phy0: I iwl_rx_reply_alive Alive ucode status 0x00000001 revision 0x1 0x0
[29739.355210] ieee80211 phy0: I iwl_rx_reply_alive Runtime Alive received.
[29739.366731] iwlagn 0000:03:00.0: Runtime uCode already alive? Waiting for alive anyway
[29743.284110] iwlagn 0000:03:00.0: START_ALIVE timeout after 4000ms.
[29743.290337] ieee80211 phy0: U iwl_mac_add_interface enter: type 2
[29744.364089] iwlagn 0000:03:00.0: Runtime timeout after 5000ms
[29744.370882] ieee80211 phy0: U iwl_alive_start Runtime Alive received.
[29744.377347] ieee80211 phy0: U iwlcore_verify_inst_sparse ucode inst image size is 788
[29744.385287] ieee80211 phy0: U iwlcore_verify_inst_sparse ucode inst image size is 10312
[29744.393397] ieee80211 phy0: U iwlcore_verify_inst_sparse ucode inst image size is 94720
[29744.415835] ieee80211 phy0: U iwl_verify_ucode Runtime uCode is good in inst SRAM

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>