Jes Sorensen [Mon, 29 Feb 2016 22:04:41 +0000 (17:04 -0500)]
rtl8xxxu: Initial rtl8723bu_init_bt() code
This should initialize the antennas on the 8723bu, but so far I am
still not receiving anything :( More work is needed.
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Jes Sorensen [Mon, 29 Feb 2016 22:04:40 +0000 (17:04 -0500)]
rtl8xxxu: Initial implementation of rtl8723bu_config_channel()
This is a first stab of implementing rtl8723bu_config_channel(). For
now this will only do 20MHz channels.
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Jakub Sitnicki [Mon, 29 Feb 2016 22:04:39 +0000 (17:04 -0500)]
rtl8xxxu: rtl8192eu: Map out EFUSE TX power area
TX power values are laid out differently in EFUSE found in RTL8192EU &
RTL8188EU devices. TX power indices and differences for each RF path
are not interleaved (A, B, A, B), as in other chips, but follow one
another (A, B, C, D).
Signed-off-by: Jakub Sitnicki <jsitnicki@gmail.com>
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Jes Sorensen [Mon, 29 Feb 2016 22:04:38 +0000 (17:04 -0500)]
rtl8xxxu: Remove backing up certain registers, which was never used
This was inspired by the vendor driver, but in the end never used for
anything.
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Jes Sorensen [Mon, 29 Feb 2016 22:04:37 +0000 (17:04 -0500)]
rtl8xxxu: Do LC calibration before IQK calibration
This matches the flow of the vendor driver for newer hardware, and
doesn't seem to cause issues for the older parts.
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Jes Sorensen [Mon, 29 Feb 2016 22:04:36 +0000 (17:04 -0500)]
rtl8xxxu: Handle S0S1 register in lc_calibrate()
Newer chips (8723bu/8192eu) has S0S1 settings which needs to be dealt
with during LC calibration.
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Jes Sorensen [Mon, 29 Feb 2016 22:04:35 +0000 (17:04 -0500)]
rtl8xxxu: First stab at adding IQK calibration for 8723bu parts
The 8723bu also has it's own IQK calibration process. This is similar
in flow, but still different enough to warrent it's own
implementation, at least for now.
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Jes Sorensen [Mon, 29 Feb 2016 22:04:34 +0000 (17:04 -0500)]
rtl8xxxu: Add a couple of new register definitions
This adds some additional register definitions for 8723bu, as well as
a bit define for USB RXDMA aggregation in REG_RXDMA_AGG_PG_TH.
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Jes Sorensen [Mon, 29 Feb 2016 22:04:33 +0000 (17:04 -0500)]
rtl8xxxu: Make rtl8xxxu_add_path_on() use device specific init values
rtl8192cu/rtl8188cu/rtl8723au use the same values, but 8723bu and
8192eu have their own.
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Jes Sorensen [Mon, 29 Feb 2016 22:04:32 +0000 (17:04 -0500)]
rtl8xxxu: Use correct formatting type to print sizeof()
Usual gcc i386 issue reported by kbuildbot
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Jes Sorensen [Mon, 29 Feb 2016 22:04:31 +0000 (17:04 -0500)]
rtl8xxxu: Do not overwrite rtl8xxxu_debug for untested chips
Fix a silly bug where the debug level was overwritten rather than
amended for untested chips.
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Jes Sorensen [Mon, 29 Feb 2016 22:04:30 +0000 (17:04 -0500)]
rtl8xxxu: Do BT_WLAN_CALIBRATION before doing IQK calibration
Newer generation chips require the firmware be notified before we
start the IQK calibration.
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Jes Sorensen [Mon, 29 Feb 2016 22:04:29 +0000 (17:04 -0500)]
rtl8xxxu: rtl8xxxu_h2c_cmd(): Add size argument
The firmware command API differs slightly between new and old
devices. The new generation requires the size since there is no
extension bit encoded into the command number.
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Jes Sorensen [Mon, 29 Feb 2016 22:04:28 +0000 (17:04 -0500)]
rtl8xxxu: rtl8723bu_parse_efuse(): Use a pointer to the struct rtl8723bu_efuse
Likewise for 8723bu, use a pointer to the efuse.
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Jes Sorensen [Mon, 29 Feb 2016 22:04:27 +0000 (17:04 -0500)]
rtl8xxxu: rtl8192eu_parse_efuse(): Use a pointer to the struct rtl8192eu_efuse
Make the code easier to read and less error prone by using a pointer
to the efuse.
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Jakub Sitnicki [Mon, 29 Feb 2016 22:04:26 +0000 (17:04 -0500)]
rtl8xxxu: rtl8192cu: Introduce a pointer to efuse
Signed-off-by: Jakub Sitnicki <jsitnicki@gmail.com>
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Jakub Sitnicki [Mon, 29 Feb 2016 22:04:25 +0000 (17:04 -0500)]
rtl8xxxu: rtl8723au: Introduce a pointer to efuse
Signed-off-by: Jakub Sitnicki <jsitnicki@gmail.com>
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Jakub Sitnicki [Mon, 29 Feb 2016 22:04:24 +0000 (17:04 -0500)]
rtl8xxxu: Skip disabled efuse words early
Avoid a negative conditional and an extra level of indentation in the
bigger part of the loop body.
Signed-off-by: Jakub Sitnicki <jsitnicki@gmail.com>
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Jakub Sitnicki [Mon, 29 Feb 2016 22:04:23 +0000 (17:04 -0500)]
rtl8xxxu: Don't check for illegal offset when reading from efuse
It is enough to check for either illegal offset or illegal map address
because map address is a value derived from an offset:
map_addr = offset * 8
EFUSE_MAP_LEN = EFUSE_MAX_SECTION_8723A * 8
Leave just the check for an illegal map address because its upper
bound (EFUSE_MAP_LEN) is used also in a couple other places.
Signed-off-by: Jakub Sitnicki <jsitnicki@gmail.com>
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Jes Sorensen [Mon, 29 Feb 2016 22:04:22 +0000 (17:04 -0500)]
rtl8xxxu: Add definitions for new generation h2c commands
The larger mailboxes also use a different set of mailbox commands.
This provides a list of the 64 bit commands.
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Jes Sorensen [Mon, 29 Feb 2016 22:04:21 +0000 (17:04 -0500)]
rtl8xxxu: Group USB fixups together for all chips
In addition do not apply fixups for 8188/8191/8192 A-cut UMC parts.
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Jes Sorensen [Mon, 29 Feb 2016 22:04:20 +0000 (17:04 -0500)]
rtl8xxxu: Add some missing register definitions for 8723bu
This introduces additional register definitions for newer generation
chips.
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Jes Sorensen [Mon, 29 Feb 2016 22:04:19 +0000 (17:04 -0500)]
rtl8xxxu: Handle 32 bit mailbox extension regs found on 8723bu/8192eu/8812
Gen1 chips use a 16 bit mailbox extension register, for upto 48 bit
mailbox commands. The newer generation chips use a 32 bit mailbox
extension register instead, for upto 64 bit mailbox commands.
Handle writing the larger mailboxes.
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Jes Sorensen [Mon, 29 Feb 2016 22:04:18 +0000 (17:04 -0500)]
rtl8xxxu: Add 8723by AGC table
The different RF module seems to require a different AGC table as well
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Jes Sorensen [Mon, 29 Feb 2016 22:04:17 +0000 (17:04 -0500)]
rtl8xxxu: Add rtl8723b_mac_init_table
Newer chips seem to have some different mac registers, requiring
a different init table.
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Jes Sorensen [Mon, 29 Feb 2016 22:04:16 +0000 (17:04 -0500)]
rtl8xxxu: Add rtl8723bu_phy_init_antenna_selection()
So far this is just for 8723BU. It includes writing to a number of
registers I have seen no description for so far.
0x0064
0x0930
0x0944
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Jes Sorensen [Mon, 29 Feb 2016 22:04:15 +0000 (17:04 -0500)]
rtl8xxxu: Add rtl8723bu_radioa_1t_init_table
Add 8723bu 1T radio init table. The vendor driver indicates that some
registers need special treatment for TFBGA90, TFBGA80, and TFBGA79
packaging. However the vendor driver never actually checks the package
type, so just stick to default values here.
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Jes Sorensen [Mon, 29 Feb 2016 22:04:14 +0000 (17:04 -0500)]
rtl8xxxu: Add rtl8723b_phy_1t_init_table
This adds the 8723bu PHY 1T init table.
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Jes Sorensen [Mon, 29 Feb 2016 22:04:13 +0000 (17:04 -0500)]
rtl8xxxu: Only setup USB interrupts for parts which support it
Only 1st generation chips do provide USB interrupts, so do not try to
setup interrupts for newer chips (8192eu and 8723bu).
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Jes Sorensen [Mon, 29 Feb 2016 22:04:12 +0000 (17:04 -0500)]
rtl8xxxu: Use 1024 byte writes for writing 8723bu firmware
The 8723bu, like the 8192eu, can also handle 1024 byte block writes.
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Jes Sorensen [Mon, 29 Feb 2016 22:04:11 +0000 (17:04 -0500)]
rtl8xxxu: Add rtl8723bu_parse_efuse() and 8723bu efuse definition
Implement first stab at parsing the 8723bu's efuse.
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Jes Sorensen [Mon, 29 Feb 2016 22:04:10 +0000 (17:04 -0500)]
rtl8xxxu: Initial rtl8723bu chip identification
This provides initial detection of 8723bu devices, and selects the
correct firmware image to load.
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Jes Sorensen [Mon, 29 Feb 2016 22:04:09 +0000 (17:04 -0500)]
rtl8xxxu: Init REG_HIMR[01] for 8192eu parts
The newer generation chips have different interrupt registers.
Initialize this correct registers on 8192eu.
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Jes Sorensen [Mon, 29 Feb 2016 22:04:08 +0000 (17:04 -0500)]
rtl8xxxu: Kludge to drop incorrect USB OUT EP for 8192EU
The 8192eu (and some other parts) will report an incorrect USB OUT
EP. This tells the chip to drop it - as per the vendor driver.
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Jes Sorensen [Mon, 29 Feb 2016 22:04:07 +0000 (17:04 -0500)]
rtl8xxxu: Fix incorrect test for auto LLT failure
The logic for testing auto load failure in rtl8xxxu_auto_llt_table()
was inverted.
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Jes Sorensen [Mon, 29 Feb 2016 22:04:06 +0000 (17:04 -0500)]
rtl8xxxu: Init the LLT after we start the firmware
To match the flow of the vendor driver, move the LLT init to after the
firmware is started.
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Jes Sorensen [Mon, 29 Feb 2016 22:04:05 +0000 (17:04 -0500)]
rtl8xxxu: Init page boundaries before starting the firmware
This reorganizes the device initialization to init page boundaries
before starting the firmware. This matches the flow in the 8192eu
vendor driver.
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Jes Sorensen [Mon, 29 Feb 2016 22:04:04 +0000 (17:04 -0500)]
rtl8xxxu: Add rtl8xxxu_auto_llt_table()
Newer chips can auto load the LLT table, it is no longer necessary to
build it manually in the driver.
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Jes Sorensen [Mon, 29 Feb 2016 22:04:03 +0000 (17:04 -0500)]
rtl8xxxu: Implment rtl8192eu_power_on()
This implements the rtl8192eu power on sequence, and splits it off
from the rtl8192cu/rtl8723au power on sequence.
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Jes Sorensen [Mon, 29 Feb 2016 22:04:02 +0000 (17:04 -0500)]
rtl8xxxu: Add rtl8192eu_nic.bin to the MODULE_FIRMWARE list
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Jes Sorensen [Mon, 29 Feb 2016 22:04:01 +0000 (17:04 -0500)]
rtl8xxxu: Use 1024 byte block loads for 8192eu firmware
The rtl8192eu can handle 1024 byte block writes, unlike it's
predecessors (8192cu/8188cu).
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Jes Sorensen [Mon, 29 Feb 2016 22:04:00 +0000 (17:04 -0500)]
rtl8xxxu: Identify chip vendors correctly
This identifies the chip vendors correctly and also picks the correct
firmware for rtl8192eu.
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Jes Sorensen [Mon, 29 Feb 2016 22:03:59 +0000 (17:03 -0500)]
rtl8xxxu: Add initial code to parse rtl8192eu efuse
This is the start of 8192eu support. For now just detect the device
and parse the efuse.
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Eliad Peller [Sun, 6 Mar 2016 22:28:09 +0000 (00:28 +0200)]
wlcore/wl18xx: add radar_debug_mode handling
Add debugfs key (under CFG80211_CERTIFICATION_ONUS
configuration) to set/clear radar_debug_mode.
In this mode, the driver simply ignores radar
events (but prints them).
The fw is notified about this mode through
a special generic_cfg_feature command.
This mode is relevant only for ap mode. look for
it when initializing ap vif.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Eliad Peller [Sun, 6 Mar 2016 22:28:08 +0000 (00:28 +0200)]
wlcore: don't WARN_ON in case of existing ROC
When working with AP + P2P, it's possible to get into
a state when the AP is in ROC (due to assiciating station)
while trying to ROC on the P2P interface.
Replace the WARN_ON with wl1271_error to avoid warnings
in this case.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Amitkumar Karwar [Wed, 9 Mar 2016 12:21:11 +0000 (04:21 -0800)]
mwifiex: Empty Tx queue during suspend
In cfg80211 suspend handler, stop the netif queue and
wait until all the Tx queues become empty. Start the
queues in resume handler.
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Hui Wang [Wed, 9 Mar 2016 07:25:26 +0000 (15:25 +0800)]
brcmfmac: Remove waitqueue_active check
We met a problem of pm_suspend when repeated closing/opening the lid
on a Lenovo laptop (1/20 reproduce rate), below is the log:
[ 199.735876] PM: Entering mem sleep
[ 199.750516] e1000e: EEE TX LPI TIMER:
00000011
[ 199.856638] Trying to free nonexistent resource <
000000000000d000-
000000000000d0ff>
[ 201.753566] brcmfmac: brcmf_pcie_suspend: Timeout on response for entering D3 substate
[ 201.753581] pci_legacy_suspend(): brcmf_pcie_suspend+0x0/0x1f0 [brcmfmac] returns -5
[ 201.753585] dpm_run_callback(): pci_pm_suspend+0x0/0x160 returns -5
[ 201.753589] PM: Device 0000:04:00.0 failed to suspend async: error -5
Through debugging, we found when problem happens, it is not the device
fails to enter D3, but the signal D3_ACK comes too early to pass the
waitqueue_active() check.
Just like this:
brcmf_pcie_send_mb_data(devinfo, BRCMF_H2D_HOST_D3_INFORM);
// signal is triggered here
wait_event_timeout(devinfo->mbdata_resp_wait, devinfo->mbdata_completed,
BRCMF_PCIE_MBDATA_TIMEOUT);
So far I think it is safe to remove waitqueue_active check since there
is only one place to trigger this signal (sending
BRCMF_H2D_HOST_D3_INFORM). And it is not a problem calling wake_up
event earlier than calling wait_event.
Cc: Brett Rudley <brudley@broadcom.com>
Cc: Hante Meuleman <meuleman@broadcom.com>
Cc: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Cc: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Cc: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Dan Carpenter [Tue, 8 Mar 2016 12:04:08 +0000 (15:04 +0300)]
libertas: fix an error code in probe
We accidentally return success instead of a negative error code.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Kalle Valo [Thu, 10 Mar 2016 12:53:35 +0000 (14:53 +0200)]
Merge tag 'iwlwifi-next-for-kalle-2016-03-09_2' of https://git./linux/kernel/git/iwlwifi/iwlwifi-next
* update GSCAN capabilities (Ayala)
* fix AES-CMAC in AP mode (Johannes)
* adapt prints to new firmware API
* rx path improvements (Sara and Gregory)
* fixes for the thermal / cooling device code (Chaya Rachel)
* fixes for GO uAPSD handling
* more code for the 9000 device family (Sara)
* infrastructure work for firmware notification (Chaya Rachel)
* improve association reliablity (Sara)
* runtime PM fixes
* fixes for ROC (HS2.0)
Ayala Beker [Wed, 3 Feb 2016 13:36:52 +0000 (15:36 +0200)]
iwlwifi: mvm: update GSCAN capabilities
Gscan capabilities were updated with new capabilities supported
by the device. While at it, simplify the firmware support
conditional and move both conditions into the WARN() to make it
easier to undertand and use the unlikely() for both.
Signed-off-by: Ayala Beker <ayala.beker@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Johannes Berg [Wed, 9 Mar 2016 13:58:47 +0000 (14:58 +0100)]
iwlwifi: mvm: don't try to offload AES-CMAC in AP/IBSS modes
The firmware/hardware only supports checking AES-CMAC on RX, not
using it on TX. For station mode this is fine, since it's the only
thing it will ever do. For AP mode, it never receives such frames,
but must be able to transmit them. This is currently broken since
we try to enable them for hardware crypto (for RX only) and then
treat them as TX_CMD_SEC_EXT, leading to FIFO underruns during TX
so the frames never go out to the air.
To fix this, simply use software on TX in AP (and IBSS) mode.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Emmanuel Grumbach [Mon, 7 Mar 2016 08:16:38 +0000 (10:16 +0200)]
iwlwifi: mvm: adapt the firmware assert log to new firmware
Newer firmware versions put different data in the memory
which is read by the driver upon firmware crash. Just
change the variable names in the code and the name of the
data in the log that we print withouth any functional
change.
On older firmware, there will be a mismatch between the
names that are printed and the content itself, but that's
harmless.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Gregory Greenman [Mon, 29 Feb 2016 13:34:25 +0000 (15:34 +0200)]
iwlwifi: pcie: avoid restocks inside rx loop if not emergency
When trying to reach high Rx throughput of more than 500Mbps on
a device with a relatively weak CPU (Atom x5-Z8500), CPU utilization
may become a bottleneck. Analysis showed that we are looping in
iwl_pcie_rx_handle for very long periods which led to starvation
of other threads (iwl_pcie_rx_handle runs with _bh disabled).
We were handling Rx and allocating new buffers and the new buffers
were ready quickly enough to be available before we had finished
handling all the buffers available in the hardware. As a
consequence, we called iwl_pcie_rxq_restock to refill the hardware
with the new buffers, and start again handling new buffers without
exiting the function. Since we read the hardware pointer again when
we goto restart, new buffers were handled immediately instead of
exiting the function.
This patch avoids refilling RBs inside rx handling loop, unless an
emergency situation is reached. It also doesn't read the hardware
pointer again unless we are in an emergency (unlikely) case.
This significantly reduce the maximal time we spend in
iwl_pcie_rx_handle with _bh disabled.
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Chaya Rachel Ivgi [Sun, 14 Feb 2016 12:03:10 +0000 (14:03 +0200)]
iwlwifi: mvm: return the cooling state index instead of the budget
iwl_mvm_tcool_get_cur_state is the function that returns the
cooling state index to the sysfs handler. This function returns
mvm->cooling_dev.cur_state but that variable was set to the
budget and not the cooling state index. Fix that.
Add a missing blank line while at it.
Signed-off-by: Chaya Rachel Ivgi <chaya.rachel.ivgi@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Emmanuel Grumbach [Tue, 8 Mar 2016 11:53:05 +0000 (13:53 +0200)]
iwlwifi: mvm: remove RRM advertisement
mac80211 advertises this feature for all its drivers.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Emmanuel Grumbach [Mon, 7 Mar 2016 20:23:52 +0000 (22:23 +0200)]
iwlwifi: mvm: don't let NDPs mess the packet tracking
We need to track the next packet that we will reclaim in
order to know when the Tx queues are empty. This is useful
when we open or tear down an A-MPDU session which requires
to switch queue.
The next packet being reclaimed is identified by its WiFi
sequence number and this is relevant only when we use QoS.
QoS NDPs do have a TID but have a meaningless sequence
number. The spec mandates the receiver to ignore the
sequence number in this case, allowing the transmitter to
put any sequence number. Our implementation leaves it 0.
When we reclaim a QoS NDP, we can't update the next_relcaim
counter since the sequence number of the QoS NDP itself is
invalid.
We used to update the next_reclaim based on the sequence
number of the QoS NDP which reset it to 1 (0 + 1) and
because of this, we never knew when the queue got empty.
This had to sad consequence to stuck the A-MPDU state
machine in a transient state.
To fix this, don't update next_reclaim when we reclaim
a QoS NDP.
Alesya saw this bug when testing u-APSD. Because the
A-MPDU state machine was stuck in EMPTYING_DELBA, we
updated mac80211 that we still have frames for that
station when it got back to sleep. mac80211 then wrongly
set the TIM bit in the beacon and requested to release
non-existent frames from the A-MPDU queue. This led to
a situation where the client was trying to poll frames
but we had no frames to send.
Reported-by: Alesya Shapira <alesya.shapira@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Sara Sharon [Mon, 7 Mar 2016 12:18:29 +0000 (14:18 +0200)]
iwlwifi: add support for getting HW address from CSR
From 9000 family on, we need to get HW address from host
CSR registers.
OEM can override it by fusing the override registers - read
those first, and if those are 0 - read the OTP registers instead.
In addition - bail out if no valid mac address is present. Make
it shared for all NICs.
Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Sara Sharon [Mon, 1 Feb 2016 11:46:06 +0000 (13:46 +0200)]
iwlwifi: pcie: fine tune number of rxbs
We kick the allocator when we have 2 RBDs that don't have
attached RBs, and the allocator allocates 8 RBs meaning
that it needs another 6 RBDs to attach the RBs to.
The design is that allocator should always have enough RBDs
to fulfill requests, so we give in advance 6 RBDs to the
allocator so that when it is kicked, it gets additional 2 RBDs
and has enough RBDs.
These RBDs were taken from the Rx queue itself, meaning
that each Rx queue didn't have the maximal number of
RBDs, but MAX - 6.
Change initial number of RBDs in the system to include both
queue size and allocator reserves.
Note the multi-queue is always 511 instead of 512 to avoid a
full queue since we cannot detect this state easily enough in
the 9000 arch.
Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Chaya Rachel Ivgi [Thu, 3 Mar 2016 13:35:34 +0000 (15:35 +0200)]
iwlwifi: mvm: add support for async rx handler without hold the mutex
When running async rx handler the framework holds the mvm->mutex
before starting the async handler, that might cause a deadlock in case
the handler calls to ops that lock the mutex as well.
Add support for running async rx handler without hold the mutex before
activating the handler.
Signed-off-by: Chaya Rachel Ivgi <chaya.rachel.ivgi@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Matti Gottlieb [Wed, 9 Mar 2016 12:46:28 +0000 (14:46 +0200)]
iwlwifi: mvm: ROC: cleanup time event info on FW failure
Currently when the FW sends start/stop aux roc time event
notification with an error status, the driver returns an
error value, but does not remove the time event, and does
not notify the stack above that the time event is over.
This causes problems that the stack above assumes we are still
in the middle of a time event, and therefore can block different
events, such as scanning.
On FW failure notification, cleanup the time event parameters and
notify the stack above that the time event is over.
Signed-off-by: Matti Gottlieb <matti.gottlieb@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Sara Sharon [Sun, 6 Mar 2016 07:51:29 +0000 (09:51 +0200)]
iwlwifi: mvm: turn off AMSDU bit in QoS control for de-aggregated AMSDUs
Our hardware de-aggregates AMSDUs but copies the mac header
as it to the de-aggregated MPDUs. We need to turn off the AMSDU
bit in the QoS control ourselves.
Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Chaya Rachel Ivgi [Wed, 24 Feb 2016 10:19:22 +0000 (12:19 +0200)]
iwlwifi: mvm: add ctdp operations to debugfs
Add debugfs entries to get the ctdp budget average
and to stop ctdp.
Signed-off-by: Chaya Rachel Ivgi <chaya.rachel.ivgi@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Arnd Bergmann [Wed, 2 Mar 2016 15:59:02 +0000 (16:59 +0100)]
wireless: cw1200: use __maybe_unused to hide pm functions_
The cw1200 uses #ifdef to check for CONFIG_PM, but then
uses SIMPLE_DEV_PM_OPS, which leaves the references out when
CONFIG_PM_SLEEP is not defined, so we get a warning with
PM=y && PM_SLEEP=n:
drivers/net/wireless/st/cw1200/cw1200_spi.c:450:12: error: 'cw1200_spi_suspend' defined but not used [-Werror=unused-function]
This removes the incorrect #ifdef and instead uses a __maybe_unused
annotation to let the compiler know it can silently drop
the function definition.
For the DEV_PM_OPS definition, we can use an IS_ENABLED() check
to avoid defining the structure when CONFIG_PM is not set without
the #ifdef.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Larry Finger [Thu, 25 Feb 2016 17:03:01 +0000 (11:03 -0600)]
rtlwifi: Fix size of wireless mode variable
Smatch reports the following warning:
CHECK drivers/net/wireless/realtek/rtlwifi/rc.c
drivers/net/wireless/realtek/rtlwifi/rc.c:144 _rtl_rc_rate_set_series() warn: impossible condition '(wireless_mode == 256) => (0-255 == 256)'
This warning arises because commit
acc6907b87a9 ("rtlwifi: Fix warning
from ieee80211_get_tx_rates() when using 5G") now checks the wireless
mode for WIRELESS_MODE_AC_ONLY (BIT(8)) in _rtl_rc_rate_set_series().
As a result, all quantities used to store the wireless mode must be u16.
This patch also reorders struct rtl_sta_info to save a little space.
Fixes:
d76d65fd2695 ("rtlwifi: fix broken VHT support")
Reported-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Kalle Valo [Mon, 7 Mar 2016 13:48:56 +0000 (15:48 +0200)]
Merge tag 'iwlwifi-next-for-kalle-2016-03-02' of https://git./linux/kernel/git/iwlwifi/iwlwifi-next
* add support for thermal device / cooling device (Chaya Rachel)
* fixes for 9000 devices data path (Sara Sharon)
* improvements in scheduled scan w/o profiles (Luca)
* new firmware support (-21.ucode)
* add MSIX support for 9000 devices (Haim Dreyfuss)
* cleanup in PCIe initialization
* enable MU-MIMO and take care of firmware restart(Sara Sharon)
===> This needs mac80211-next
* add support for large SKBs in mvm to reach A-MSDU
===> This needs mac80211-next
* add support for filtering frames from a BA session (Sara Sharon)
===> This needs mac80211-next
* start implementing the new Rx path for 9000 devices (Sara Sharon)
* enable the new RRM feature flag (Beni Lev)
* fix U-APSD enablement on P2P Client (Avri Altman)
* fix beacon abort enablement (Avri Altman)
* forbid beacon storing with WoWLAN (Matti Gottlieb)
* support unified uSniffer / regular firmware image (Golan Ben-Ami)
* fix a race between debugfs hooks and iface up (Chaya Rachel Ivgi)
* fixes for runtime PM (Luca)
* add a new module paramater to disable VHT (Andrei Otcheretianski)
* build infrastructure for Dynamic Queue Allocation (Liad Kaufman)
Rafał Miłecki [Fri, 12 Feb 2016 09:15:45 +0000 (10:15 +0100)]
bcma: move flash detection code to ChipCommon core driver
Flashes are attached and accessible through ChipCommon core, they aren't
connected to MIPS one. Moreover some new ARM devices (e.g. BCM47189) may
have serial flash accessibility using ChipCommon registers as well. To
support them we can't keep this code in MIPS core driver.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Rafał Miłecki [Fri, 12 Feb 2016 09:15:44 +0000 (10:15 +0100)]
bcma: move parallel flash support to separated file
This follows the way of handling other flashes and cleans code a bit. As
next task we will want to move flash code to ChipCommon driver as:
1) Flash controllers are accesible using ChipCommon registers
2) This code isn't MIPS specific
This change prepares bcma for that.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Rafał Miłecki [Fri, 12 Feb 2016 09:15:43 +0000 (10:15 +0100)]
bcma: drop unneeded fields from bcma_pflash struct
Most of info stored in this struct wasn't really used anywhere as we put
all that data in platform data & resource as well.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Colin Ian King [Thu, 25 Feb 2016 23:24:27 +0000 (23:24 +0000)]
mt7601u: do not free dma_buf when ivp allocation fails
If the allocation of ivp fails the error handling attempts to
free an uninitialized dma_buf; this data structure just contains
garbage on the stack, so the freeing will cause issues when the
urb, buf and dma fields are free'd. Fix this by not free'ing the
dma_buf if the ivp allocation fails.
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Julian Calaby <julian.calaby@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Ujjal Roy [Wed, 24 Feb 2016 19:19:56 +0000 (00:49 +0530)]
mwifiex: Added missing spaces around brackets
This patch fixes the missing spaces issue in coding style.
Signed-off-by: Ujjal Roy <royujjal@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Ujjal Roy [Wed, 24 Feb 2016 19:19:43 +0000 (00:49 +0530)]
mwifiex: Removed extra spaces before commas
This patch fixes spaces before commas issue in coding style.
Signed-off-by: Ujjal Roy <royujjal@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Ujjal Roy [Wed, 24 Feb 2016 19:19:23 +0000 (00:49 +0530)]
mwifiex: Fixed incorrect indentation issue
This patch fixes the incorrect indentation of the case label.
Signed-off-by: Ujjal Roy <royujjal@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Anthony Wong [Tue, 23 Feb 2016 15:09:22 +0000 (23:09 +0800)]
rt2x00: add new rt2800usb device Buffalo WLI-UC-G450
Add USB ID 0411:01fd for Buffalo WLI-UC-G450 wireless adapter,
RT chipset 3593
Signed-off-by: Anthony Wong <anthony.wong@ubuntu.com>
Cc: stable@vger.kernel.org
Acked-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Xinming Hu [Tue, 23 Feb 2016 13:16:19 +0000 (05:16 -0800)]
mwifiex: do not set multiport flag for tx/rx single packet
multiport address flag(0x1000) should not be set during sdio cmd53,
if we have only one packet to read/write.
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: Xinming Hu <huxm@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Xinming Hu [Tue, 23 Feb 2016 13:16:18 +0000 (05:16 -0800)]
mwifiex: add sdio multiport aggregation debug information
This patch sdio multi port aggregation statistics which can be
used for debugging. This debug data is collected in
/sys/kernel/debug/mwifiex/mlan0/debug.
Signed-off-by: Xinming Hu <huxm@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Amitkumar Karwar [Tue, 23 Feb 2016 13:16:17 +0000 (05:16 -0800)]
mwifiex: fix corner case association failure
This patch corrects the error case in association path by returning
-1. Earlier "media_connected" used to remain on in this error case
causing failure for further association attempts.
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Fixes:
b887664d882ee4 ('mwifiex: channel switch handling for station')
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Xinming Hu [Tue, 23 Feb 2016 13:16:16 +0000 (05:16 -0800)]
mwifiex: add delay when tdls confirm frame is queued
It is observed that driver may send the data packet to tdls peer
before tdls peer receives tdls setup confirm frame.
Similar race condition exists during tdls teardown procedure also.
This patch adds 10 milliseconds delay to resolve the race.
Signed-off-by: Xinming Hu <huxm@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Colin Ian King [Mon, 22 Feb 2016 11:35:46 +0000 (11:35 +0000)]
rtlwifi: pass struct rtl_stats by reference as it is more efficient
passing rtl_stats by value is inefficient; the structure is over 300
bytes in size and generally just one field (packet_report_type)
is being accessed, so the pass by value is a relatively large overhead.
This change just affects just the rx_command_packet calls.
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Alexey Khoroshilov [Sat, 20 Feb 2016 22:30:29 +0000 (01:30 +0300)]
at76c50x-usb: avoid double usb_put_dev() after downloading internal firmware in at76_probe()
There is no need in usb_put_dev() if at76_load_internal_fw() succeed.
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Amitoj Kaur Chawla [Wed, 17 Feb 2016 12:33:37 +0000 (18:03 +0530)]
mwifiex: Use to_delayed_work()
Introduce the use of to_delayed_work() helper function instead of open
coding it with container_of()
A simplified version of the Coccinelle semantic patch used to make
this change is:
//<smpl>
@@
expression a;
symbol work;
@@
- container_of(a, struct delayed_work, work)
+ to_delayed_work(a)
//</smpl>
Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Reviewed-by: Julian Calaby <julian.calaby@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Hante Meuleman [Wed, 17 Feb 2016 10:27:10 +0000 (11:27 +0100)]
brcmfmac: add 802.11w management frame protection support
Add full support for both AP and STA for management frame protection.
Reviewed-by: Arend Van Spriel <arend.van@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <franky.lin@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
Signed-off-by: Hante Meuleman <hante.meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Hante Meuleman [Wed, 17 Feb 2016 10:27:09 +0000 (11:27 +0100)]
brcmfmac: integrate add_keyext in add_key
brcmf_add_keyext is called when a key is configured for a specific
mac address. This function is very similar to the calling function
brcmf_add_key. Integrate this function and also use existing del_key
function in case key is to be cleared.
Reviewed-by: Arend Van Spriel <arend.van@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <franky.lin@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
Signed-off-by: Hante Meuleman <hante.meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Hante Meuleman [Wed, 17 Feb 2016 10:27:08 +0000 (11:27 +0100)]
brcmfmac: merge platform data and module paramaters
Merge module parameters and platform data in one struct. This is the
last step to move to the new platform data per device. Now parameters
of platform data will be merged with module parameters per device.
Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Hante Meuleman [Wed, 17 Feb 2016 10:27:07 +0000 (11:27 +0100)]
brcmfmac: switch to new platform data
Platform data is only available for sdio. With this patch a new
platform data structure is being used which allows for platform
data for any device and configurable per device. This patch only
switches to the new structure and adds support for SDIO devices.
Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Hante Meuleman [Wed, 17 Feb 2016 10:27:05 +0000 (11:27 +0100)]
brcmfmac: keep ARP and ND offload enabled during WOWL
Currently ARP and ND (IPv6 Neigbor Discovery) offload get disabled
on entering suspend. However when firmwares support the wowl_cap
iovar then these offload routines can be kept enabled as they
will work during WOWL as well.
Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Hante Meuleman [Wed, 17 Feb 2016 10:27:04 +0000 (11:27 +0100)]
brcmfmac: move platform data retrieval code to common
In preparation of module parameters for all devices the module
platform data retrieval is moved from sdio to common. It is still
only used for sdio devices.
Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Hante Meuleman [Wed, 17 Feb 2016 10:27:03 +0000 (11:27 +0100)]
brcmfmac: add wowl gtk rekeying offload support
This patch adds support for gtk rekeying offload and for gtk
rekeying failure during wowl mode.
Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Hante Meuleman [Wed, 17 Feb 2016 10:27:02 +0000 (11:27 +0100)]
brcmfmac: move module init and exit to common
In preparation of module parameters for all devices the module init
and exit routines are moved to the common file.
Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Hante Meuleman [Wed, 17 Feb 2016 10:27:01 +0000 (11:27 +0100)]
brcmfmac: increase timeout for tx eapol
When keys get set and updated this has to happen after eapol got
transmitted (without key or old key) before the key can be updated.
To make sure the order of sending eapol and configuring key is done
correctly a timeout for tx of eapol is applied. This timeout is set
to 50 msec, which is not always enough. Especially in AP mode and
key updates the timeout may need to be much longer because client(s)
can be in powersave. Increase the timeout from 50 to 950 msec.
Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Hante Meuleman [Wed, 17 Feb 2016 10:27:00 +0000 (11:27 +0100)]
brcmfmac: remove pcie gen1 support
The PCIE bus driver supports older gen1 (v1) chips, but there is no
actual device which is using this older pcie core which is supported
by brcmfmac. Remove all gen1 related code.
Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Hante Meuleman [Wed, 17 Feb 2016 10:26:59 +0000 (11:26 +0100)]
brcmfmac: add support for the PCIE 4366c0 chip
A newer version of the 4366 PCIE chip has been released. Add
support for this version of the chip.
Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Hante Meuleman [Wed, 17 Feb 2016 10:26:58 +0000 (11:26 +0100)]
brcmfmac: use bar1 window size as provided by pci subsystem
The PCIE bar1 window size is specified by chip. Currently the
ioremap of bar1 was using a define which always matched the size
of bar1, but newer chips can have a different bar1 sizes. With
this patch the ioremap will be called with the by chip provided
window size.
Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Hante Meuleman [Wed, 17 Feb 2016 10:26:57 +0000 (11:26 +0100)]
brcmfmac: use device memsize config from fw if defined
Newer type pcie devices have memory which get shared between fw and
hw. The division of this memory is done firmware compile time. As a
result the ramsize as used by driver needs to be adjusted for this.
This is done by reading the memory size from the firmware.
Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Franky Lin [Wed, 17 Feb 2016 10:26:56 +0000 (11:26 +0100)]
brcmfmac: check return for ARP ip setting iovar
The return value of iovar set function should be saved and checked.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Franky Lin [Wed, 17 Feb 2016 10:26:55 +0000 (11:26 +0100)]
brcmfmac: add neighbor discovery offload ip address table configuration
Configure ipv6 address for neighbor discovery offload ip table in
firmware obtained through ipv6 address notification callback.
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Hante Meuleman [Wed, 17 Feb 2016 10:26:54 +0000 (11:26 +0100)]
brcmfmac: Add length checks on firmware events
Add additional length checks on firmware events to create more
robust code.
Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Lei Zhang <leizh@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Hante Meuleman [Wed, 17 Feb 2016 10:26:53 +0000 (11:26 +0100)]
brcmfmac: Configure country code using device specific settings
Country code configuration in a device is a device specific
operation. For this the country code as specified by reg notifier
(iso3166 alpha2) needs to be translated to a device specific
country locale and revision number. This patch adds this
translation and puts a placeholder in the device specific settings
where the translation table can be stored. Additional patches will
be needed to read these tables from for example device platform
data.
Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Franky Lin [Wed, 17 Feb 2016 10:26:52 +0000 (11:26 +0100)]
brcmfmac: check for wowl support before enumerating feature flag
In some cases wiphy->wowlan could be NULL if firmware doesn't have the
support. Driver should check for support before walking down the feature
flags.
Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Hante Meuleman [Wed, 17 Feb 2016 10:26:51 +0000 (11:26 +0100)]
brcmfmac: Limit memory allocs to <64K
Some systems have problems with allocating memory allocation larger
then 64K. Often on unload/load or suspend/resume a failure is
reported: Could not allocate wiphy device. This patch makes the
escan intermediate storage buf dynamically allocated, and smaller
than 64K.
Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Arend van Spriel [Wed, 17 Feb 2016 10:26:50 +0000 (11:26 +0100)]
brcmfmac: change function name for brcmf_cfg80211_wait_vif_event_timeout()
Dropping the '_timeout' from the function name as the fact that a timeout
value is passed makes it obvious a timeout is used. Also helps to keep code
lines a bit shorter and easier to stick to 80 char boundary.
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>