Arik Nemtsov [Tue, 29 May 2012 15:38:05 +0000 (18:38 +0300)]
wlcore/wl12xx/wl18xx: make NVS file optional for wl18xx
Don't spew errors when we can't find the NVS file in wlcore. Instead
fail the wl12xx boot HW op if the NVS isn't found.
Take this opportunity to remove some dead code from register_hw()
which looks for the NVS again needlessly.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Arik Nemtsov [Tue, 29 May 2012 09:44:12 +0000 (12:44 +0300)]
wl18xx: clean up phy module parameters
Give all wl18xx phy module paramters -1 as a default value, indicating
the paramter was not set. Add previous default values to the default
18xx priv conf structure.
Remove the board_type field from wl18xx priv. The field with the same
name inside the phy conf is good enough for our purposes.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Arik Nemtsov [Tue, 29 May 2012 09:40:50 +0000 (12:40 +0300)]
wl18xx: align wl18xx_conf_phy with FW variant and remove it
wl18xx_conf_phy represents part of the FW native wl18xx_mac_and_phy_params
structure. Remove it and replace the phy part of the wl18xx conf with the
FW bound structure. This allows us to set/override all members.
Increment the wlconf version to ensure compatibility with the new
structure
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Ido Reis [Tue, 22 May 2012 09:34:10 +0000 (12:34 +0300)]
wl18xx: update fw statistics
Aligned to the struct in FW 8.2.0.0.91 and updated the debugfs entries
accordingly.
Signed-off-by: Ido Reis <idor@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Arik Nemtsov [Wed, 23 May 2012 05:39:43 +0000 (08:39 +0300)]
wl18xx: allow FW-log by default for PG2.0
This is supported by new FW versions (.88+).
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Luciano Coelho [Thu, 7 Jun 2012 20:39:28 +0000 (23:39 +0300)]
wl18xx: read configuration structure from a binary file
Instead of using the hardcoded configuration structure, try to read it
from a "firmware" file called wl18xx-conf.bin. If the file doesn't
exist, fall back to the hardcoded version. If the file exists but is
illegal, bail out.
Signed-off-by: Luciano Coelho <coelho@ti.com>
Luciano Coelho [Thu, 7 Jun 2012 20:39:27 +0000 (23:39 +0300)]
wlcore/wl18xx: export conf struct in a debugfs file
Add conf file header structure, magic and version values and export
the entire conf struct in debugfs.
Signed-off-by: Luciano Coelho <coelho@ti.com>
Luciano Coelho [Thu, 7 Jun 2012 20:39:26 +0000 (23:39 +0300)]
wlcore/wl18xx: the conf structs must be packed so they can be exported
Since we are now going to export the conf structure and read it from a
file, it should be packed to avoid surprises with padding bytes.
Signed-off-by: Luciano Coelho <coelho@ti.com>
Luciano Coelho [Thu, 7 Jun 2012 20:39:25 +0000 (23:39 +0300)]
wlcore: use u8 instead of enum for bcn_filt_mode
Since we will export the conf structure as a file, we need to use well
defined types. Instead of using enum, whose size may vary, use u8 for
bcn_filt_mode instead.
Signed-off-by: Luciano Coelho <coelho@ti.com>
Luciano Coelho [Thu, 7 Jun 2012 20:39:24 +0000 (23:39 +0300)]
wlcore/wl18xx/wl12xx: use u8 instead of bool for host_fast_wakeup_support
The conf structure is going to be exported to a file, so we should use
only well defined types. bool is not well defined and may vary from
platform to platform, so change the host_fast_wakeup_support type to
u8 instead.
Signed-off-by: Luciano Coelho <coelho@ti.com>
Luciano Coelho [Thu, 7 Jun 2012 20:39:23 +0000 (23:39 +0300)]
wlcore: export raw binary with the FW statistics in debugfs
Instead of parsing all the binary data returned by the firmware, we
should simply export the binary and let the userspace do the parsing.
This commit adds a new file to debugfs to do that.
Signed-off-by: Luciano Coelho <coelho@ti.com>
Luciano Coelho [Thu, 7 Jun 2012 20:39:22 +0000 (23:39 +0300)]
wl18xx: add support to clear FW statistics
This patch calls ACX_CLEAR_STATISTICS to clear the firmware
statistics. The trigger is a new debugfs file called
clear_fw_statistics in the fw_stats directory.
Signed-off-by: Luciano Coelho <coelho@ti.com>
Eyal Shapira [Thu, 7 Jun 2012 20:39:21 +0000 (23:39 +0300)]
wlcore: add debugfs control over rx interrupt pacing
Add control over several conf fields which combined
control the rx interrupt pacing mechanism, that is avoiding
getting an interrupt following a single frame rx but instead
have the FW trigger the interrupt only after a certain
amount of frames received or a timeout.
Signed-off-by: Eyal Shapira <eyal@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Eyal Shapira [Thu, 7 Jun 2012 20:39:20 +0000 (23:39 +0300)]
wlcore: add support macros to easily add conf debugfs entries
The current debugfs code contains too much code duplication
of bolierplate code. Add some macro magic to avoid this and
enable adding new debugfs entries by using just a few lines.
Signed-off-by: Eyal Shapira <eyal@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Grant Erickson [Fri, 1 Jun 2012 16:19:01 +0000 (09:19 -0700)]
wl12xx: Add support for an external 26 MHz crystal source
Add support for an external 26 MHz crystal source.
[Changed wl->ref_clock to priv->ref_clock -- Luca.]
Signed-off-by: Grant Erickson <marathon96@gmail.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Ido Reis [Sun, 13 May 2012 11:53:40 +0000 (14:53 +0300)]
wl18xx: pad only last frame in aggregration buffer for PG2
In PG2 only the last frame in the aggregate buffer should be
aligned to the sdio block size. This frame's header msb should be
set to 0, while in all the previous frames in the aggregation
buffer, this bit should be set to 1.
[Add a HW op for setting the frame ctrl bit only for 18xx. Other minor
cleanups - Arik]
[Make the pre_pkt_send operation optional -- Luca]
Signed-off-by: Ido Reis <idor@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Ido Reis [Mon, 23 Apr 2012 14:35:25 +0000 (17:35 +0300)]
wl18xx: PG2.0 HW Watch dog interrupt support
In PG2, the HW watchdog interrupt occupies bit0 of the event vector, and
the SW watchdog is relocated to bit9. We perform the relocation
globally, as there's only one watchdog bit on previous platforms (bit0).
[Only mask in the new bit9 for platforms supporting it. This avoids
spurious events on other platforms - Arik]
Signed-off-by: Orit Brayer <orit@ti.com>
Signed-off-by: Ido Reis <idor@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Ido Reis [Mon, 23 Apr 2012 13:49:19 +0000 (16:49 +0300)]
wl18xx: FW/PHY arguments added for PG2
PG2 requires 4 new parameters that to be passed to the PHY.
Use the actual PHY initialization struct size for the mem size of the
PHY_INIT section, to account for additions in params.
[Make sure PG1 still gets the original struct - Arik]
Signed-off-by: Ido Reis <idor@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Ido Reis [Sun, 22 Apr 2012 17:45:52 +0000 (20:45 +0300)]
wl18xx: support PG2 version of the chip
PG2 has a unique chip id. It supports similar HW quirks.
Signed-off-by: Ido Reis <idor@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Ido Reis [Sun, 13 May 2012 12:27:17 +0000 (15:27 +0300)]
wl18xx: fix PHY_INIT addresses mem size
was hardcoded 252, now uses the parameters struct size.
Signed-off-by: Ido Reis <idor@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Victor Goldenshtein [Tue, 15 May 2012 14:04:40 +0000 (17:04 +0300)]
wlcore: set channels 12-14 as pactive for sched scan
Introduce “pactive” scan mode – which instructs the fw to
perform a passive scan until an activity/energy is detected
on these channels, once energy detected the channel becomes
active.
Signed-off-by: Victor Goldenshtein <victorg@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Eliad Peller [Tue, 15 May 2012 15:31:58 +0000 (18:31 +0300)]
wlcore: compare ssid_len before comparing ssids
When comparing 2 ssids the ssid_len must be taken
into account. Otherwise, a substring will be treated
as equal.
This bug might cause ssids to get scanned as
public ssids (rather than hidden), resulting in
broadcast probe request (instead of ssid-specific
ones)
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Yoni Divinsky [Wed, 16 May 2012 08:34:17 +0000 (11:34 +0300)]
wlcore: add role_id to all the sched_scan commands
Due to a need by the firmware when working in multirole
the role id needs to be added to the structs of the
following commands:
CMD_CONNECTION_SCAN_CFG, CMD_CONNECTION_SCAN_SSID_CFG,
CMD_START_PERIODIC_SCAN, CMD_STOP_PERIODIC_SCAN
Signed-off-by: Yoni Divinsky <yoni.divinsky@ti.com>
Signed-off-by: Igal Chernobelsky <igalc@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Eliad Peller [Tue, 15 May 2012 13:35:20 +0000 (16:35 +0300)]
wl12xx/wl18xx: add erp protection IE to the beacon filter
We have to reconfigure the fw when erp protection should
be enabled/disabled. Pass beacons containing changes
in the ERP protection IE, so we could analyze them.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Eliad Peller [Tue, 15 May 2012 11:53:17 +0000 (14:53 +0300)]
wl12xx: send beacon loss events to userspace
Send beacon loss events to userspace, so it will be
able to initiate roaming before disconnection
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Yoni Divinsky [Wed, 16 May 2012 08:34:18 +0000 (11:34 +0300)]
wlcore: do not send stop fwlog cmd if fw is hanged
If the driver received a watchdog interrupt then the
assumption is that the fw is hanged. Avoid sending
the stop fwlog command in case of a watchdog recovey
to avoid waiting for the 2 seconds timeout of the command.
Signed-off-by: Yoni Divinsky <yoni.divinsky@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Arik Nemtsov [Fri, 18 May 2012 04:46:40 +0000 (07:46 +0300)]
wlcore/wl12xx/wl18xx: implement op_set_key per HW arch
The 12xx set_key just calls the common wlcore_set_key function, in order
to program the keys into the FW.
The 18xx variant changes the spare block count when a GEM or TKIP
key is set. Also modify the get_spare_blocks HW op for 18xx to return
the correct numbers of spare blocks, according to what is currently
set in FW.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Arik Nemtsov [Fri, 18 May 2012 04:46:39 +0000 (07:46 +0300)]
wlcore: stop queues on Tx flush
Stop network queues during Tx flush, and also drop other internal
mac80211 packets (mgmt) that may arrive when the queues are stopped.
When flush is done all driver queues are clear, forcefully if needed.
Protect the Tx flush operation with a new mutex, to prevent concurrency
that can mess us queue state.
Based on a patch by Eliad Peller <eliad@wizery.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Arik Nemtsov [Fri, 18 May 2012 04:46:38 +0000 (07:46 +0300)]
wlcore: add stop reason bitmap for waking/starting queues
Allow the driver to wake/stop the queues for multiple reasons. A queue
is started when no stop-reasons exist.
Convert all wake/stop queue calls to use the new API.
Before, a stopped queue was almost synonymous a high-watermark on Tx.
Remove a bit of code in wl12xx_tx_reset() that relied on it.
Internal packets arriving from mac80211 are also discarded when a queue
is stopped. A notable exception to this is the watermark reason, which
is a "soft"-stop reason. We allow traffic to gradually come to a halt,
but we don't mind spurious packets here and there. This is merely a flow
regulation mechanism.
Based on a similar patch by Eliad Peller <eliadWizery.com>.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Arik Nemtsov [Fri, 18 May 2012 04:46:37 +0000 (07:46 +0300)]
wlcore/wl12xx/wl18xx: handle spare blocks spacial cases per arch
Add a HW op for getting spare blocks.
12xx cards require 2 spare blocks for GEM encrypted SKBs, regardless
of VIFs or keys programmed into the FW.
18xx cards require 2 spare blocks when there are any connected TKIP or
GEM VIFs. For now always return 2 spare blocks, as this works with all
networks. The special case TKIP/GEM functionality is added at a later
patch.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Arik Nemtsov [Fri, 18 May 2012 04:46:36 +0000 (07:46 +0300)]
wlcore/wl12xx/wl18xx: introduce quirk to remove TKIP header space
18xx chips do not require extra space in the TKIP header. Introduce a
new HW quirk to allow us to make this feature arch-specific. 12xx chip
will now have this quirk.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Victor Goldenshtein [Mon, 14 May 2012 13:07:38 +0000 (16:07 +0300)]
wlcore: wait for roc complete only for the first roc command
In some multi role scenarios the driver might send multi
roc requests without sending a croc first, the fw queues
those requests and starts service the next roc request as
soon as the driver sends a croc for the previous one. So,
if the fw rocs on channel X and driver asks to roc also
on channel Y, the fw will not start service Y (and will
not send roc complete event for this request) until the
driver releases the fw with croc X.
Signed-off-by: Victor Goldenshtein <victorg@ti.com>
Signed-off-by: Igal Chernobelsky <igalc@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Victor Goldenshtein [Mon, 14 May 2012 10:55:47 +0000 (13:55 +0300)]
wlcore: don't enable BET for high basic rates
The beacon early termination is not relevant for
high basic rates, which doesn't contribute
anything to the PS and only adds unnecessary FW
work.
Enable BET only if the basic rate is less than 9
Mbps.
Signed-off-by: Ziv Riesel <zivriesel@ti.com>
Signed-off-by: Victor Goldenshtein <victorg@ti.com>
Signed-off-by: Igal Chernobelsky <igalc@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Victor Goldenshtein [Tue, 15 May 2012 14:15:40 +0000 (17:15 +0300)]
wl18xx: fix fm_coex parameters configuration
Wrong fm_coex parameters were set during wl18xx
init phase, fix it.
Signed-off-by: Ziv Riesel <zivriesel@ti.com>
Signed-off-by: Victor Goldenshtein <victorg@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Victor Goldenshtein [Thu, 10 May 2012 14:08:33 +0000 (17:08 +0300)]
wl12xx: fix fm_coex parameters configuration
Wrong fm_coex parameters were set during wl12xx
init phase, fix it.
Signed-off-by: Ziv Riesel <zivriesel@ti.com>
Signed-off-by: Victor Goldenshtein <victorg@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Arik Nemtsov [Tue, 15 May 2012 13:46:58 +0000 (16:46 +0300)]
wlcore: remove duplicate BUG_ON during recovery
This BUG_ON also ignored the INTENDED_FW_RECOVERY flag. This would
result in a BUG() when using the bug_on_recovery module parameter during
multi-role.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Eliad Peller [Tue, 15 May 2012 13:46:57 +0000 (16:46 +0300)]
wlcore: increase WL1271_EVENT_TIMEOUT
In some cases, the ROC_COMPLETE event might exceed the
current timeout (750 msec). Increase it to 1 sec.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Eliad Peller [Tue, 15 May 2012 13:46:56 +0000 (16:46 +0300)]
wlcore: flush tx on CHANGE_CHANNEL
On CHANGE_CHANNEL indication, we should flush all the
queued tx frames, so they will be sent on the correct
(current) channel.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Yoni Divinsky [Tue, 8 May 2012 11:02:14 +0000 (14:02 +0300)]
wlcore: fix the CONF_TX_AC_ANY_TID to be 0xff
In the enum conf_tx_ac CONF_TX_AC_ANY_TID should
be 0xff to match the firmware's implementation.
Signed-off-by: Yoni Divinsky <yoni.divinsky@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Yoni Divinsky [Tue, 8 May 2012 11:02:12 +0000 (14:02 +0300)]
wl12xx: set the irq polarity before loading the fw
The polarity should be set before the firmware is loaded
since the firmware touches the same register. Access
of the firmware and driver to the same register will
cause a collision since there is no exclusion scheme.
Signed-off-by: Yoni Divinsky <yoni.divinsky@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Yoni Divinsky [Tue, 8 May 2012 11:02:11 +0000 (14:02 +0300)]
wlcore: use psd_type indexing according to spec
In ieee80211.h the uapsd bit mask is defined such that
VO=BIT(0), VI=BIT(1), BK=BIT(2), BE=BIT(3).
The firmware uses the indexing as defined in the ieee80211
spec, meaning that VO=3, VI=2, BK=1, BE=0.
In AP mode when adding peer wlcore needs to convert
the indexing accordingly.
Signed-off-by: Yoni Divinsky <yoni.divinsky@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Eliad Peller [Tue, 15 May 2012 14:09:00 +0000 (17:09 +0300)]
wlcore: set wl->ht_cap per-band
Save the ht_cap IE per-band, so we can configure different
params to BG and A bands (we currently don't support MIMO
on A band)
[Small fix for rx_highest - Arik]
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Arik Nemtsov [Tue, 15 May 2012 14:08:59 +0000 (17:08 +0300)]
wl18xx: add dependency on mac80211
Add a dependency on mac80211 in Kconfig, and also replace some spaces
with tabs.
Reported-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Assaf Azulay [Tue, 15 May 2012 14:08:58 +0000 (17:08 +0300)]
wlcore: increase number of BA sessions to 3
With the new FW (sigle role X.3.8.0.108, multi role X.5.4.0.21)
we are supporting 3 RX BA sessions, this change is to support this
new ability.
Signed-off-by: Assaf Azulay <assaf@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Igal Chernobelsky [Tue, 15 May 2012 14:08:57 +0000 (17:08 +0300)]
wlcore: modify bss loss parameters
Modify default parameters to reduce firmware BSS lose
probability in congested environment.
[Applied to 18xx configuration as well - Arik]
Signed-off-by: Igal Chernobelsky <igalc@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Eliad Peller [Tue, 15 May 2012 14:08:56 +0000 (17:08 +0300)]
wlcore: flush before stopping AP
Make sure the deauth bcast gets sent
[Make sure we are AP as well before the flush - Arik]
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Eliad Peller [Tue, 15 May 2012 14:08:55 +0000 (17:08 +0300)]
wlcore: use correct link for bcast/multicast frames
Multicast management frames (e.g. global deauth)
should be sent out on the bcast link, rather than
the global, which should be used only for pre-added
stations (e.g. for auth/assoc resp).
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Eyal Shapira <eyal@wizery.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Arik Nemtsov [Tue, 15 May 2012 14:08:54 +0000 (17:08 +0300)]
wlcore: fixes for connection_loss_work
We can't use cancel_delayed_work_sync() from functions that take the
wl->mutex, since connection_loss_work also takes the mutex. This might
result in a deadlock. Restructure the code so the work is synchronously
canceled before taking the mutex.
Avoid a bug where we would indefinitely delay the connection loss
indication by re-queuing the connection loss work on consecutive beacon
loss events.
Cc: bartosz.markowski <bartosz.markowski@tieto.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Arik Nemtsov [Tue, 15 May 2012 14:08:53 +0000 (17:08 +0300)]
wlcore: fix dynamic_ps_timeout time regression
In patch
d7b63b9fc7ee73e75a4c7fdb899 we have raised the dynamic
PS timeout to 200ms to improve user experience. Re-apply the change,
since it was reverted in the wlcore split.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Eliad Peller [Tue, 15 May 2012 14:08:52 +0000 (17:08 +0300)]
wlcore: use the original elp time in forced_ps mode
The dynamic PS timeout is meaningless in forced PS mode.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Arik Nemtsov [Tue, 15 May 2012 14:08:51 +0000 (17:08 +0300)]
wlcore: fix sparse warnings related to static functions
The "static" modifier was mistakenly forgotten for some functions.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Luciano Coelho [Mon, 4 Jun 2012 21:02:25 +0000 (00:02 +0300)]
wlcore/wl12xx/wl18xx: don't use TX align quirk for wl127x
Commit 4afc37 (wlcore: reorder identify_chip and get_hw_info) broke
support for wl127x chips.
When we moved the identify_chip operation to an earlier stage (ie. to
the probe function), we broke wl127x support because during HW init we
would set the WLCORE_QUIRK_TX_BLOCKSIZE_ALIGN.
To avoid this, set this quirk in the identify_chip operations and only
force it to be unset if the bus module doesn't support it. We were
doing the opposite and setting the flag if the bus module supports it.
Signed-off-by: Luciano Coelho <coelho@ti.com>
Assaf Azulay [Thu, 10 May 2012 09:14:23 +0000 (12:14 +0300)]
wl18xx: change default tcp_checksum to false
as tcp check sum is going to be removed from firmware, and as
there is a problem with getting dns in security when checksum is
enabled, it was decided to disable it by default.
for none security modes it can be enabled by module paramenter.
Signed-off-by: Assaf Azulay <assaf@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Luciano Coelho [Thu, 10 May 2012 09:14:22 +0000 (12:14 +0300)]
wl18xx: use new fw stats structures
Some of the structures were updated, other structures had a few
missing values and a few new ones were added. Change the driver
structs accordingly.
Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Luciano Coelho [Thu, 10 May 2012 09:14:21 +0000 (12:14 +0300)]
wl18xx: increase tx_ba_win_size to 64
Now the firmware can support TX block ack sessions with 64 frames.
Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Luciano Coelho [Thu, 10 May 2012 09:14:20 +0000 (12:14 +0300)]
wlcore: increase aggregation buffer size by one page
With 4 pages (16Kb), we can't fit 10 frames in the aggregation buffer
during iperf. This is the optimal for the firmware. Thus, increase
the buffer size by one page.
Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Luciano Coelho [Thu, 10 May 2012 09:14:19 +0000 (12:14 +0300)]
wlcore/wl12xx/wl18xx: move lower driver debugfs to a subdir
Instead of adding more files from the lower drivers into the same
directory in debugfs as wlcore, we now add a subdirectory for the
lower driver. This makes things a bit easier, because we can quickly
see where the debugfs entry is implemented and what is specific to the
lower driver.
Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Luciano Coelho [Thu, 10 May 2012 09:14:18 +0000 (12:14 +0300)]
wl18xx: export pwr_limit_reference_11_abg value as a module parameter
Yet another temporary module parameter requested by the firmware team.
This will be replaced by the conf binary.
Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Luciano Coelho [Thu, 10 May 2012 09:14:17 +0000 (12:14 +0300)]
wl18xx: export low/high band component values as module params
We use hardcoded values for the different board types. In some cases
we may need to override the defaults, so export the values as module
params. If not defined, the defaults for the specified board type
will be used.
Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Luciano Coelho [Thu, 10 May 2012 09:14:16 +0000 (12:14 +0300)]
wl18xx: add power limit reference value to mac_and_phy settings
With more recent PHY firmware versions (>8.1.0.0.116), we need to use
the correct value for the pwr_limit_reference_11_abg parameter when
setting the mac_and_phy options.
For now we use a hardcoded 0xc8 as the value. This will be moved to
the configuration binary when it gets implemented.
Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Luciano Coelho [Thu, 10 May 2012 09:14:15 +0000 (12:14 +0300)]
wl18xx: add module parameter to force SISO 20MHz
In some cases it may be useful to force narrow-band SISO channels.
Add a new value to the ht_mode module parameter to force the device to
operate in SISO 20MHz.
Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Luciano Coelho [Thu, 10 May 2012 09:14:14 +0000 (12:14 +0300)]
wlcore: use proper values for supported local rates
We were setting all the rates bits when starting the AP role. Instead
of doing this, we should set only the rates we really support
(eg. MIMO rates or wide-channel rates). This commit changes that so
that we always use the default rates (basic rates + MCS0-7) and add
the values returned by the ap_get_mimo_wide_rate_mask operation.
Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Luciano Coelho [Thu, 10 May 2012 09:14:13 +0000 (12:14 +0300)]
wl18xx: don't use MIMO when ht_mode is set to wide
If the wl18xx module is loaded with ht_mode=wide (the default), we
shouldn't use MIMO rates when the channel type is not HT40. Fix this
by checking the ht_mode before deciding which rates to used.
Additionally, set the ht_mode parameter explicitly to "wide" as the
default.
Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Luciano Coelho [Thu, 10 May 2012 09:14:12 +0000 (12:14 +0300)]
wlcore: print the interrupt status when recovery is triggered
In some cases it may be useful for debugging to check what is the
status of the interrupt register when a hardware recovery happens.
Print the contents of REG_INTERRUPT_NO_CLEAR (aka. HINT_STS_RAW) when
recovery starts.
Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Luciano Coelho [Thu, 10 May 2012 09:14:11 +0000 (12:14 +0300)]
wl18xx: print the PHY firmware version from the private static data
The wl18xx firmware writes the PHY firmware version in the static
data. Add an operation to parse the static data and print the PHY
firmware version when booting.
Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Luciano Coelho [Thu, 10 May 2012 09:14:10 +0000 (12:14 +0300)]
wlcore: create private static_data area and add operation to parse it
The wl18xx firmware has more information in the static_data than
wl12xx. To be able to parse that in an abstracted way, this patch
adds a priv area to the static data struct and an operation that
allows the lower driver to parse it if necessary.
Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Luciano Coelho [Thu, 10 May 2012 09:14:09 +0000 (12:14 +0300)]
wl18xx: implement fw status debugfs entries
Implement the operations that are necessary to fetch the
wl18xx-specific FW statistics and export them in debugfs.
Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Luciano Coelho [Thu, 10 May 2012 09:14:08 +0000 (12:14 +0300)]
wl12xx: implement fw status debugfs entries
Implement the operations that are necessary to fetch the
wl12xx-specific FW statistics. Re-add some of the code removed from
wlcore.
Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Luciano Coelho [Thu, 10 May 2012 09:14:07 +0000 (12:14 +0300)]
wlcore: add debugfs macro to help print fw statistics arrays
Add a macro to make it easy to print arrays from the FW statistics
array in debugfs. At the same time, increase the buffer size so
arrays fit more easily.
Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Luciano Coelho [Thu, 10 May 2012 09:14:06 +0000 (12:14 +0300)]
wlcore: abstract debugfs fw_stats to be handled by the lower drivers
The FW statistics differ from hardware to hardware. This commit
prepares for hardware-specific implementation of the FW statistics
debugfs entries.
Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Luciano Coelho [Thu, 10 May 2012 09:14:05 +0000 (12:14 +0300)]
wlcore: use all AP basic rates as default
Sometimes we get a BSS_CHANGED_BEACON_ENABLED event before the basic
rates have been properly set. To avoid problems with the firmware not
expecting to receive frames at rates that are not set during
CMD_START_ROLE, we now start with all basic rates by default.
Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Luciano Coelho [Thu, 10 May 2012 09:14:04 +0000 (12:14 +0300)]
wlcore: update beacon and probe_resp templates when rates change
When the data rates change, we get BSS_CHANGED_BASIC_RATES. At this
point, we should update all the templates to match the new rates. We
were changing some of the templates, but the beacon and the probe
response templates were missing.
[Remove redundant min_rate variable - Arik]
Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Luciano Coelho [Thu, 10 May 2012 09:14:03 +0000 (12:14 +0300)]
wl18xx: disable MCS_13 for wl18xx PG 1.0
There are some problems with MCS_13 in PG 1.0 hardware. So we disable
it when PG 1.0 is detected.
Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Luciano Coelho [Thu, 10 May 2012 09:14:02 +0000 (12:14 +0300)]
wlcore: reorder identify_chip and get_hw_info
We can do get the HW information and identify the chip already at
probe time. This makes it easier to mangle with the parameters during
identify chip before registering the hardware with mac80211.
Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Luciano Coelho [Thu, 10 May 2012 09:14:01 +0000 (12:14 +0300)]
wl18xx: change low_band_component_type value for COM8
Like HDK, COM8 uses 0x06 for the low_band_component_type as well.
Hardcode the value for COM8 until this configuration can be done in
the external configuration binary (to be implemented).
Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Luciano Coelho [Thu, 10 May 2012 09:14:00 +0000 (12:14 +0300)]
wlcore: add space for private area when allocating fw_status
When allocating the fw_status structure, the space for the
lower-driver private area was missing. This was causing an illegal
write outside the allocated area, which was causing random oopses
around the kernel.
Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Luciano Coelho [Thu, 10 May 2012 09:13:59 +0000 (12:13 +0300)]
wl18xx: changed default board_type to HDK
Since the most common board we're using now is an HDK board, change
the default board_type to hdk.
Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Luciano Coelho [Thu, 10 May 2012 09:13:58 +0000 (12:13 +0300)]
wl18xx: copy the default configuration before checking the board_type
We were changing the low_band_component_type in the private
configuration structure before copying the default values to it, so
the change was overwritten and only took effect after HW recovery.
Reported-by: Dror Erez <drorer@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Luciano Coelho [Thu, 10 May 2012 09:13:57 +0000 (12:13 +0300)]
wlcore: add module parameter to dump SDIO reads and writes
In some cases we may want to dump all the SDIO data in order to get
detailed information for debugging the communication with the
firmware.
Add printks to dump the data and a module parameter to enable/disable
it.
Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Luciano Coelho [Thu, 10 May 2012 09:13:56 +0000 (12:13 +0300)]
wl18xx: add a module parameter to control 11a support
In wl18xx we don't have an NVS yet, so we need to control whether 11a
is supported with a module parameter for now. 11a support is enabled
by default and can be changed by setting enable_11a to false when
loading the module.
Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Luciano Coelho [Thu, 10 May 2012 09:13:55 +0000 (12:13 +0300)]
wl18xx: derive the MAC address from the BD_ADDR in fuse ROM
Add the get_mac operation in order to fetch the BD_ADDR from fuse ROM,
so that we can derive the WLAN MAC addresses from it.
Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Arik Nemtsov [Thu, 10 May 2012 09:13:54 +0000 (12:13 +0300)]
wlcore/wl12xx/18xx: split fw_status struct into two
The number of RX packet descriptors may vary from chip to chip and
in different firmware versions. Unfortunately, the array that
contains the actual descriptors is in the middle of the fw_status
structure. To manage this, we split the struct into two so we can
calculate the offset of what comes after the array and access the last
elements more easily.
[Changed the STATUS_LEN macro to be placement agnostic - Arik]
Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Luciano Coelho [Thu, 10 May 2012 09:13:53 +0000 (12:13 +0300)]
wl18xx: add module parameter to disable TCP checksum
Add a new module parameter to disable TCP checksum offload.
Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Luciano Coelho [Thu, 10 May 2012 09:13:52 +0000 (12:13 +0300)]
wl18xx: add number of antennas and dc2dc type as module params
We need to specify the number of 2.4GHz and 5GHz antennas and whether
the board has an internal or external DC2DC. Add some module
parameters that allow changing that.
In the future this will come from the "NVS" file.
Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Luciano Coelho [Thu, 10 May 2012 09:13:51 +0000 (12:13 +0300)]
wl18xx: change the low_band_component_type for HDK boards
Currently, all HDK boards use low_band_component_type 0x06. In the
future this may change, but for now, we hardcode this value when the
board_type is set to HDK.
Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Luciano Coelho [Thu, 10 May 2012 09:13:50 +0000 (12:13 +0300)]
wl18xx: add plt_init operation
Add the correct FW name for PLT (which is the same as the normal
firmware) and implement the plt_init operation.
Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Luciano Coelho [Thu, 10 May 2012 09:13:49 +0000 (12:13 +0300)]
wlcore/wl12xx: add plt_init op and move the code to wl12xx
PLT mode needs to be initialized differently for each chip. This
patch adds an operation to init PLT and moves the existing PLT
initialization into the wl12xx driver.
Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Arik Nemtsov [Thu, 10 May 2012 09:13:48 +0000 (12:13 +0300)]
wl18xx: change board type enum according to new FW
Add more board types and remove a now unneeded write to SCR_PAD2 setting
the board type.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Arik Nemtsov [Thu, 10 May 2012 09:13:47 +0000 (12:13 +0300)]
wl18xx: don't upload NVS to FW
In this chip family the NVS file should not be uploaded to FW. In fact,
we encounter strange bugs (sdio errors) when trying to upload it with
certain parameters.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Arik Nemtsov [Thu, 10 May 2012 09:13:46 +0000 (12:13 +0300)]
wl18xx: init Tx-released index to 0 on HW init
This ensures the index is 0 on FW recovery and prevents spurious error
prints - "WARNING illegal id in tx completion".
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Luciano Coelho [Thu, 10 May 2012 09:13:45 +0000 (12:13 +0300)]
wlcore/wl12xx: move rx_mem_pool_addr element to wl12xx
Only wl127x chips use the rx_mem_pool_addr values, which need to be
given to the firmware as part of the RX path. Move this from core to
the wl12xx driver.
Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Arik Nemtsov [Thu, 10 May 2012 09:13:44 +0000 (12:13 +0300)]
wl18xx: implement hw op to read PG version
Read the HW PG version of the 18xx chip from FUSE.
Based on an earlier patch by Luciano Coelho <coelho@ti.com>.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Luciano Coelho [Thu, 10 May 2012 09:13:43 +0000 (12:13 +0300)]
wlcore/wl12xx: move ref_clock and tcxo_clock elements to wl12xx
Only wl12xx needs to get the ref_clock anc tcxo_clock values from the
platform data. Move these elements from the wl1271 structure to
wl12xx's private data.
Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Luciano Coelho [Thu, 10 May 2012 09:13:42 +0000 (12:13 +0300)]
wlcore: rename wl12xx.h to wlcore_i.h
The wl12xx.h file now contains mostly definitions that are internal to
wlcore. Still, some things need to me moved to the public header, so
for now we keep including it in wlcore.h.
Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Luciano Coelho [Thu, 10 May 2012 09:13:41 +0000 (12:13 +0300)]
wl18xx: read clock frequency and do top init accordingly
Instead of using hardcoded values for a single frequency, we need to
read the frequency and use the appropriate values for it in the top
initialization.
Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Arik Nemtsov [Thu, 10 May 2012 09:13:40 +0000 (12:13 +0300)]
wl18xx: disable FW log functionality
Currently (Fw .67) appears to do more harm than good.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Arik Nemtsov [Thu, 10 May 2012 09:13:39 +0000 (12:13 +0300)]
wl18xx: read FW pc on recovery
Define the FW pc in the 18xx register translation table. This specific
register is only valid in the boot partition, so change the momentarily
change partitions. This doesn't damage 12xx cards, where the FW pc is
accessible via boot partition as well.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Luciano Coelho [Thu, 10 May 2012 09:13:38 +0000 (12:13 +0300)]
wl18xx: translate and write the board type to SCR_PAD2
The firmware uses the SCR_PAD2 register to read the board type passed
from the driver. The values don't match the ones used in the mac and
phy configuration, so we need to map them before writing. This commit
adds a translation table that is used when writing the board type to
SCR_PAD2.
Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Luciano Coelho [Thu, 10 May 2012 09:13:37 +0000 (12:13 +0300)]
wl18xx: add board type module argument
Different board types (ie. FPGA, HDK and DVP/EVB) require slightly
different init configuration options. Since we cannot probe the type
of board from the actual hardware, we need to pass it as an option
during module load.
This patch adds a module parameters that accepts the 3 different board
types, with DVP/EVB as the default, and uses this value where needed.
Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Arik Nemtsov [Thu, 10 May 2012 09:13:36 +0000 (12:13 +0300)]
wl18xx: add module param for overriding HT caps
Set an alternate HT cap allowing MIMO rates (but only 20mhz) channels,
when the module is loaded with ht_mode=mimo.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>