Gábor Stefanik [Thu, 13 Aug 2009 22:15:17 +0000 (00:15 +0200)]
b43: LP-PHY: Implement channel switching for rev0/1/B2062 radio
-Move pdiv from lpphy_2062_init to struct b43_phy_lp.
-Add channel table for the B2062 radio.
-Add code for tuning the B2062 radio to channel.
-Add error handling to op_switch_channel, and use it for both radios.
Rev0/1/B2062 will now hopefully show some signs of life, though
it won't work at full performance, as calibration is still missing.
Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Thu, 13 Aug 2009 20:31:02 +0000 (13:31 -0700)]
iwlwifi: disable PS by default
Unfortunately, PS currently affects RX performance
significantly enough to warrant disabling it by
default, but give the user the choice to enable it
again with iwconfig.
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>
iwlwifi: fix erroneous use of iwl_rx_packet.len as a length
The field called 'len' in struct iwl_rx_packet is in fact not just a length
field but also includes some flags from the flow handler. In several places
throughout the driver, this causes incorrect values to be interpreted as
lengths when the field is improperly masked.
In most situations the improper use is for debugging output, and simply results
in an erroneous message, such as:
[551933.070224] ieee80211 phy0: I iwl_rx_statistics Statistics notification received (480 vs -1367342620).
which should read '(480 vs 484)'.
In at least one case this could case bad things to happen:
Given the rampant misuse of this field without proper masking throughout the
driver (every use but one), this patch renames the field from 'len' to
'len_n_flags' to reduce confusion. It also adds the proper masking when
this field is used as a length value.
Signed-off-by: Daniel C Halperin <daniel.c.halperin@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Wey-Yi Guy [Thu, 13 Aug 2009 20:31:00 +0000 (13:31 -0700)]
iwlwifi: add thermal throttling support to 5150
Adding legacy thermal throttling management support to 5150 NIC
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>
iwlwifi: use station HT capabilities and BSS operating mode for Green-field
Green-field mode should be configured in the HT station table. This patch uses
both the per-station GF support flag as well as the current BSS HT operation
mode (non-GF stations present flag).
Added the "ht_greenfield_support" field to struct iwl_cfg to replace the
device-specific check in rs_use_green(). That check has been moved to
iwlcore_init_ht_hw_capab().
Signed-off-by: Daniel C Halperin <daniel.c.halperin@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
iwlwifi: check short GI support per-station rather than globally
Short guard interval support is a local per-station parameter not a global
per-NIC parameter. (mac80211 will correctly remove SGI support from station
capabilities if the BSS does not permit it). This patch removes the short GI
support bitfield from the global iwl_ht_info struct and properly uses
per-station HT capabilities during rate selection.
Signed-off-by: Daniel C Halperin <daniel.c.halperin@intel.com> Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
iwlwifi: configure HT40 channels in iwl_mac_config
As indicated by note in iwl_ht_conf, some HT parameters are set on association
(e.g., channel width) and some vary over time (HT protection mode) and per
station (e.g., short GI support). The global parameters should be set in
iwl_mac_config and the local/varying parameters in iwl_ht_conf.
This patch moves the channel width configuration from iwl_ht_conf to
iwl_mac_config, and defers further cleanup of the local/global conflation for a
later patch.
This fixes a bug in using HT40 channels in some modes.
Signed-off-by: Daniel C Halperin <daniel.c.halperin@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This patch fixes a number of issues in iwl_rx_reply_rx and
iwl_pass_packet_to_mac80211. These issues stem from the complexities of
managing two different types of packet commands for different hardware.
- Unify code handling rx_phy_res in SKB or cached to eliminate redundancy and
remove potential NULL pointer accesses
- Replace magic number with proper constant
- Optimize functions by moving early exit conditions before computation
- Comment code and improve some variable names
- Remove redundant computation in iwl_pass_packet_to_mac80211 by passing in the
correct, already-computed arguments.
Signed-off-by: Daniel C Halperin <daniel.c.halperin@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Thu, 13 Aug 2009 20:30:55 +0000 (13:30 -0700)]
iwlwifi: remove unused members of iwl_ht_info
Some members of iwl_ht_info are unused, and one of
them is write-only, so we can remove these three:
max_amsdu_size, ampdu_factor and mpdu_density.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Daniel C Halperin <daniel.c.halperin@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Wey-Yi Guy [Thu, 13 Aug 2009 20:30:54 +0000 (13:30 -0700)]
iwlwifi: traverse linklist to find the valid OTP block
For devices using OTP memory, EEPROM image can start from
any one of the OTP blocks. If shadow RAM is disabled, we need to
traverse link list to find the last valid block, then start the EEPROM
image reading.
If OTP is not full, the valid block is the block _before_ the last block
on the link list; the last block on the link list is the empty block
ready for next OTP refresh/update.
If OTP is full, then the last block is the valid block to be used for
configure 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>
Zhu Yi [Thu, 13 Aug 2009 20:30:53 +0000 (13:30 -0700)]
iwlwifi: cleanup HT40 extension channels setup
The patch cleans up the HT40 extension channels setup for EEPROM
band 6 and 7 to make it more readable.
Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
iwlwifi: include HT configuration when adding stations through rs_rate_init
Driver's first notification of a new station from mac80211 can be through rate
selection API. This patch fixes a bug where, in this code path, the HT
capabilities of the new station were ignored.
Signed-off-by: Daniel C Halperin <daniel.c.halperin@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
The tx_chan_width entry is never used, supported_chan_width is used instead.
Signed-off-by: Daniel C Halperin <daniel.c.halperin@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Reinette Chatre [Thu, 13 Aug 2009 20:30:50 +0000 (13:30 -0700)]
iwlwifi: prevent read outside array bounds
With EDCA and HCCA we have 16 potential tid values. This is accommodated by
mac80211, but iwlwifi only supports EDCA. With this implementation it is
thus possible for mac80211 to request a tid that will cause iwlwifi to read
outside array bounds. A similar problem exists if traffic is received in an
unsupported category.
We add error checking to catch these situations.
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jussi Kivilinna [Thu, 13 Aug 2009 17:39:31 +0000 (20:39 +0300)]
cfg80211: export cfg80211_wext_siwfreq
cfg80211_wext_siwfreq() should be exported with EXPORT_SYMBOL_GPL.
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>