brcm80211: smac: only provide valid regulatory hint
The driver provides a regulatory hint to cfg80211 as obtained from the
SPROM. Mostly, this will be a two-letter ISO country code. However, it
may obtain special country code similar to the world regulatory domain
as used in cfg80211. This patch avoids setting these special codes as
the hint is lost to cfg80211.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Brett Rudley <brudley@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
brcm80211: smac: do not use US as fallback regulatory hint
The brcmsmac driver provides the country code from sprom as a regulatory
hint to cfg80211. When brcmsmac does not find a country code entry in
the sprom it passes 'US' as regulatory hint. Better approach is to rely
on the world regulatory domain in cfg80211/crda.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Brett Rudley <brudley@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Franky Lin [Wed, 11 Apr 2012 09:52:48 +0000 (11:52 +0200)]
brcm80211: fmac: clean up chip id table
Remove unsupported chip ID and rearrange the list in alphabetical
order
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Franky Lin [Wed, 11 Apr 2012 09:52:47 +0000 (11:52 +0200)]
brcm80211: fmac: postpone dongle RF enabling.
BRCMF_C_UP is the command that asks the firmware to enable RF of
dongle. Some firmware initialization steps must be performed during
RF is down. Postpone BRCMF_C_UP firing until brcmf_netdev_open get
called to ensure firmware have enough time to finish
initialization.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Franky Lin [Wed, 11 Apr 2012 09:52:46 +0000 (11:52 +0200)]
brcm80211: fmac: add frame header extension support
A header extension is introduced in the received frame to provide
extra space for dongle information. This won't affect current
supported chipset since the data_offset is 0. But it's necessary for
adding support for future chipset.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
brcm80211: fmac: register primary net device with device mac address
The primary net device was registered with a primary mac address and
upon IFUP it was set to match the actual mac address from the device.
This patch changes that and moves the brcmf_add_if() call to the common
part of the driver.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
brcm80211: fmac: remove primary mac address handling from brcmf_net_attach
The mac address for the primary interface was handled different from
the other interfaces. The code has been restructured such that the
brcmf_net_attach function treats the interfaces equal.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
The function brcmf_net_attach() is only used within dhd_linux.c so
it does not need to be extern. This patch makes the function static.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Reported-by: Ryan Roper <ryan.roper@gmail.com> Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
The MAX_TXPWR table for BTCOEX is not needed for AR9462.
Programming these values to the HW results in undesirable
behavior - for example, large number of delimiter/data
underruns are seen in AES-CCMP mode. Also, registers like
AR_PCU_MISC_MODE2 return 0xdeadbeef after the BTCOEX_MAX
power table is programmed to the HW, and frames being transmitted
end up being looped back to the RX engine, an example being beacon
frames in IBSS mode.
Remove this table for now - this fixes CCMP performance and general
IBSS usage.
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
mac80211: fix an issue in ieee80211_tx_info count field management
I noticed a possible issue in the status count field management of the
ieee80211_tx_info data structure. In particular, when the AGGR
processing is employed,
status.rates[].count is set just for the first frame and not for
others belonging to the same burst, leading to wrong statistic data in
the mac80211 debug file system.
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jakub Kicinski [Tue, 3 Apr 2012 01:40:50 +0000 (03:40 +0200)]
rt2800: zero registers of unused TX rings
This is needed if we take over after drivers which use those.
Signed-off-by: Jakub Kicinski <kubakici@wp.pl> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Reviewed-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jakub Kicinski [Tue, 3 Apr 2012 01:40:49 +0000 (03:40 +0200)]
rt2800: initialize queues before giving up due to DMA error
Don't immediately abort .start if DMA is busy before we
initialize the queues. Some drivers do not deinitialize
queues properly and we would fail to take over after them.
This behaviour is consistent with legacy driver.
Signed-off-by: Jakub Kicinski <kubakici@wp.pl> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Reviewed-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jakub Kicinski [Tue, 3 Apr 2012 01:40:48 +0000 (03:40 +0200)]
rt2800: add disabling of DMA before loading firmware
Legacy driver disables DMA before loading firmware.
Signed-off-by: Jakub Kicinski <kubakici@wp.pl> Reviewed-by: Stanislaw Gruszka <sgruszka@redhat.com> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jakub Kicinski [Tue, 3 Apr 2012 01:40:47 +0000 (03:40 +0200)]
rt2800: introduce wpdma_disable function
Introduce wpdma_disable function to simplify the code.
Signed-off-by: Jakub Kicinski <kubakici@wp.pl> Reviewed-by: Stanislaw Gruszka <sgruszka@redhat.com> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
mac80211: do not scan and monitor connection in parallel
Before we send probes in connection monitoring we check if scan is not
pending. But we do that check without locking. Fix that and also do not
start scan if connection monitoring is in progress.
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
With the creation of iwl-agn-devices.c,
iwl-core.c can be cleaned up a bit more by
moving beacon time related functions from
iwl-core.c to iwl-agn-devices.c
Signed-off-by: Meenakshi Venkataraman <meenakshi.venkataraman@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Johannes Berg [Thu, 8 Mar 2012 08:18:04 +0000 (09:18 +0100)]
iwlwifi: calculate active legacy rates per station
Not all stations are guaranteed to have the same
active (available) legacy rates, so calculate them
on rate control init instead of hard-coding them
based on our own available rates. I have no idea
why that was done here before.
Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Johannes Berg [Tue, 10 Apr 2012 21:10:28 +0000 (14:10 -0700)]
iwlwifi: dynamically determine lib_ops
Having the pointer to lib_ops in the config
makes it impossible to split the driver into
different modules. Determine the ops based on
the device family enumeration to get rid of
the direct pointer.
Also move all the opmode specific code from
the iwl-[1256]000.c files into a new file
iwl-agn-devices.c so that the former only
have configuration data now.
Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/wireless: ipw2x00: add supported cipher suites to wiphy initialization
Driver doesn't report its supported cipher suites through cfg80211
interface. It still uses wext interface and probably will not work
through nl80211, but will at least correctly advertise supported
features.
Bug was reported by Omar Siam.
https://bugzilla.kernel.org/show_bug.cgi?id=43049
Signed-off-by: Stanislav Yakovlev <stas.yakovlev@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jim Cromie [Tue, 10 Apr 2012 23:02:34 +0000 (17:02 -0600)]
brcm80211: replace open-coded ARRAY_SIZE with the macro
Signed-off-by: Jim Cromie <jim.cromie@gmail.com> Acked-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Samuel Ortiz [Tue, 10 Apr 2012 17:43:18 +0000 (19:43 +0200)]
NFC: pn533 Rx chaining support
When buffers on the receiption path exceed 262 bytes, the pn533 uses
a chaining mechanism where the initiator has to send NULL data frames
to fetch the remaining frames.
We do that from a workqueue context while holding the cmd lock. Once the
MI bit is gone, we aggregate the queued received skbs.
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Eric Lapuyade [Tue, 10 Apr 2012 17:43:12 +0000 (19:43 +0200)]
NFC: Add Core support to generate tag lost event
Some HW/drivers get notifications when a tag moves out of the radio field.
This notification is now forwarded to user space through netlink.
Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Eric Lapuyade [Tue, 10 Apr 2012 17:43:11 +0000 (19:43 +0200)]
NFC: Changed target activated state logic
Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Eric Lapuyade [Tue, 10 Apr 2012 17:43:10 +0000 (19:43 +0200)]
NFC: Fix next target_idx type and rename for clarity
Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Samuel Ortiz [Tue, 10 Apr 2012 17:43:09 +0000 (19:43 +0200)]
NFC: The core part should generate the target index
The target index can be used by userspace to uniquely identify a target
and thus should be kept unique, per NFC adapter. Moreover, some protocols
do not provide a logical index when discovering new targets, so we have to
generate one for them.
For NCI or pn533 to fetch their logical index, we added a logical_idx field
to the target structure.
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Eric Lapuyade [Tue, 10 Apr 2012 17:43:08 +0000 (19:43 +0200)]
NFC: Add HCI documentation
Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Eric Lapuyade [Tue, 10 Apr 2012 17:43:07 +0000 (19:43 +0200)]
NFC: SHDLC implementation
Most NFC HCI chipsets actually use a simplified HDLC link layer to
carry HCI payloads.
This implementation registers itself as an HCI device on behalf of the
NFC driver.
Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Eric Lapuyade [Tue, 10 Apr 2012 17:43:06 +0000 (19:43 +0200)]
NFC: HCI support
This is an implementation of ETSI TS 102 622 specification.
Many NFC chipsets use HCI as the host <-> target protocol on top of a
serial link like i2c.
Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Eric Lapuyade [Tue, 10 Apr 2012 17:43:05 +0000 (19:43 +0200)]
NFC: Export target lost function
NFC drivers will call this routine when they detect that a tag leaves the
RF field. This will eventually lead to the corresponding netlink event
to be sent.
Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
mac80211: fix the assignment of PREQ's MAC address for Proactive RANN
Record the RANN sender's address only for RANNs that meet the acceptance
criteria (per sections 13.10.12.4.2).
Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com> Reviewed-by: Javier Cardona <javier@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This patches enables setting association request and probe request
IE for station interface. WPS exchange between WPS2.0 AP and mwifiex
STA Enrollee/External Registrar completes successfully.
Tested with wpa_supplicant 1.0 and 2.0 devel.
Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Kiran Divekar <dkiran@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
mwifiex: display correct country information in debugfs "info"
Use "priv->country_code" string to display country information in
debugfs command "info" instead of "adapter->region_code".
"adapter->region_code" contains default region code got from FW while
initialization, whereas "priv->country_code" is updated in reg_notifier
handler whenever there is a change in regulatory domain.
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Kiran Divekar <dkiran@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Tue, 10 Apr 2012 00:47:00 +0000 (17:47 -0700)]
iwlwifi: introduce device family enum
This will later be used to dynamically bind
the configuration data for DVM and MVM.
For now, we can use it to get rid of the
additional_nic_config() hook.
Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Tue, 10 Apr 2012 00:46:59 +0000 (17:46 -0700)]
iwlwifi: create device configuration header file
The iwl-shared.h header file will be going away
soon. There isn't much left in it that we keep,
other than the device configuration declarations.
Move those out now to a new iwl-config.h header.
iwl-cfg.h seemed like a possible alternative but
those declarations will later live in the PCIe
transport code.
Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Tue, 10 Apr 2012 00:46:58 +0000 (17:46 -0700)]
iwlwifi: move eeprom into priv
The whole code around eeprom is distributed
across whole bunch of different files, most
of which belong to the to-be-DVM code. As a
result, it is currently very hard to split
out the EEPROM code to be generic. However,
it is also quite unlikely that the current
EEPROM code will be needed by the MVM code
as that has different mechanisms to query
the EEPROM (it does so through the uCode.)
So, at least temporarily, move everything
into priv. If it becomes necessary to use
the code from MVM, we will have to split it
out, but then it's also easier since we'll
know what pieces we need.
Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Tue, 10 Apr 2012 00:46:57 +0000 (17:46 -0700)]
iwlwifi: split force_reset debugfs file
Split the force_reset debugfs file into two
different files:
* "rf_reset" triggers a reset of the RF when
written to and exposes statistics on RF
resets when read
* fw_restart triggers a firmware restart when
written to and lives in the transport
This cleans up all sources of firmware restart
to originate within the transport layer and
allows us to simplify some code.
Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Tue, 10 Apr 2012 00:46:56 +0000 (17:46 -0700)]
iwlwifi: remove ack_check module parameter
This defaults to false, and we don't recommend
to use it anywhere, so just remove it.
Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Tue, 10 Apr 2012 00:46:55 +0000 (17:46 -0700)]
iwlwifi: move hw_params into priv
The hw_params are mostly values that are
derived from the actual hardware config.
As such, while it is possible that MVM
will require similar ones, it makes more
sense -- at least for now -- to put them
into the DVM struct.
Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Tue, 10 Apr 2012 00:46:54 +0000 (17:46 -0700)]
iwlwifi: move queue watchdog into transport
This removes one of the two sources of device
restarts in the upper layer -- those are a bit
inconvenient because normal restarts originate
in the transport. By moving the watchdog down
it can be treated the same.
Also rewrite the watchdog logic. Timers are
much more efficient when they never fire, so
instead firing a timer every 500ms set up a
timer for each TX queue and fire it only when
the queue is really stuck. This avoids the CPU
waking up when everything is working well.
While at it, remove the wd_disable config item
and replace it by simply setting wd_timeout to
IWL_WATCHHDOG_DISABLED (0).
Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Tue, 10 Apr 2012 00:46:53 +0000 (17:46 -0700)]
iwlwifi: remove unneeded struct declarations
Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Tue, 10 Apr 2012 00:46:52 +0000 (17:46 -0700)]
iwlwifi: remove watchdog debugfs file
This file isn't really all that useful as
when the watchdog triggered it's already
too late, and the setting doesn't persist
unlike e.g. a module parameter that could
be added to the right config file.
Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Tue, 10 Apr 2012 00:46:51 +0000 (17:46 -0700)]
iwlwifi: move rx_page_order into transport
That way it isn't needed in hw_params, which
is shared data. It also isn't really what we
should configure in the transport, that is
better just 4k/8k, so configure a bool and
derive the page order in the transport. This
also means the transport doesn't need access
to the module parameter any more.
Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Forest Bond [Sun, 8 Apr 2012 19:12:34 +0000 (14:12 -0500)]
rtl8192de: Recognize 92D E-CUT version.
The chip version constant (0xCC33) was taken from version 0001.0105.2011
of the GPL vendor driver. Note that this driver version also ships a
firmware update, but I am unsure if it is required for E-CUT chips to
function properly.
A nearby spelling error was also corrected.
Signed-off-by: Forest Bond <forest.bond@rapidrollout.com> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Forest Bond [Sun, 8 Apr 2012 19:12:33 +0000 (14:12 -0500)]
rtl8192de: Clean up and fix 92D cut version constants and macros.
The previous definitions included both {B,C,D,E}_CUT_VERSION and
CHIP_92D_{C,D}_CUT with conflicting values for the C and D cut versions,
and literal hex values were used in the IS_92D_{C,D,E}_CUT macros. So
we clean all this up and in doing so enable cut-specific code paths for
cuts C and D, which would not have been executed because the
CHIP_92D_{C,D}_CUT constants were wrong and the cut version was thus
recorded incorrectly.
Signed-off-by: Forest Bond <forest.bond@rapidrollout.com> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Added support for Belkin Surf N300 XR wireless usb adapter to rtlwifi driver
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>