Commit graph

15626 commits

Author SHA1 Message Date
Joerg Albert
229a7ef7c2 ar9170: remove unnecessary call to ar9170_set_beacon_timers
Signed-off-by: Joerg Albert <jal2@gmx.de>
Acked-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-28 14:40:41 -04:00
Joerg Albert
ea39d1a402 ar9170: cleanup of bss_info_changed and beacon config
Add beacon control by BSS_CHANGED_BEACON_ENABLED and
bss_conf->enable_beacon from mac80211.

Signed-off-by: Joerg Albert <jal2@gmx.de>
Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-28 14:40:41 -04:00
Reinette Chatre
c1eb2c82e5 ipw2x00: update contact information
Intel Linux wireless folks can be reached via this address.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Acked-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-28 14:40:40 -04:00
Wey-Yi Guy
5bddf54962 iwlwifi: fix unloading driver while scanning
If NetworkManager is busy scanning when user
tries to unload the module, the driver can not be unloaded
because HW still scanning.

Make sure driver sends abort scan host command to uCode if it
is in the middle of scanning during driver unload.

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>
2009-08-28 14:40:39 -04:00
Abhijeet Kolekar
b2ccb4dbe7 iwlwifi: fix remove key error
Fix following error by sending synchronous command and waiting for the command
to complete.

mac80211-phy0: failed to remove key (0, ff:ff:ff:ff:ff:ff) from hardware (-16).

-16 is EBUSY error. The asynchronous command tests for STATUS_EXIT_PENDING
while interface is getting down and it returns -EBUSY error if set.
Changing the host command from asynchronous call to synchronous call
enables command to be run while interface is going down.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-28 14:40:39 -04:00
Wey-Yi Guy
ab9fd1bf76 iwlwifi: read enhanced tx power info from EEPROM image
For 6000 series and up, additional enhanced regulatory tx power
limitation information is added to EEPROM image.

In order to setup the tx power limitation per channel correctly. Read
the enhanced tx power information from EEPROM image and update
accordingly.

The information is provided per SISO (a,b,c) chain based, it also has
information for both MIMO2 and MIMO3. For tx power regulatory
limitation, take the highest number from all the chains and update.
Also update tx_power_user_lmt to the highest power supported by any
channels and chains

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>
2009-08-28 14:40:39 -04:00
Wey-Yi Guy
c4d9b50986 iwlwifi: remove duplicated define
Remove duplicated define "STA_FLG_PWR_SAVE_MSK"

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>
2009-08-28 14:40:38 -04:00
Daniel C Halperin
c5f8cdb72e iwlwifi: set HT flags in ieee80211_rx_status for received packets
Add code to set the HT flags (HT, 40 MHz, Short guard interval) in
the ieee80211_rx_status field passed to mac80211.  This ensures that mac80211
processes these HT packets correctly.

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>
2009-08-28 14:40:38 -04:00
Daniel C Halperin
7ebaeff8ae iwlwifi: clear rate control flags on non-HT packet
Clear the flags (most importantly, the IEEE80211_TX_RC_MCS flag)
when sending a non-HT packet so that the rate index can be properly treated.
This fixes the reporting of legacy rates in wireless-extensions for packets
sent after an HT packet.

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>
2009-08-28 14:40:38 -04:00
Wey-Yi Guy
f204b2487e iwlwifi: show current tx power
debugFs file show current tx power for all the transmit chains

Adding "tx_power" file in /sys/kernal/debug/ieee80211/phy0/iwlagn/debug
to display current tx power for all the active chains in 1/2 dB step.

Show tx power information "Not available" if uCode can not provide the
information or interface is down.

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>
2009-08-28 14:40:37 -04:00
Wey-Yi Guy
fcbaf8b06d iwlwifi: change IWL6000_UCODE_API_MAX to v4
uCode version changed to v4 for 6000 series

The additional parameter added to v4 is providing current tx power for
each chain in tx statistics portion of "statistics notification"
command.

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>
2009-08-28 14:40:37 -04:00
Wey-Yi Guy
5eadd94bd4 iwlwifi: error checking for setting tx_power in sysfs
Perform error checking and report failure when setting tx power from
sysfs.
If fail to set the tx power, do not update the local copy, so user will
not see the incorrect tx power in sysfs

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>
2009-08-28 14:40:37 -04:00
Wey-Yi Guy
dc1b097332 iwlwifi: name changes from "tx_power_channel_lmt" to "tx_power_device_lmt"
Changing the name from "tx_power_channel_lmt" to "tx_power_device_lmt";
to give idea that scope of limit is for overall device, not any
individual channels

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>
2009-08-28 14:40:37 -04:00
Wey-Yi Guy
08f2d58d0e iwlwifi: do not allow set tx power over channel power limit
When setting tx power in sysfs, check against max channel tx power
limit instead of IWL_TX_POWER_TARGET_POWER_MAX.

Different devices have different max tx power limit; using
IWL_TX_POWER_TARGET_POWER_MAX can excess the limitaion and give wrong
information.

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>
2009-08-28 14:40:36 -04:00
Wey-Yi Guy
02eec9c5a1 iwlwifi: set default tx power user limit to minimal
Set the tx_power_user_lmt to the lowest power level
this value will get overwritten by channel's max power avg
from eeprom

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>
2009-08-28 14:40:36 -04:00
Gábor Stefanik
aa065263ec iwlwifi: Make injection of non-broadcast frames work again
Commit 1ccb84d87d04df3c76cd4352fe69786d8c7cf016 by Wey-Yi Guy
("iwlwifi: clean up unused NL80211_IFTYPE_MONITOR for Monitor mode")
broke injection of non-broadcast frames to unassociated stations
(causing a SYSASSERT for all such injected frames), due to injected
frames no longer automatically getting a broadcast station ID assigned.
This patch restores the old behavior, fixing the aforementioned
regression.

Also, consistently check for IEEE80211_TX_CTL_INJECTED instead of
iwl_is_monitor_mode in the TX path, as TX_CTL_INJECTED specifically
means that a given packet is coming from a monitor interface, while
iwl_is_monitor_mode only shows whether a monitor interface exists
on the device.

Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
Acked-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-28 14:40:36 -04:00
Marek Vasut
9d45368a38 libertas: Add support for Marvell Libertas CF8305
The CF8305 is a very old silicon running firmware version 3.0 . This card also
needs some special treatment as it's so old it can't do unaligned register
access. But since that happens only at one place, there were no changes made to
the register access functions, but instead that particular place was fixed.
Also, this card uses only one-stage firmware which is loaded the same way as
helper firmware. The second-stage firmware isn't loaded on this card and doesn't
therefore have to be supplied.

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-28 14:40:35 -04:00
Dan Williams
ca4fe30097 libertas: clean up and clarify get_common_rates
Clarify what the heck the function is doing with better variable names
and less indirection and better comments.  Also ensure callers use the
proper minimum size, even though all rates arrays should be size
MAX_RATES anyway.  Reverts part of Andrey's dynamic alloc patch since we
don't really need it.  Also leaves the passed-in rates array alone on
errors.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-28 14:40:35 -04:00
Roel Kluin
1e3d31c589 libertas: Read buffer overflow
Check whether index is within bounds before testing the element.

(also includes "Libertas: Association request to the driver failed"

The size of the tmp buffer was too small, causing a regression

rates->rates has an arraysize of 1, so a memcpy with
MAX_RATES (14) was already causing reads out of bounds.

In get_common_rates() the memset/memcpy can be moved upwards. -- JWL)

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Tested-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-28 14:40:35 -04:00
Sujith
3d832611d7 ath9k: Fix chainmask selection during scanning
The TX/RX chainmasks were set to 1x1 during scanning.
Configure them properly with the values retrieved from
the EEPROM.

Also, this requires scan_start/scan_end callbacks to be
locked with sc->mutex.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-28 14:40:30 -04:00
John W. Linville
b0a4e7d8a2 libipw: switch from ieee80211_* to libipw_* naming policy
This eliminates the dual definition of ieee80211_channel (and possibly
others), further clarifying who defines what and paving the way for
inclusion of cfg80211.h.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-28 14:40:28 -04:00
Jussi Kivilinna
40ba60ddfe rndis_wlan: fix broken logic in add_wep_key()
add_wep_key() tries to check if key length is not 5 AND not 13
but uses (key_len != 5 || key_len != 13) instead. Fix this.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-28 14:40:25 -04:00
Javier Cardona
5eb6ba83aa ath9k: Add support FIF_OTHER_BSS filtering mode.
Support for FIF_OTHER_BSS was missing.  This patch adds support for this
filtering mode which in turn resolves a problem where mesh interfaces would not
receive broadcast traffic.

Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-28 14:40:24 -04:00
Christian Lamparter
90d6f92828 p54: fix broadcast buffering in AP mode
The patch "mac80211: fix PS-poll response race" somehow broke
broadcast buffering in a funny way.

During normal operation - stations are awake - the firmware refused
to transmit broadcast frames and reported P54_TX_PSM_CANCELLED.
But everything worked as soon as one station entered PSM.

The reason:
The stack sets IEEE80211_TX_CTL_SEND_AFTER_DTIM for outgoing
broadcast frames as soon as a station is marked as sleeping.
This flag triggers a path which will reroute these frames
into p54's "content after beacon" queue, which is designed
to cope with the demands for psm.

This patch restores the old behavior.

IEEE80211_TX_CTL_CLEAR_PS_FILT will once again be used to signalize
the firmware to ignore the ps canceling for certain frames.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-28 14:40:23 -04:00
Ben Hutchings
5c8af3b9aa sfc: Improve reliability of RX queue flushing
Reconfiguring the port requires us to flush all DMA queues.  In
repeated testing we have found that RX flushes would sometimes fail
because the RX DMA engine was not properly isolated from the MACs.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-26 17:38:59 -07:00
Ben Hutchings
cc11763b35 sfc: Work around XMAC bug causing packet loss with some peers
Received frames must be re-clocked by the local XGXS to the 156.25 MHz
(DDR) clock of the XGMII.  If the remote clock is slightly faster this
can reduce a minimum IPG of 64 bit-times (1 cycle) to 32 bit-times
(half a cycle).  If the XMAC detects that a frame has reached the
maximum RX frame length in the same cycle that it receives one of
these reduced IPGs, it may miss the IPG, causing two valid frames to
be treated as a single invalid frame (over-length with bad CRC).

We work around this by increasing the maximum RX frame length so that
peers with matched MTU will not provoke this bug.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-26 17:38:56 -07:00
Ben Hutchings
5afaa753d6 sfc: QT2025C: Use hard reset only
At probe time, falcon_reset_hw() performs a hard reset of the PHY
along with Falcon.  There is no need to perform a soft reset later,
and any access to standard MDIO registers before the PHY firmware has
booted can interrupt the boot process, making the port unusable.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-26 17:38:54 -07:00
Ben Hutchings
771046d7b1 mdio: Check MDIO_STAT1_FAULT in mdio45_links_ok()
Some PHYs will report that the link is up even though there is a fault
condition.  Therefore, check the fault flag too.  We must also read
STAT2 to reset this flag.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-26 17:38:53 -07:00
Ben Hutchings
d4ec09acdb sfc: Do not reinitialise XAUI serdes before it has completed reset
falcon_reset_xaui() waits for XGXS reset to complete, but the XAUI
serdes reset may take longer.  It needs to check both reset active
bits.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-26 17:38:51 -07:00
Ben Hutchings
aed0628dae sfc: Fix ordering of device registration and initial netif_carrier_off()
We must call netif_carrier_off() after the device is registered, not
before, to set the operational state and user-space IFF_RUNNING flag
correctly.

Since we don't want observers to see an intermediate state, open-code
register_netdev() and add efx_update_name() and netif_carrier_off()
into the locked region.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-26 17:38:49 -07:00
Matt Carlson
f656f39801 tg3: Update version to 3.100
This patch updates the tg3 version to 3.100.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-26 15:48:08 -07:00
Matt Carlson
d9221e6600 broadcom: Make the 57780 IEEE compliant
This brings the 57780's phy into IEEE compliance by suppressing the
common mode oscillation.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-26 15:48:06 -07:00
Matt Carlson
d7a2ed9248 broadcom: Add AC131 phy support
This patch adds support for the AC131 fast ethernet transceiver.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-26 15:48:05 -07:00
Matt Carlson
4f4598fd0a broadcom: Add BCM50610M support
This patch adds support for the BCM50610M phy ID.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-26 15:48:03 -07:00
Matt Carlson
7f97a4bd47 tg3: Convert code to use PHY_IS_FET
This patch converts the code to use the PHY_IS_FET flag rather than the
ASIC revision to decide whether or not to use FET paths.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-26 15:48:00 -07:00
Matt Carlson
535ef6e112 tg3: Create MII_TG3_FET namespace
Broadcom's phys come in two distinctly different register layouts.  For
the lack of an official term to distinguish between the two formats, we
can loosely categorize them by their fast ethernet or gigabit ethernet
transceiver description.  This patch creates the (driver-internal) Fast
Ethernet Transceiver (FET) namespace and converts the 5906 EPHY
definitions over.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-26 15:47:58 -07:00
Matt Carlson
bb85fbb6a9 tg3: Tune 5785 clock switching
This patch tunes the timeouts the CPMU uses to decide when to switch
from the clocks output by the PHY to internal clock sources.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-26 15:47:56 -07:00
Matt Carlson
5e7ccf2003 tg3: Add 57788, remove 57720
This patch adds support for the 57788 and removes support for the 57720
which was never released.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-26 15:47:53 -07:00
Matt Carlson
e712699734 tg3: Preserve PCIe MPS setting for new devs
Most older tg3 devices only supported a PCIe maximum payload size of
128 bytes.  More recent devices bump this limit up to 256 bytes
though.  This patch modifies the code so that the MPS limit is only
enforced on those devices that only allow the 128 byte setting.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-26 15:47:53 -07:00
Matt Carlson
29ea095fb7 tg3: Fix TSO test against wrong flags var
Julia Lawall discovered that the TG3_FLG2_TSO_CAPABLE flag was being
compared against the wrong flags device member.  This patch implements
the fix.

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-26 15:47:51 -07:00
Matt Carlson
255ca311b6 tg3: Prevent tx BD corruption
This patch prevents a tx BD corruption bug by preventing the device from
powering down the PLL from L1 if the link speed is 10Mbps or 100Mbps.

The same bits are also used to prevent a system hang during chip reset
resulting from a complicated set of events that ultimately leads to
PCIe block register corruption.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-26 15:47:47 -07:00
Matt Carlson
521e6b90dd tg3: Fix 57780 asic rev PCIe link receiver errors
This patch fixes some PCIe link receiver errors by decreasing the internal
electrical idle timeout.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-26 15:47:45 -07:00
Graham, David
c46b59b241 e1000: Remove unused function e1000_mta_set.
Remove function e1000_mta_set, as it is no longer called

Signed-off-by: Dave Graham <david.graham@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-26 15:36:51 -07:00
Alexander Duyck
cd1da50384 igb/ixgbe: add IPV6_CSUM support to vlan_features
We were already exporting TSO6 to the vlan, but we weren't exporting the
checksum support for IPV6 which was causing warning messages to be
displayed when doing IPv6 TSO over a vlan.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-26 15:36:50 -07:00
Don Skidmore
7b25cdbafd ixgbe: cleanup functions that should have been defined static
We have some ~40 functions that were being called out with 'make
namespacecheck'.  This patch changes these functions to be static.

Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-26 15:36:46 -07:00
Mallikarjuna R Chilakala
46a72b3514 ixgbe: Fix isues while reporting 8259x backplane link capabilities
Fix ethtool get_settings logic to report 10G & 1G advertised and
supported link modes in all 8259x 10G backplane connection types
except for 82598EB BX network connection type.

Signed-off-by: Mallikarjuna R Chilakala <mallikarjuna.chilakala@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>
2009-08-26 15:36:45 -07:00
Narender Kumar
fa3ce355c1 netxen: bridged mode optimizations
When the interface is put in bridged mode, destination mac
addresses are unknown to firmware. So packets take a slow
path (lower priority) in firmware reducing performance.

Firmware can cache limited number of remote unicast mac
addresses for certain interval, if "dynamic mac learning"
mode is enabled.

Driver needs to enable this "mac learning" mode in firmware.
Currently this is done through net device class sysfs entry,
possibly this can also be done upon netlink notifications to
from bridge.

Signed-off-by: Narender Kumar <narender.kumar@qlogic.com>
Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-26 15:29:21 -07:00
Dhananjay Phadke
3ad4467ca4 netxen: remove netxen_nic_niu.c
Consolidate all MAC/PHY access functions into netxen_nic_hw.c

Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-26 15:29:19 -07:00
Dhananjay Phadke
c9517e5893 netxen: implement generic pcie semaphore functions
Implement common function for locking/unlocking 8 hardware
semaphores used for serializing access to shared resouces
on a NIC board by different PCI functions.

As by definition, callers of these semaphore API can be
put to sleep till the semaphore is locked.

Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-26 15:29:17 -07:00
Dhananjay Phadke
cb7e4b6e37 netxen: remove unused code
Remove code for phy access on unreleased NX2031 based quad-gig board.

NX3031 based production quad-gig boards do not require direct phy
access by driver.

Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-26 15:29:15 -07:00
Florian Fainelli
9818f660f4 r6040: bump to version 0.25 and 20 August 2009 release date
Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-23 19:16:32 -07:00
Mark Kelly
e03f614af7 r6040: move down second PHY detection to r6040_init_one
Instead of fully initializing an unusable second r6040
device, perform the PHY detection earlier and bail out
in r6040_init_one when we could not read the PHY identifier.

Signed-off-by: Mark Kelly <mark@bifferos.com>
Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-23 19:16:28 -07:00
Mark Kelly
d516478ff6 r6040: remove unused pioaddr variable
This patch removes the unused pioaddr variable.

Signed-off-by: Mark Kelly <mark@bifferos.com>
Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-23 19:16:26 -07:00
Dhananjay Phadke
7d6fd5e7e9 netxen: remove netxen_nic_phan_reg.h
Consolidate register definitions in netxen_nic_hdr.h

Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-23 19:00:29 -07:00
Amit Kumar Salecha
22b5794b5d netxen: implement pci driver shutdown
Implement pci driver shutdown functionality, this helps
quiescing all PCI transaction before chipset is reset.

Amit Kumar Salecha <amit@qlogic.com>
Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-23 19:00:26 -07:00
Dhananjay Phadke
ce644ed4db netxen: refactor tx dma mapping code
Move all tx skb mapping code into netxen_map_tx_skb().

Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-23 19:00:25 -07:00
Dhananjay Phadke
1dbc84a7f6 netxen: fix firmware reset logic
If netxen_need_fw_reset() return 0 [ implies firmware is up
and running], still go through dma mask check, etc.

Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-23 19:00:22 -07:00
Narender Kumar
1bb482f8a4 netxen: ethtool statistics and control for LRO
Add ethtool -K knob to control LRO in firmware.
LRO path is completely separated from GRO, LRO packets
are still fed with netif_receive_skb().

Also fix ethtool statistics to include LRO packets.
Also use correct message type while configuring interrupt coalescing.

Signed-off-by: Narender Kumar <narender.kumar@qlogic.com>
Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-23 19:00:20 -07:00
Michael Chan
8fea0f0db8 bnx2: Update version to 2.0.2.
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-22 17:48:55 -07:00
Michael Chan
0ced9d01d1 bnx2: Use const on flash_table structure.
The structure, once initialized, never changes.

Signed-off-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-22 17:48:54 -07:00
Michael Chan
cf7474a6f4 bnx2: Refine coalescing parameters.
- Set the USE_INT_PARAM bit so the rx-frames-irq and tx-frames-irq will take
  effect on 5709.
- Increase the default rx-frames to reduce interrupt count.
- Decrease the default rx-frames-irq and tx-frames-irq to catch more events
  during NAPI poll.

All these will reduce interrupts without affecting latency.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-22 17:48:53 -07:00
Michael Chan
790dab2f67 bnx2: Report FTQ discard counter.
Report this counter to ethtool -S and include it in netstat.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-22 17:48:49 -07:00
Michael Chan
61d9e3fa7e bnx2: Apply BROKEN_STATS workaround to 5706 and 5708.
Add flag to expand the workaround to both chips.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-22 17:48:48 -07:00
Michael Chan
6fefb65e78 bnx2: Close device if MTU change or ring size change fails.
When unable to allocate memory for new MTU or new ring size, we need
to close the device to prevent it from crashing.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-22 17:48:47 -07:00
Michael Chan
3767546cc2 bnx2: Check if_running() before touching chip registers.
Add this check to bnx2_netif_stop() and bnx2_vlan_rx_register() to
prevent bus lockups on some systems when the chip is in low power state.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-22 17:48:42 -07:00
Michael Chan
155d5561f5 bnx2: Zero out status block before chip reset.
In case IRQs are shared, we will not mistakenly start processing
the ring based on old status block indices.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-22 17:48:41 -07:00
David S. Miller
f8f2109d4f Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 2009-08-21 01:56:56 -07:00
Lennert Buytenhek
a145d57583 mwl8k: update copyright and version number
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:38:13 -04:00
Lennert Buytenhek
ab565790cb mwl8k: remove mwl8k_queue_work()
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:38:13 -04:00
Lennert Buytenhek
e6935ea104 mwl8k: get rid of mwl8k_configure_filter() workqueue use
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:38:12 -04:00
Lennert Buytenhek
954ef509cc mwl8k: get rid of mwl8k_get_stats() workqueue use
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:38:12 -04:00
Lennert Buytenhek
3e4f542cfb mwl8k: get rid of mwl8k_conf_tx() workqueue use
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:38:11 -04:00
Lennert Buytenhek
733d3067d3 mwl8k: get rid of mwl8k_set_rts_threshold() workqueue use
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:38:10 -04:00
Lennert Buytenhek
3a980d0a50 mwl8k: get rid of mwl8k_bss_info_changed() workqueue use
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:38:09 -04:00
Lennert Buytenhek
ee03a93241 mwl8k: get rid of mwl8k_config() workqueue use
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:38:09 -04:00
Lennert Buytenhek
d3cea0b85a mwl8k: get rid of mwl8k_stop() workqueue use
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:38:09 -04:00
Lennert Buytenhek
2ec610cb6d mwl8k: get rid of mwl8k_start() workqueue use
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:38:08 -04:00
Lennert Buytenhek
618952a7b1 mwl8k: fix firmware command serialisation
The current mwl8k_priv->fw_lock spinlock doesn't actually protect
against multiple commands being submitted at once, as it is not kept
held over the entire firmware command submission.  And since waiting
for command completion sleeps, we can't use a spinlock anyway.

To fix mwl8k firmware command serialisation properly, we have the
following requirements:
- Some commands require that the packet transmit path is idle when
  the command is issued.  (For simplicity, we'll just quiesce the
  transmit path for every command.)
- There are certain sequences of commands that need to be issued to
  the hardware sequentially, with no other intervening commands.

This leads to an implementation of a "firmware lock" as a mutex that
can be taken recursively, and which is taken by both the low-level
command submission function (mwl8k_post_cmd) as well as any users of
that function that require issuing of an atomic sequence of commands,
and quiesces the transmit path whenever it's taken.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:38:08 -04:00
Lennert Buytenhek
950d5b0191 mwl8k: mwl8k_queue_work() cleanup
Delete most of the mwl8k_work_struct fields and options, since most
of them are unused or never changed from their defaults:
- We always use priv->config_wq, so delete the wqueue argument from
  mwl8k_queue_work().
- MWL8K_WQ_SPIN and MWL8K_WQ_POST_REQUEST are never used, as all
  callers sleep for request completion, so sleep unconditionally.
- MWL8K_WQ_FREE_WORKSTRUCT is never used.
- MWL8K_WQ_TX_WAIT_EMPTY is always set, so assume it unconditionally.
- timeout_ms/txwait_attempts/tx_timeout_ms are never changed from
  their defaults, so just hardcode these in the workqueue worker.
- step is never used.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:38:08 -04:00
Lennert Buytenhek
23b339062f mwl8k: mwl8k_txq_xmit() rework
Various mwl8k_txq_xmit changes:
- Extract the QoS field before adding the DMA header.
- Only write to tx->status once, and only after all the other
  descriptor fields have been set.
- Do all tx state manipulation under the tx spinlock.
- Remove the priv->inconfig check, as all transmit queues will
  be frozen during config cycles, so we won't ever be asked to
  transmit if a config cycle is running.
- Remove some more dead code.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:38:07 -04:00
Lennert Buytenhek
7595d67a06 mwl8k: implement idle mode
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:38:07 -04:00
Lennert Buytenhek
361c55cfad mwl8k: no need to hold ->tx_lock while setting the hardware interrupt mask
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:38:07 -04:00
Lennert Buytenhek
c3f967d301 mwl8k: don't hardcode the number of transmit queues
Use MWL8K_TX_QUEUES instead of a hardcoded "4" in a couple of places.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:38:06 -04:00
Lennert Buytenhek
d4b7057052 mwl8k: don't touch 'command done' interrupt during firmware load
Since firmware load commands don't generate 'command done' interrupts
like normal commands do, polling for command done interrupts just
unnecessarily slows down the firmware load process.  Removing this bit
of code speeds up loading a typical firmware image from 840 msec to
180 msec.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:38:06 -04:00
Lennert Buytenhek
76266b2ad3 mwl8k: dma header manipulations can't fail
Adding and removing the DMA header that the mwl8k hardware requires
on tx and provides on rx can never fail, since we are guaranteed to
have enough headroom on the tx path to expand the packet, and we only
ever shrink the packet on the rx path.  (And on both paths we are
guaranteed to be the only user of the skb we are handling.)

This allows removing all of the skb clone handling in the tx and tx
reclaim paths, and eliminates error checks in both the tx and rx
paths, simplifying the code a bit more.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:38:06 -04:00
Lennert Buytenhek
240e86efd6 mwl8k: ->add_interface() is not called for monitor interfaces
There is no need to check for NL80211_IFTYPE_MONITOR in
->add_interface(), as this function is never called for monitor
interfaces.  Also, there is no need to advertise this bit in our
wiphy's ->interface_modes.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:38:05 -04:00
Lennert Buytenhek
e81cd2d664 mwl8k: fix mwl8k_configure_filter() parameter lifetime issue
mwl8k_configure_filter() passes pointers to total_flags and the
multicast address list to a workqueue function, while there is no
guarantee that those pointers will still be valid by the time the
workqueue function runs.

Solve this by passing total_flags by value, and by passing an
already built multicast address setup command packet to the workqueue
function so that we don't have to look at the multicast address list
itself outside of mwl8k_configure_filter().

Also, since ->configure_filter() can sleep now, wait synchronously
for the worker to finish.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:38:05 -04:00
Lennert Buytenhek
5539bb5129 mwl8k: remove MWL8K_*_SLOTTIME defines
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:38:05 -04:00
Lennert Buytenhek
0439b1f556 mwl8k: remove MWL8K_WMM_* defines
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:38:05 -04:00
Lennert Buytenhek
68ce38845c mwl8k: remove MWL8K_RADIO_*_PREAMBLE defines
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:38:04 -04:00
Lennert Buytenhek
c46563b714 mwl8k: remove MWL8K_RADIO_* defines
Instead of passing a flag bitmask to mwl8k_cmd_802_11_radio_control,
pass the 'enable' and 'force' arguments as separate parameters, and
introduce wrappers for the common cases of enabling and disabling
without forcing.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:38:04 -04:00
Lennert Buytenhek
ce9e2e1b84 mwl8k: various coding style cleanups
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:38:04 -04:00
Lennert Buytenhek
ff45fc60ad mwl8k: sort firmware command list by opcode, and trim unused commands
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:38:04 -04:00
Lennert Buytenhek
d89173f252 mwl8k: s/IEEE80211_ADDR_LEN/ETH_ALEN/g
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:38:03 -04:00
Lennert Buytenhek
c23b5a6994 mwl8k: remove various unused struct members and defines
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:38:03 -04:00
Vasanthakumar Thiagarajan
22e66a4c15 ath9k: Nuke struct ath9k_node_stats
Other than ns_avgbrssi (Average beacon rssi) no data of
ath9k_node_stats is being used anywhere. Nuke this structure
and move its only useful member to ar5416Anistate. Also cleanup
this redundant data in ath_softc.

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:36:08 -04:00
Vasanthakumar Thiagarajan
ff36041652 ath9k: Fix bug in retrieving average beacon rssi
Currently the beacon rssi that LPF gives is divided and rounded
up by ATH_RSSI_EP_MULTIPLIER twice. This will leave the incorrect rssi
in ANI. Having correct rssi in ANI fixes the connection stability at
< 30dB rssi range. This patch removes the unncessary computation of average
rssi over already valid average rssi. Also removes the redundant macros to
find average rssi.

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:36:08 -04:00
gregor kowski
035d0243eb b43: add hardware tkip
This add hardware tkip for b43.

Signed-off-by: Gregor Kowski <gregor.kowski@gmail.com>
Acked-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:36:08 -04:00
Gábor Stefanik
5904d20676 b43: LP-PHY: Implement spec updates and remove resolved FIXMEs
Larry has started re-checking all current routines against a new
version of the Broadcom MIPS driver. This patch implements the first
round of changes he documented on the specs wiki.

Also remove a few FIXMEs regarding missing initial values for variables
with dynamic initial values where reading the values has been implemented.

Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:36:07 -04:00
David Kilroy
30fab9e0ae orinoco: remove spare whitespace
Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:36:07 -04:00
Christian Lamparter
eeef41854d ar9170: refactor configure_filter
Thanks to "mac80211: allow configure_filter callback to sleep",
we no longer have to defer the work to the workqueue.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:36:06 -04:00
Gábor Stefanik
5791ce18aa b43: LP-PHY: Two small spec updates
The specs are beginning to support rev3 LP-PHYs - implement one of
the changes needed for rev3 support.
Also, in the new MIPS driver, the "Japan TX filter" was renamed to
"analog TX filter init" - however, calling it "init" is confusing,
so name it "set analog filter", with a comment for easier future
identification.

Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:36:06 -04:00
Ivo van Doorn
d904dc1749 rt2x00: bss_info_changed() callback is allowed to sleep
The bss_info_changed() callback function no longer needs
to be atomic. Remove the scheduled work structure and
call into the driver directly.

Additionaly this makes the DRIVER_REQUIRE_SCHEDULED
flag redundant so it can be removed.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:36:05 -04:00
Ivo van Doorn
afa620429a rt2x00: configure_filter() callback is allowed to sleep
The configure_filter() callback function no longer needs
to be atomic. Remove the scheduled work structure and
call into the driver configure_filter() directly.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:36:05 -04:00
Reinette Chatre
21f8a73f82 ipw2x00: fix sparse warnings
This fixes:

  CHECK   drivers/net/wireless/ipw2x00/ipw2100.c
drivers/net/wireless/ipw2x00/ipw2100.c:7888:22: warning: symbol 'mode' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2100.c:188:12: originally declared here
drivers/net/wireless/ipw2x00/ipw2100.c:7952:18: warning: symbol 'mode' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2100.c:188:12: originally declared here
drivers/net/wireless/ipw2x00/ipw2100.c:8000:18: warning: symbol 'mode' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2100.c:188:12: originally declared here
drivers/net/wireless/ipw2x00/ipw2100.c:8268:27: warning: symbol '_min1' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2100.c:8268:27: originally declared here
drivers/net/wireless/ipw2x00/ipw2100.c:8268:27: warning: symbol '_min1' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2100.c:8268:27: originally declared here
drivers/net/wireless/ipw2x00/ipw2100.c:8268:27: warning: symbol '_min2' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2100.c:8268:27: originally declared here
  CC [M]  drivers/net/wireless/ipw2x00/ipw2100.o
  CHECK   drivers/net/wireless/ipw2x00/ipw2200.c
drivers/net/wireless/ipw2x00/ipw2200.c:847:13: warning: symbol 'led' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:92:12: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:891:13: warning: symbol 'led' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:92:12: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:935:13: warning: symbol 'led' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:92:12: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:980:13: warning: symbol 'led' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:92:12: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:1016:13: warning: symbol 'led' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:92:12: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:1051:13: warning: symbol 'led' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:92:12: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:1823:13: warning: symbol 'channel' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:86:12: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: warning: symbol '_min1' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: warning: symbol '_min1' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: warning: symbol '_min1' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: warning: symbol '_min1' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: warning: symbol '_min2' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: warning: symbol '_min1' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: warning: symbol '_min1' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: warning: symbol '_min2' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: warning: symbol '_min1' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: warning: symbol '_min2' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: warning: symbol '_min2' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: warning: symbol '_min1' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: warning: symbol '_min1' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: warning: symbol '_min1' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: warning: symbol '_min2' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: warning: symbol '_min1' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: warning: symbol '_min2' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: warning: symbol '_min2' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: warning: symbol '_min1' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: warning: symbol '_min1' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: warning: symbol '_min2' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: warning: symbol '_min1' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: warning: symbol '_min2' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: warning: symbol '_min2' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: warning: symbol '_min2' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:4268:19: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:6228:28: warning: symbol 'channel' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:86:12: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:6369:20: warning: symbol 'channel' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:86:12: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:6857:12: warning: symbol 'mode' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:87:12: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:7964:13: warning: symbol 'channel' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:86:12: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:8720:12: warning: symbol 'channel' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:86:12: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:9662:13: warning: symbol 'mode' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:87:12: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:9720:13: warning: symbol 'mode' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:87:12: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:9826:13: warning: symbol 'mode' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:87:12: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:10318:21: warning: symbol 'remaining_bytes' shadows an earlier one
drivers/net/wireless/ipw2x00/ipw2200.c:10184:13: originally declared here
drivers/net/wireless/ipw2x00/ipw2200.c:8338:45: warning: cast to restricted __le16
drivers/net/wireless/ipw2x00/ipw2200.c:4414:21: warning: incorrect type in assignment (different base types)
drivers/net/wireless/ipw2x00/ipw2200.c:4414:21:    expected restricted __le16 [usertype] size
drivers/net/wireless/ipw2x00/ipw2200.c:4414:21:    got unsigned short [unsigned] [usertype] <noident>
drivers/net/wireless/ipw2x00/ipw2200.c:6105:33: warning: incorrect type in initializer (different base types)
drivers/net/wireless/ipw2x00/ipw2200.c:6105:33:    expected restricted __le16 [usertype] tx_rates
drivers/net/wireless/ipw2x00/ipw2200.c:6105:33:    got unsigned short [unsigned] [usertype] rates_mask
drivers/net/wireless/ipw2x00/ipw2200.c:6124:29: warning: bad assignment (>>=) to restricted __le16
drivers/net/wireless/ipw2x00/ipw2200.c:6130:31: warning: restricted __le16 degrades to integer
drivers/net/wireless/ipw2x00/ipw2200.c:6140:23: warning: restricted __le16 degrades to integer
drivers/net/wireless/ipw2x00/ipw2200.c:6149:54: warning: restricted __le16 degrades to integer
drivers/net/wireless/ipw2x00/ipw2200.c:6151:37: warning: invalid assignment: &=
drivers/net/wireless/ipw2x00/ipw2200.c:6151:37:    left side has type restricted __le16
drivers/net/wireless/ipw2x00/ipw2200.c:6151:37:    right side has type int
drivers/net/wireless/ipw2x00/ipw2200.c:6154:54: warning: restricted __le16 degrades to integer
drivers/net/wireless/ipw2x00/ipw2200.c:6156:37: warning: invalid assignment: &=
drivers/net/wireless/ipw2x00/ipw2200.c:6156:37:    left side has type restricted __le16
drivers/net/wireless/ipw2x00/ipw2200.c:6156:37:    right side has type int
drivers/net/wireless/ipw2x00/ipw2200.c:6159:55: warning: restricted __le16 degrades to integer
drivers/net/wireless/ipw2x00/ipw2200.c:6161:37: warning: invalid assignment: &=
drivers/net/wireless/ipw2x00/ipw2200.c:6161:37:    left side has type restricted __le16
drivers/net/wireless/ipw2x00/ipw2200.c:6161:37:    right side has type int
drivers/net/wireless/ipw2x00/ipw2200.c:6164:29: warning: invalid assignment: |=
drivers/net/wireless/ipw2x00/ipw2200.c:6164:29:    left side has type restricted __le16
drivers/net/wireless/ipw2x00/ipw2200.c:6164:29:    right side has type unsigned short
drivers/net/wireless/ipw2x00/ipw2200.c:7853:29: warning: incorrect type in assignment (different base types)
drivers/net/wireless/ipw2x00/ipw2200.c:7853:29:    expected signed char [signed] [usertype] [explicitly-signed] rt_dbmnoise
drivers/net/wireless/ipw2x00/ipw2200.c:7853:29:    got restricted __le16 [usertype] noise
drivers/net/wireless/ipw2x00/ipw2200.c:7967:25: warning: incorrect type in initializer (different base types)
drivers/net/wireless/ipw2x00/ipw2200.c:7967:25:    expected signed char [signed] [usertype] [explicitly-signed] noise
drivers/net/wireless/ipw2x00/ipw2200.c:7967:25:    got restricted __le16 [usertype] noise

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Cc: Zhu Yi <yi.zhu@intel.com>
Acked-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:36:04 -04:00
John W. Linville
e5539bcbf6 wl1271: remove print_mac usage
CC [M]  drivers/net/wireless/wl12xx/wl1271_main.o
drivers/net/wireless/wl12xx/wl1271_main.c: In function ‘wl1271_op_add_interface’:
drivers/net/wireless/wl12xx/wl1271_main.c:611: warning: ‘print_mac’ is deprecated (declared at include/linux/if_ether.h:142)

Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:36:03 -04:00
Luis R. Rodriguez
608b88cb34 ath: move regulatory info into shared common structure
This moves the shared regulatory structure into the
common structure. We will use this ongoing for common
data.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:36:03 -04:00
Sujith
4c48381786 ath9k: Fix TX poll cancelling
In ath9k_stop(), tx_complete_work was being cancelled twice.
This patch fixes it. Also, locking sc->mutex should be done
at the beginning.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:36:03 -04:00
Bob Copeland
bcd64e0c20 wl1251: halt the embedded CPU before loading firmware
After initial power-up, the embedded cpu is usually halted.  However,
if we down the interface and only do a soft reset before bringing
the interface back up, it will still be running and the firmware
loading code will bail out.  This change halts the CPU before loading
the firmware, enabling a second call to wl1251_boot() to succeed
without a hard reset.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:36:02 -04:00
Benoit PAPILLAULT
92ed48e523 rt2x00: Add support for retry rates
rt2800pci can handle different retry rates,
it will always step 1 rate down after a failed
transmission so creating the retry rate list
for mac80211 is quite simple.

Signed-off-by: Benoit PAPILLAULT <benoit.papillault@free.fr>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:36:02 -04:00
Ivo van Doorn
cd80b684a0 rt2x00: Fix MCS register intialization
According to the original Ralink driver,
LG_FBK_CFG0_OFDMMCS2FBK should be initialized to 9 rather then 3.

Based on a patch for rt2800pci from Benoit

Signed-off-by: Benoit PAPILLAULT <benoit.papillault@free.fr>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:36:01 -04:00
Ivo van Doorn
534aff0288 rt2x00: wireless CLI ID and packet ID must not be 0
In the TX descriptor the Packet ID must not be 0,
so add 1 to the ID. The wireless CLI ID is not allowed
to be 0 either, but also must be initialized with the
wcid value rather then keyid.

Based on a patch for rt2800pci from Benoit

Signed-off-by: Benoit PAPILLAULT <benoit.papillault@free.fr>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:36:01 -04:00
Ivo van Doorn
0fefe0fda4 rt2x00: Set SKBDESC_L2_PADDED in RX path
When the RX descriptor indicates the frame was L2 padded,
the SKBDESC_L2_PADDED flag should be set to make sure the
L2 padding is removed before it is send to mac80211.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:36:01 -04:00
Ivo van Doorn
05a32730f1 rt2x00: Add new RF chip defines
Add new defines for RF chipsets which can be found
by the driver. We don't have to check for these
chips specifically yet, but it is better to have
the defines in now.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:36:00 -04:00
Ivo van Doorn
1738c9e42a rt2x00: Fix for rt2800usb for SHARED_KEY_TABLE initializations
Fixed comments about SHARED_KEY_TABLE_BASE and SHARED_KEY_MODE_BASE.
Fixed initialization loop for SHARED_KEY_MODE_ENTRY.

Based on a patch for rt2800pci from Benoit.

Signed-off-by: Benoit PAPILLAULT <benoit.papillault@free.fr>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:36:00 -04:00
Ivo van Doorn
73077c8545 rt2x00: Fix RFKILL polling
The rfkill_poll callback function in the drivers check a bit
to see if the RFKILL key has been pressed. However when the
bit is set it means the radio is active and the device can be
used.

The wiphy_rfkill_set_hw_state() function expects the inversed,
so '1' must be send when the radio must be disabled.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:36:00 -04:00
Gábor Stefanik
5f1c07d924 b43: LP-PHY: Fix setting TX power control mode during RC calibration
Call set_tx_power_control with a LPPHY_TXPCTL rather than an
LPPHY_TX_PWR_CTL_CMD_MODE.

Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:35:59 -04:00
Gábor Stefanik
12d4bba0fd b43: LP-PHY: Fix reading old mode in the set TX power control routine
Check the mode the hardware is in, not the mode we used the last time.

Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:35:59 -04:00
Bob Copeland
1de6f73c34 wl1251: correct definitions for 0th bit defines
ACX_SLV_SOFT_RESET_BIT and ACX_REG_EEPROM_START_BIT are both defined
as "1" in the vendor driver code, but they were defined to be BIT(1)
("2") here.

The SOFT_RESET typo ensures that wl1251_boot_soft_reset() doesn't;
as a result the device hangs when trying to reprogram the PLL
registers while running.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Acked-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:35:58 -04:00
Johannes Berg
f424afa178 mac80211: remove deprecated API
All but two drivers have now stopped using the two
deprecated members radio_enabled and beacon_int,
so it's about time to remove them for good.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Kalle Valo <kalle.valo@iki.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:35:58 -04:00
Johannes Berg
3ac64beecd mac80211: allow configure_filter callback to sleep
Over time, a whole bunch of drivers have come up
with their own scheme to delay the configure_filter
operation to a workqueue. To be able to simplify
things, allow configure_filter to sleep, and add
a new prepare_multicast callback that drivers that
need the multicast address list implement. This new
callback must be atomic, but most drivers either
don't care or just calculate a hash which can be
done atomically and then uploaded to the hardware
non-atomically.

A cursory look suggests that at76c50x-usb, ar9170,
mwl8k (which is actually very broken now), rt2x00,
wl1251, wl1271 and zd1211 should make use of this
new capability.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:35:58 -04:00
Gábor Stefanik
86b2892a22 b43: LP-PHY: Remove BROKEN from B43_PHY_LP
Larry has reported success getting scan data with an LP-PHY device,
so it's probably time to release LP-PHY support for testing.

Also disable 802.11a support for now, as 802.11a currently causes
the driver to panic on startup (NULL pointer dereference).

Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:35:57 -04:00
Gábor Stefanik
7e4d852992 b43: LP-PHY: Update B2062 radio init with recent spec changes
The spec for initializing the B2062 radio have changed recently,
update the code to match the changes.

Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:35:57 -04:00
Gábor Stefanik
ed07c4b3af b43: LP-PHY: Fix a bug in the B2062 channel tune path
I missed the "+16" part of the instruction in the specs.

Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:35:57 -04:00
Gábor Stefanik
5269102ec9 b43: LP-PHY: Update code for spec fixes, and fix a few typos
A few typos have been discovered in both the specs and the code.
This patch fixes them.

Also use lpphy_op_switch_channel consistently, and make all users
of it print its return value for easier debugging.

Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:35:56 -04:00
Gábor Stefanik
055114a388 b43: LP-PHY: Fix a spec error in the B2062 channel switch routine
The channel switch routine had a whole instruction missing. Add it.

Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:35:56 -04:00
Gábor Stefanik
96909e9771 b43: LP-PHY: Update baseband init for recent spec changes
The spec had some nasty typos, and a large part of the rev0/1 BB
init procedure was also missing. Fix these.

Also make the init-time channel switch debuggable.

(The change from -EINVAL to -EIO is simply to make it possible
to distinguish the PLL charge pump error from a channel-not-found
error.)

Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:35:55 -04:00
Gábor Stefanik
826ee70664 b43: Handle B43_PHYTYPE_LP in RX path
Don't drop all packets received from an LP-PHY with WARN_ON.
Also update a comment with LP-specific information.

Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:35:55 -04:00
Gábor Stefanik
1245684c63 b43: LP-PHY: Fix another TX power control abuse
This should fix the remaining WARN_ON.

Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:35:55 -04:00
Gábor Stefanik
16373f6525 b43: LP-PHY: Update TX gain override for a spec typo fix
Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:35:54 -04:00
Gábor Stefanik
0c61bb9a41 b43: LP-PHY: Don't adjust gain table for rev2+ when setting channel
Rev2+ never needs to have gain tables adjusted according to the spec.

Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:35:54 -04:00
Gábor Stefanik
9d86a2d531 b43: Make LP-PHY testable
-Enable rate memory init for LP-PHY (same as G and N-PHY).
-Mark rev.2 LP-PHYs with the B2063 radio as supported.
-Allow using the 5GHz band on LP-PHYs.

Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:35:54 -04:00
Gábor Stefanik
759b973bb2 b43: Add LP-PHY firmware loading support
Add support for loading LP-PHY firmware to b43_try_request_fw.

Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:35:53 -04:00
Christian Lamparter
c46aaba74f p54: disable PS by default
Johannes kindly pointed out that I completely missed a hunk in
his patch: "[PATCH] cfg80211: allow driver to override PS default".

The driver must explicitly set ps_default to false,
as the setting is pre-filled with the kconfig default.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:35:53 -04:00
Vivek Natarajan
326bebbcb5 ath9k: Updates for AR9287_12 version of chipset.
Enable AsyncFIFO and AGGWEP for AR9287_12 and later revisions only.

Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:35:52 -04:00
Vivek Natarajan
d4fe5afa00 ath9k: Fix ref power interpolation logic for AR9287 chipsets.
Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:35:52 -04:00
Vivek Natarajan
08fc5c1ba0 ath9k: Enable LEDs for AR9287 chipsets.
Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:35:52 -04:00
Vivek Natarajan
d340b1f0e5 ath9k: Set AR_WA for AR9287 as it improves consistency in throughput.
Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:35:51 -04:00
Vivek Natarajan
db91f2e4d4 ath9k: Add open loop power control support for AR9287.
Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:35:51 -04:00
Gábor Stefanik
1e711bee56 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>
2009-08-20 11:35:51 -04:00
Gábor Stefanik
588f8377c5 b43: LP-PHY: Implement channel switching for rev2+/B2063 radio
Rev.2+/B2063 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>
2009-08-20 11:35:50 -04:00
Andrey Yurovsky
6f632d57f3 libertas: don't use dynamic-sized array
sparse complains about a bad constant expression due to the use of a
dynamic-sized array in get_common_rates().  Allocate and free the array
instead.

Signed-off-by: Andrey Yurovsky <andrey@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-20 11:35:50 -04:00
Johannes Berg
b23da49e6d 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>
2009-08-20 11:33:14 -04:00
Daniel C Halperin
396887a2b2 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:

void iwl_rx_pm_debug_statistics_notif(struct iwl_priv *priv,
                                      struct iwl_rx_mem_buffer *rxb)
{
        struct iwl_rx_packet *pkt = (struct iwl_rx_packet *)rxb->skb->data;
        IWL_DEBUG_RADIO(priv, "Dumping %d bytes of unhandled "
                        "notification for %s:\n",
                        le32_to_cpu(pkt->len), get_cmd_string(pkt->hdr.cmd));
        iwl_print_hex_dump(priv, IWL_DL_RADIO, pkt->u.raw, le32_to_cpu(pkt->len)
);
}
EXPORT_SYMBOL(iwl_rx_pm_debug_statistics_notif);

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>
2009-08-20 11:33:13 -04:00
Wey-Yi Guy
15993e08ac 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>
2009-08-20 11:33:13 -04:00
Daniel C Halperin
b261793da5 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>
2009-08-20 11:33:12 -04:00
Daniel C Halperin
28e6f48953 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>
2009-08-20 11:33:12 -04:00
Daniel C Halperin
28bd723bba 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>
2009-08-20 11:33:12 -04:00
Daniel C Halperin
9f30e04e04 iwlwifi: refactor packet reception code
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>
2009-08-20 11:33:11 -04:00
Johannes Berg
367ca28da4 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>
2009-08-20 11:33:11 -04:00