After some discussion on IRC about the PHY register write change,
I am not sure anymore if this is the right thing to do.
Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
The ICT IRQ table is a set of __le32 values, not u32 values,
so when reading it we need to take into account that it has
to be converted to CPU endianness. This was causing a lot of
trouble on my powerpc box where various things would simply
not work for no apparent reason with 5xxx cards, but worked
with 4965 -- which doesn't use the ICT table.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Since patch "rt2x00: bss_info_changed() callback is allowed to sleep" the
variable delayed wasn't used anymore. This means it can be removed
along with the call to schedule_work which depended on that variable.
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Implement the "PMU LDO set voltage" and "PMU LDO PA ref enable"
functions, and use them during LP-PHY baseband init in b43.
Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-Fix a few nasty typos (b43_phy_* operations instead of b43_radio_*)
in the channel tune routines.
-Fix some typos & spec errors found by MMIO tracing.
-Optimize b43_phy_write & b43_phy_mask/set/maskset to use
only the minimal number of MMIO accesses. (Write is possible
using a single 32-bit MMIO write, while set/mask/maskset can
be done in 3 16-bit MMIOs).
-Set the default channel back to 1, as the bug forcing us to use
channel 7 is now fixed.
With this, the device comes up, scans, associates, transmits,
receives, monitors and injects on all channels - in other words,
it's fully functional. Sensitivity and TX power are still sub-optimal,
due to the lack of calibration (that's next on my list).
Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
The Qdiv roundup routine is essentially a fixed-point
division algorithm, using only integer math.
However, the version in the specs had a major error
that has been recently fixed (a missing quotient++).
Replace Qdiv roundup with a rewritten, simplified version.
Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This change implements rfkill support for RTL8187B and RTL8187L devices,
using new cfg80211 rfkill API.
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Tested-by: Hin-Tak Leung <htl10@users.sourceforge.net>
Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This patch adds 3-wire bluetooth coex support for AR9285.
This support can be enabled through btcoex_enable modparam.
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
We don't need a hw cap bit for btcoex anymore as btcoex scheme type
is enough to do this.
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Also define macros for wlanactive and btactive (5 & 6) gpios.
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Make sure btcoex register configured with appropriate values
after it is initialized with the default values from initvals.h
during reset.
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This function currently does initialization + enable the
btcoex support. Split it into two logical functions which
does the above operations separately. Btcoex initialization
is done during attach time and enabling this feature is done
in start(). Also, add code to disable btcoex support in stop().
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
rndis_wlan does not set cipher suites list for cfg80211 which causes
wext-compat-range to report rndis_wlan not supporting WPA. Patch adds
cipher suites list and fixes NetworkManager not being able to connect to
WPA encrypted APs.
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
When dumping register contents, HW has to be awake.
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
PA Calibration is not needed for high power solutions.
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
* First PA driver (PDPADRV1) was not powered down properly.
* Compensation capacitor for dynamic PA was programmed incorrectly.
Also, remove a stray REG_READ.
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
PA calibration need not be done if the offset is not varying.
The current logic does PA calibration even if the offset is the
same.
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Initiate the conversion of libipw to the new cfg80211 configuration API.
For now, leave CONFIG_IPW2200_PROMISCUOUS stuff alone. Eventually
migrate it to cfg80211 when the add/del/change_virtual_intf methods
are implemented.
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Prevent a read of powInfo[-1] in the first iteration.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
The RC calibration code has some typos - fix them.
Also, make the default channel 7, as channel 1 is still
broken (only channels 7 and 8, and occasionally 9 work).
Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
CC [M] drivers/net/wireless/prism54/islpci_eth.o
drivers/net/wireless/prism54/islpci_eth.c: In function ‘islpci_eth_cleanup_transmit’:
drivers/net/wireless/prism54/islpci_eth.c:53: warning: cast from pointer to integer of different size
drivers/net/wireless/prism54/islpci_eth.c: In function ‘islpci_eth_receive’:
drivers/net/wireless/prism54/islpci_eth.c:453: warning: cast from pointer to integer of different size
Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Recent ath5k hardware is capable of doing CCMP acceleration.
Enable it for the cards that support it.
Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Save a memcpy by just storing updates directly in the skb
control block.
Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
With this patch, a compaq c700 can turn on the wifi led.
The array of compatible devices now includes the hardware
present in this computer, as well as the led pin and
polarity.
Signed-off-by: Marcos Chaparro <nitrousnrg@gmail.com>
Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
The maze of if() statements in configure_filter is confusing.
Reorganizing it as a switch statement makes it more apparent what
is going on and reveals several suspicious settings. This has no
functional changes, though it does remove some redundant flags
that are set earlier.
Also now that we can sleep, protect sc->filter_flags with the
sc lock.
Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Only print the driver version once, and condense all per-PHY
information to a single line.
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
If nothing has been written into the qeth sysfs-attribute layer2,
its value is "-1" meaning "not yet defined". But the value is
displayed as "1" meaning "layer2 selected". The patch changes the
reading of this "-1"-value to "-1" to make clear the layer2-attribute
has not yet been defined.
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
qeth displayed an entry in /proc/service_level even when no valid
MCL-string was available (the MCL info is blank). The change is to
create an entry in /proc/service_level only when MCL-string is
non-zero.
Signed-off-by: Klaus-Dieter Wacker <kdwacker@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Clear separation of cast-type determination (send path) for layer-2
resp. layer-3. Allowing to have inline functions for qeth layer-
discipline.
Signed-off-by: Klaus-Dieter Wacker <kdwacker@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
In case the IP address list contains entries (not removed when the device was set
offline) this entries should be registered next time the device is brought online.
In the past this was done implicitly with the device open call but since we wait
in the set IPv4 IPA and the device open common code holds various locks this
does not work any longer.
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Qeth HiperSockets support now retries sending of packets when the
IBM System z signals a temporary resource shortage (e.g. target
buffer full). The packet is enqueued into the device queue.
After 3 times of unsuccessful send the packet is dropped.
Signed-off-by: Klaus-Dieter Wacker <kdwacker@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
This patch adds support of USB autosuspend to the btusb driver.
If the device doesn't support remote wakeup, simple support based on
up/down is provided. If the device supports remote wakeup, additional
support for autosuspend while the interface is up is provided. This is
done by queueing URBs in an anchor structure and waking the device up
from a work queue on sending. Reception triggers remote wakeup.
The last busy facility of the USB autosuspend code is used. To close
a race between autosuspend and transmission, a counter of ongoing
transmissions is maintained.
Add #ifdefs for CONFIG_PM as necessary.
Signed-off-by: Oliver Neukum <oliver@neukum.org>
Tested-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
The error message "Removed only %u out of %u pkts" is printed when multiple
to be acked packets are queued.
if (i++ >= pkts_to_be_removed)
break;
This will break out of the loop and increase the counter i when
i==pkts_to_be_removed and the loop ends up with i=pkts_to_be_removed+1.
The following line
if (i != pkts_to_be_removed) {
BT_ERR("Removed only %u out of %u pkts", i, pkts_to_be_removed);
}
will then display the false message.
The counter i must not increase on the same statement.
Signed-off-by: Wending Weng <wweng@rheinmetall.ca>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
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>
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>
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>
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>
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>
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>
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>
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>
- 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>
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>
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>
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>
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>
Check that the result of kmalloc is not NULL before dereferencing it.
The patch also replaces kmalloc + memset by kzalloc.
The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@@
expression *x;
identifier f;
constant char *C;
@@
x = \(kmalloc\|kcalloc\|kzalloc\)(...);
... when != x == NULL
when != x != NULL
when != (x || ...)
(
kfree(x)
|
f(...,C,...,x,...)
|
*f(...,x,...)
|
*x->f
)
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
The driver uses "u32" for alignment check and calculation which
works only on 32-bit system. It will crash the 64-bit system.
Replace "u32" with "unsigned long" to fix this issue.
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
The Marvell Bluetooth driver is full of Enter/Leave debug statements and
all of them are really pointless and only clutter the code. Seems to be
some left-overs when they ported the driver from Windows. For the Linux
driver lets remove these.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
After fixing the driver to use skb_put properly for their HCI commands
only a few compiler warnings are left. Add proper casting for them.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
The Marvell driver has some weird quirks on how to construct proper SKBs
with Bluetooth HCI commands. Fix it to use skb_put properly and also
use hci_opcode_pack instead of self-crafted macro.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
For some reason the btmrvl_device struct has a name field that the SDIO
fills in, but then never ever uses again. That is totally pointless and
so just remove it.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Make the module description entries for the core and also the Marvell
SDIO driver match common practive inside the Bluetooth subsystem.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
The Marvell Bluetooth SDIO driver has a really complicated concept on how
firmware names are assigned to specific device ids. Fix that by doing a
proper structure and assign it to the module device table.
And while at it fix various coding style weirdness that is still present
in this driver.
Signed-off-by: Marcel Holtman <marcel@holtmann.org>
The Marvell core Bluetooth driver has various weird casting and unneeded
braces in its code that makes it hard to read. Remove all of these to
make the code a little bit simpler.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
The Marvell Bluetooth driver has debugfs support and they are casting
like there is no tomorrow. Remove all of them and magically the code
becomes more readable.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Both header files of the Marvell Bluetooth driver are private anyway and
if the driver happens to include them twice or they create a circular
dependency then the driver needs fixing. So just remove both pointless
ifdefs.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
The Makefile entry for the Marvell driver is broken when it comes to
handling the optional DEBUG_FS correctly. That must have been the reason
why they were using select in Kconfig in the first place. Fix this and
make it really optional.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
The Marvell driver selects DEBUG_FS and FW_LOADER for its core driver
and that is pointless. Don't select DEBUG_FS since it is either enabled
or not and it is not for the driver to enable it. Also FW_LOADER is
only used within the SDIO driver and so just have that one select the
FW_LOADER option.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
/debug/btmrvl/config/
/debug/btmrvl/status/
See Documentation/btmrvl.txt for details.
This patch incorporates a lot of comments given by
Nicolas Pitre <nico@marvell.com>. Many thanks to Nicolas Pitre.
Signed-off-by: Rahul Tank <rahult@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
This driver supports Marvell Bluetooth enabled devices with SDIO
interface. Currently only SD8688 chip is supported.
The helper/firmware images of SD8688 can be downloaded from this tree:
git://git.infradead.org/users/dwmw2/linux-firmware.git
This patch incorporates a lot of comments given by
Nicolas Pitre <nico@marvell.com>. Many thanks to Nicolas Pitre.
Signed-off-by: Rahul Tank <rahult@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
This driver provides basic definitions and library functions to
support Marvell Bluetooth enabled devices, such as 88W8688 WLAN/BT
combo chip.
This patch incorporates a lot of comments given by
Nicolas Pitre <nico@marvell.com>. Many thanks to Nicolas Pitre.
Signed-off-by: Rahul Tank <rahult@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
This patch increases the receive buffer size to HCI_MAX_FRAME_SIZE
which improves the RX throughput considerably.
Tested against BRM/Atheros/CSR USB Dongles with PAN profile using
iperf and chariot. This gave significant (around 40%) increase
in performance (increased from 0.8 to 1.5 Mb/s in Sheld room)
Signed-off-by: Vikram Kandukuri <vikram.kandukuri@atheros.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
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>
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>
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>
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>
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>
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>
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>
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>
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>