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>
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>
Luciano Coelho [Tue, 6 Dec 2011 20:24:57 +0000 (22:24 +0200)]
wlcore/wl12xx: move identify firmware function to a lower driver op
Different chip families have different firmware versions, so we need
to identify the firmware to enable quirks, reject the used version
etc. in the lower drivers. This commit turns the fw_ver_quirks
function into an identify_fw operation.
Arik Nemtsov [Thu, 5 Jan 2012 22:05:51 +0000 (00:05 +0200)]
wlcore: set max_rx_agg_subframes in mac80211 according to HT conf
The max Rx aggregation subframes configured to FW must be the same
number given to the upper layers (mac80211). Derive both from the same
value, given in the conf struct.
Luciano Coelho [Mon, 5 Dec 2011 17:52:22 +0000 (19:52 +0200)]
wlcore/wl12xx: use a single memory config and reset if using wl127x
Instead of having two memory configuration sets, one for wl127x and
one for wl128x, we can use only one which should be correctly set by
the lower driver.
The wl12xx driver now uses the wl128x memory config by default but
changes it when if it identifies the wl127x chips.
Luciano Coelho [Mon, 5 Dec 2011 14:51:10 +0000 (16:51 +0200)]
wlcore/wl12xx: move extended radio configuration parameters to wl12xx
The extended radio configuration parameters are only used by the
wl127x chipsets, which are handled by the wl12xx driver. Move the rf
configuration settings from wlcore to wl12xx.
Luciano Coelho [Mon, 5 Dec 2011 14:12:54 +0000 (16:12 +0200)]
wlcore/wl12xx: move runtime configuration struct to the lower driver
The configuration parameters vary with different chip families. Some
of the parameters used only by some chip families, others should have
different value depending on the family. Thus move the configuration
values from wlcore to wl12xx.
Arik Nemtsov [Tue, 13 Dec 2011 10:27:22 +0000 (12:27 +0200)]
wlcore/wl12xx: expand functionality of cmd_trigger HW op
Change the cmd_trigger op to include the write of the command buffer.
Also, instead of letting the lower driver access the cmd_box_addr element
directly, we now pass the address in the trigger_cmd operation, so it
doesn't have to be exported.
Arik Nemtsov [Tue, 13 Dec 2011 10:11:26 +0000 (12:11 +0200)]
wlcore/wl12xx: turn no-Tx-align quirk into Tx-align
Inverting the quirk flag to indicate Tx-alignment. This aligns it with
the similar Rx-side quirk.
The call to wl1271_set_block_size() decides whether SDIO block size
alignment can be used or not. In case we're using SPI, we can't use
the block size alignment, so the function returns false. So we set
the quirk when wl1271_set_block_size() returns true and let the wl12xx
lower driver unset the bit for wl127x (since it doesn't support this
quirk).
Arik Nemtsov [Mon, 12 Dec 2011 09:32:37 +0000 (11:32 +0200)]
wlcore/wl12xx: split Tx completion to immediate/delayed
One chip family employs immediate Tx completion, where knowledge of
completed packets is given as part of the FW status. Another is only
notified of Tx completion via the FW status, and has to read the
completion status of the packets from a different location.
Implement the wl12xx tx completion as a delayed Tx completion.
Arik Nemtsov [Mon, 12 Dec 2011 10:18:17 +0000 (12:18 +0200)]
wlcore/wl12xx: add hw op for getting rx packet data length
There is a difference in the way chip families report the length of data
in a single Rx packet. Abstract this into a HW op. Refactor the Rx data
handling function to allocate the correct size for the data, and avoid
trimming the skb.
Luciano Coelho [Mon, 12 Dec 2011 10:15:08 +0000 (12:15 +0200)]
wlcore/wl12xx: add prepare_read hw op for Rx data
The only difference in the read_data operations is that some chips
need to prepare the data to be read before reading. So instead of
having a mandatory read_data operation, we now have an option
prepare_data operation that only needs to be implemented for chips
that require it.
In the wl12xx lower driver, we only set the prepare_data operation for
wl127x chips.
Arik Nemtsov [Mon, 12 Dec 2011 10:11:43 +0000 (12:11 +0200)]
wlcore/wl12xx: add hw op for getting rx buffer data alignment
An aligned data buffer is such where the Ethernet portion of the packet
starts on a 4-byte boundary. Some chip families support padding the Rx
data buffer to achieve such alignment, others rely on the host to perform
it.
Implement the HW op for getting alignment state in wl12xx. Add
support for HW-padded alignment in the Rx flow.
Arik Nemtsov [Wed, 7 Dec 2011 22:43:48 +0000 (00:43 +0200)]
wlcore/wl12xx: add global elements to convert hw-rates to standard rates
Rates reported by HW can be different between chip families. Make the
rate-to-idx translation tables private per family and use them in a
common translation function. Add a global element to help determine
which rates are HW HT-rates.
Arik Nemtsov [Mon, 12 Dec 2011 09:47:09 +0000 (11:47 +0200)]
wlcore/wl12xx: add hw op for setting frame length in tx_hw_desc
Each chip family indicates the length of a frame to the HW differently.
This includes different padding, alignment and other fields in the HW Tx
descriptor.
Arik Nemtsov [Wed, 7 Dec 2011 21:38:47 +0000 (23:38 +0200)]
wlcore/wl12xx: change GEM Tx-spare blocks per-vif
The number of spare Tx blocks must be changed when the GEM cipher is
engaged. Track set_key() operations to see if this is the case and
change the Tx HW spare block count accordingly. Set the number of spare
blocks for each operating mode from the low level driver.
Luciano Coelho [Wed, 30 Nov 2011 13:07:20 +0000 (15:07 +0200)]
wlcore: add quirk to disable ELP
ELP is a very complicated process in the firmware. Due to its
complexity, in some early firmware revisions, the ELP feature is
disabled. To support this cases, this patch adds a quirk that
disables ELP mode.
When ELP is not supported, do not attempt to enter ELP when requested by
the driver.
Luciano Coelho [Wed, 30 Nov 2011 13:02:47 +0000 (15:02 +0200)]
wlcore: remove some unnecessary event mailbox address reads
We were reading the even mailbox address three times, which was
completely unnecessary and complicated things regarding partition
selection. Remove the unnecessry reads and set the address for
mailbox 1 and 2 after the first read.
Luciano Coelho [Wed, 30 Nov 2011 10:30:01 +0000 (12:30 +0200)]
wlcore/wl12xx: add quirk for legacy NVS support
Instead of checking the chip ID directly in the wlcore code to decide
whether to use the new or the old NVS format, we now use a quirk that
should be set by the low level driver to say that it needs to use the
old format.
The top registers initialization is very specific to the actual
hardware used, even the way in which we read from and write to the top
registers varies from chip to chip. This patch moves all top
registers initialization to wl12xx. Also add a boot op for the wlcore
module to call at the right time and a few callbacks with the common
called to be called from the lower drivers boot operations.
wlcore/wl12xx: move get_pg_ver to the lower driver
The PG version depends on the actual hardware. This commit moves the
code used to read the PG version to the lower driver, by adding the
get_pg_ver hardware operation.
Move the code that identifies the chip ID and selects the appropriate
firmware to an operation implemented by the lower driver. Also move
the quirks definitions into wlcore.h and rename to WLCORE_QUIRK_*.
Add register tables support in wlcore, add some new IO functions to
read and write to chip-specific register and data addresses. Move
some common register values from wl12xx to wlcore and add the
registers table to wl12xx.
Add partition tables to wlcore, move and reorganize partition setting
functions. Move wl12xx partition table to use the wlcore partition
table instead.
Luciano Coelho [Mon, 21 Nov 2011 17:25:24 +0000 (19:25 +0200)]
wl12xx/wlcore: move wl1271 struct to wlcore and add ops
In order to add chip-specific operations and prepare for future
elements that need to be set by the lower driver, move the wl1271
structure to the wlcore.h file and add an empty placeholder for the
operations structure.