Mohammed Shafi Shajakhan
a4aab099cc
ath10k: fix spectral scan for QCA99X0 family of chipsets
...
spectral_bin length (number of bins per fft sample) is usually
a value where (2^n = value), n is an integer. All of the QCA99X0
family of chipsets seems to report a spectral_bin length of
2^n + 'm' bytes, where m = 4, 12 based on the chipset. This 'm'
bytes seems to carry some radar related info which is currently
discarded only for 'bin_len = 68' bytes. Extend this discarding of
irrelevant 'bin_len' for QCA9984, QCA9888, IPQ4019 as well by
introducing a hardware parameter 'spectral_bin_discard'. Also
for QCA988X based family of chipsets which doesn't seem to have this
issue and also for some of the hardware which I have not tested
like QCA6174/QCA9377 the existing behaviour is retained as it is.
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qti.qualcomm.com >
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com >
2017-04-19 17:05:26 +03:00
Matthias Kaehlcke
627871b71c
ath9k: Add cast to u8 to FREQ2FBIN macro
...
The macro results are assigned to u8 variables/fields. Adding the cast
fixes plenty of clang warnings about "implicit conversion from 'int' to
'u8'".
Signed-off-by: Matthias Kaehlcke <mka@chromium.org >
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com >
2017-04-19 17:00:48 +03:00
Damien Thébault
050fd820dc
ath9k: Add Dell Wireless 1601 with wowlan capability
...
Add the Dell Wireless 1601 card as an AR9462 in the ath9k pci list.
Note that the wowlan feature is supported and has been tested
successfully.
Signed-off-by: Damien Thébault <damien@dtbo.net >
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com >
2017-04-19 16:58:46 +03:00
Dan Carpenter
b7dcf68f38
ath9k: off by one in ath9k_hw_nvram_read_array()
...
The > should be >= or we read one space beyond the end of the array.
Fixes: ab5c4f71d8
("ath9k: allow to load EEPROM content via firmware API")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com >
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com >
2017-04-19 16:57:41 +03:00
Arend Van Spriel
26ecfe0179
brcmfmac: only build fwsignal module for CONFIG_BRCMFMAC_PROTO_BCDC
...
The fwsignal module is only referenced by the bcdc module and part of the
bcdc protocol. So only build it when CONFIG_BRCMFMAC_PROTO_BCDC is selected.
Fixes: acf8ac41dd
("brcmfmac: remove reference to fwsignal data from struct brcmf_pub")
Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com >
Signed-off-by: Kalle Valo <kvalo@codeaurora.org >
2017-04-19 14:39:44 +03:00
Kalle Valo
d074e0b84a
Merge tag 'iwlwifi-next-for-kalle-2017-04-13' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next
...
Patches intended for v4.12:
* Some small fixes here and there;
* The usual cleanups and small improvements;
* Work to support A000 devices continues;
* New FW API version;
* Some debugging improvements;
2017-04-18 09:41:45 +03:00
Johannes Berg
fceb6435e8
netlink: pass extended ACK struct to parsing functions
...
Pass the new extended ACK reporting struct to all of the generic
netlink parsing functions. For now, pass NULL in almost all callers
(except for some in the core.)
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
2017-04-13 13:58:22 -04:00
Daniel Golle
1f242a3de7
rt2x00: reverse external PA capability flag logic
...
Consequently refer to external PA instead of inverting the logic and
use an internal PA capability flag which is a bit confusing.
Currently this is used for Rt3352 only, but MT7620A also allows for an
external PA which will be supported by a follow up patch.
Signed-off-by: Daniel Golle <daniel@makrotopia.org >
Acked-by: Stanislaw Gruszka <sgruszka@redhat.com >
Signed-off-by: Kalle Valo <kvalo@codeaurora.org >
2017-04-13 17:12:32 +03:00
Yan-Hsuan Chuang
4da5e7ea13
rtlwifi: btcoex: 21a 1ant: avoid LPS/IPS mismatch for pnp notify
...
When driver is going to sleep, it does not leave LPS/IPS, thus the
BTCoex may have mismatch when driver wakes up. To avoid that, BTCoex
needs to clear the IPS/LPS state when it receives a pnp notify, then
it can properly set up the hw when driver wakes up.
Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com >
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net >
Cc: Pkshih <pkshih@realtek.com >
Cc: Birming Chiu <birming@realtek.com >
Cc: Shaofu <shaofu@realtek.com >
Cc: Steven Ting <steventing@realtek.com >
Signed-off-by: Kalle Valo <kvalo@codeaurora.org >
2017-04-13 17:11:04 +03:00
Yan-Hsuan Chuang
da0fd9ccb4
rtlwifi: btcoex: 21a 1ant: do not switch antenna when wifi is under 5G channel
...
When wifi is on a 5G channel, the 5G signal will not interfere bt 2.4G
signal, and they can transmit simultaneously, hence there is no need to
switch antenna between wifi and bt.
Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com >
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net >
Cc: Pkshih <pkshih@realtek.com >
Cc: Birming Chiu <birming@realtek.com >
Cc: Shaofu <shaofu@realtek.com >
Cc: Steven Ting <steventing@realtek.com >
Signed-off-by: Kalle Valo <kvalo@codeaurora.org >
2017-04-13 17:11:03 +03:00
Yan-Hsuan Chuang
cb52b11859
rtlwifi: btcoex: 21a 1ant: monitor bt profiling when scan
...
When wifi is scanning and not connected, set the tdma and coex table
properly to control the priority of the packets to make the wifi bt
coexistence operate smoothly
Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com >
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net >
Cc: Pkshih <pkshih@realtek.com >
Cc: Birming Chiu <birming@realtek.com >
Cc: Shaofu <shaofu@realtek.com >
Cc: Steven Ting <steventing@realtek.com >
Signed-off-by: Kalle Valo <kvalo@codeaurora.org >
2017-04-13 17:11:03 +03:00
Yan-Hsuan Chuang
ee82808517
rtlwifi: btcoex: 21a 1ant: consider more cases when bt inquiry
...
With bt inquiry, the wifi may start as a softap or the wifi and bt are
busy, we take these scenarios into consider to avoid bt inquiry to
degrade the performance of the network
Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com >
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net >
Cc: Pkshih <pkshih@realtek.com >
Cc: Birming Chiu <birming@realtek.com >
Cc: Shaofu <shaofu@realtek.com >
Cc: Steven Ting <steventing@realtek.com >
Signed-off-by: Kalle Valo <kvalo@codeaurora.org >
2017-04-13 17:11:02 +03:00
Yan-Hsuan Chuang
19afb92222
rtlwifi: btcoex: 21a 1ant: move bt_disabled to global struct
...
Move the bt disable flag to a global structure to indicate that bt is
turned off.
Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com >
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net >
Cc: Pkshih <pkshih@realtek.com >
Cc: Birming Chiu <birming@realtek.com >
Cc: Shaofu <shaofu@realtek.com >
Cc: Steven Ting <steventing@realtek.com >
Signed-off-by: Kalle Valo <kvalo@codeaurora.org >
2017-04-13 17:11:02 +03:00
Yan-Hsuan Chuang
bcdffd050c
rtlwifi: btcoex: 21a 1ant: If wifi only, do not initiate coex mechanism
...
If the device has wifi mode only, there is no need to initiate the
hardware for wifi and bt coexistence, so just return to avoid it.
Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com >
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net >
Cc: Pkshih <pkshih@realtek.com >
Cc: Birming Chiu <birming@realtek.com >
Cc: Shaofu <shaofu@realtek.com >
Cc: Steven Ting <steventing@realtek.com >
Signed-off-by: Kalle Valo <kvalo@codeaurora.org >
2017-04-13 17:11:01 +03:00
Yan-Hsuan Chuang
edf8fa7b66
rtlwifi: btcoex: 21a 1ant: action when associating/authenticating
...
When wifi is associating or authenticating, set the coex table for wifi
to establish link. These packets should have higher priority.
Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com >
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net >
Cc: Pkshih <pkshih@realtek.com >
Cc: Birming Chiu <birming@realtek.com >
Cc: Shaofu <shaofu@realtek.com >
Cc: Steven Ting <steventing@realtek.com >
Signed-off-by: Kalle Valo <kvalo@codeaurora.org >
2017-04-13 17:11:01 +03:00
Yan-Hsuan Chuang
06a75324d5
rtlwifi: btcoex: 21a 1ant: add multi port action for miracast and P2P
...
To support miracast and P2P, the chip may operate under concurrent mode,
In this situation, do not aggregate tx packet and properly set the rx
aggregation size.
We detect it by monitoring the number of link established.
Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com >
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net >
Cc: Pkshih <pkshih@realtek.com >
Cc: Birming Chiu <birming@realtek.com >
Cc: Shaofu <shaofu@realtek.com >
Cc: Steven Ting <steventing@realtek.com >
Signed-off-by: Kalle Valo <kvalo@codeaurora.org >
2017-04-13 17:11:00 +03:00
Yan-Hsuan Chuang
4f78287e5e
rtlwifi: btcoex: 21a 1ant: set antenna control path for PTA
...
Set antenna control path if PTA is in control of the packet path of wifi
and bt. If wifi is turned off, tell the PTA about it.
Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com >
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net >
Cc: Pkshih <pkshih@realtek.com >
Cc: Birming Chiu <birming@realtek.com >
Cc: Shaofu <shaofu@realtek.com >
Cc: Steven Ting <steventing@realtek.com >
Signed-off-by: Kalle Valo <kvalo@codeaurora.org >
2017-04-13 17:11:00 +03:00
Yan-Hsuan Chuang
e605103c44
rtlwifi: btcoex: 21a 1ant: remove setting for 2 antennas
...
The antenna position setting is useless for 1 antenna chip.
Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com >
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net >
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net >
Cc: Pkshih <pkshih@realtek.com >
Cc: Birming Chiu <birming@realtek.com >
Cc: Shaofu <shaofu@realtek.com >
Cc: Steven Ting <steventing@realtek.com >
Signed-off-by: Kalle Valo <kvalo@codeaurora.org >
2017-04-13 17:10:59 +03:00
Yan-Hsuan Chuang
f0c40cf09d
rtlwifi: btcoex: 21a 1ant: mask profile bit for connect-ilde
...
Mask out the connect-idle bit.
Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com >
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net >
Cc: Pkshih <pkshih@realtek.com >
Cc: Birming Chiu <birming@realtek.com >
Cc: Shaofu <shaofu@realtek.com >
Cc: Steven Ting <steventing@realtek.com >
Signed-off-by: Kalle Valo <kvalo@codeaurora.org >
2017-04-13 17:10:59 +03:00
Yan-Hsuan Chuang
3121b4ddd1
rtlwifi: btcoex: 21a 1ant: coex table setting for new fw
...
For newer fw, the coex table setting needs to be modified to operate
correctly.
Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com >
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net >
Cc: Pkshih <pkshih@realtek.com >
Cc: Birming Chiu <birming@realtek.com >
Cc: Shaofu <shaofu@realtek.com >
Cc: Steven Ting <steventing@realtek.com >
Signed-off-by: Kalle Valo <kvalo@codeaurora.org >
2017-04-13 17:10:59 +03:00
Yan-Hsuan Chuang
19baccc456
rtlwifi: btcoex: 21a 1ant: add function to check wifi status
...
This function checks if wifi has changed its statusi. It will be needed
in the future.
Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com >
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net >
Cc: Pkshih <pkshih@realtek.com >
Cc: Birming Chiu <birming@realtek.com >
Cc: Shaofu <shaofu@realtek.com >
Cc: Steven Ting <steventing@realtek.com >
Signed-off-by: Kalle Valo <kvalo@codeaurora.org >
2017-04-13 17:10:58 +03:00
Yan-Hsuan Chuang
1bdd83392f
rtlwifi: btcoex: 21a 1ant: fw settings for softap mode
...
For ap mode, adjust fw settings to operate properly.
Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com >
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net >
Cc: Pkshih <pkshih@realtek.com >
Cc: Birming Chiu <birming@realtek.com >
Cc: Shaofu <shaofu@realtek.com >
Cc: Steven Ting <steventing@realtek.com >
Signed-off-by: Kalle Valo <kvalo@codeaurora.org >
2017-04-13 17:10:58 +03:00
Yan-Hsuan Chuang
f4a23e194e
rtlwifi: btcoex: 23b 2ant: some hi-prio pkt will cause hid_exist
...
Clear the hid_exist flag by monitoring the packet counter.
Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com >
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net >
Cc: Pkshih <pkshih@realtek.com >
Cc: Birming Chiu <birming@realtek.com >
Cc: Shaofu <shaofu@realtek.com >
Cc: Steven Ting <steventing@realtek.com >
Signed-off-by: Kalle Valo <kvalo@codeaurora.org >
2017-04-13 17:09:39 +03:00
Yan-Hsuan Chuang
588a290b46
rtlwifi: btcoex: 23b 2ant: notify more bt information
...
These bt information are displayed in display coex
Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com >
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net >
Cc: Pkshih <pkshih@realtek.com >
Cc: Birming Chiu <birming@realtek.com >
Cc: Shaofu <shaofu@realtek.com >
Cc: Steven Ting <steventing@realtek.com >
Signed-off-by: Kalle Valo <kvalo@codeaurora.org >
2017-04-13 17:09:39 +03:00
Yan-Hsuan Chuang
1109440276
rtlwifi: btcoex: 23b 2ant: fine tune for bt hid_a2dp
...
Let bt control the aggregation size to improve stability.
Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com >
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net >
Cc: Pkshih <pkshih@realtek.com >
Cc: Birming Chiu <birming@realtek.com >
Cc: Shaofu <shaofu@realtek.com >
Cc: Steven Ting <steventing@realtek.com >
Signed-off-by: Kalle Valo <kvalo@codeaurora.org >
2017-04-13 17:09:39 +03:00
Yan-Hsuan Chuang
2e6689824a
rtlwifi: btcoex: 23b 2ant: fine tune for bt pan_edr_a2dp
...
If we don't limit the rx aggregation size, and set tdma instead, the bt profile can
get more stable.
Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com >
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net >
Cc: Pkshih <pkshih@realtek.com >
Cc: Birming Chiu <birming@realtek.com >
Cc: Shaofu <shaofu@realtek.com >
Cc: Steven Ting <steventing@realtek.com >
Signed-off-by: Kalle Valo <kvalo@codeaurora.org >
2017-04-13 17:09:38 +03:00
Yan-Hsuan Chuang
6dcf041eab
rtlwifi: btcoex: 23b 2ant: before firmware ready settings
...
Before firmware is ready, set GNT_BT to high to let bt transmit
Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com >
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net >
Cc: Pkshih <pkshih@realtek.com >
Cc: Birming Chiu <birming@realtek.com >
Cc: Shaofu <shaofu@realtek.com >
Cc: Steven Ting <steventing@realtek.com >
Signed-off-by: Kalle Valo <kvalo@codeaurora.org >
2017-04-13 17:09:38 +03:00
Yan-Hsuan Chuang
4e6becc044
rtlwifi: btcoex: 23b 2ant: power on settings for coex
...
When power on, the wifi could be initiating, force the antenna to
transmit bt packets to avoid bt unstable problems
Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com >
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net >
Cc: Pkshih <pkshih@realtek.com >
Cc: Birming Chiu <birming@realtek.com >
Cc: Shaofu <shaofu@realtek.com >
Cc: Steven Ting <steventing@realtek.com >
Signed-off-by: Kalle Valo <kvalo@codeaurora.org >
2017-04-13 17:09:37 +03:00
Yan-Hsuan Chuang
7558668d05
rtlwifi: btcoex: 23b 2ant: wifi is not actually off in mp mode
...
In mp mode, the wifi will not turn off and still has control of the PTA,
so the driver needs to distinguish whether it is mp mode or not
Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com >
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net >
Cc: Pkshih <pkshih@realtek.com >
Cc: Birming Chiu <birming@realtek.com >
Cc: Shaofu <shaofu@realtek.com >
Cc: Steven Ting <steventing@realtek.com >
Signed-off-by: Kalle Valo <kvalo@codeaurora.org >
2017-04-13 17:09:37 +03:00
Yan-Hsuan Chuang
ae889ebc76
rtlwifi: btcoex: 23b 2ant: need those information when scan
...
For scan notify, we need to supervise some registers to make sure that
coexistence is operating as we expected.
Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com >
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net >
Cc: Pkshih <pkshih@realtek.com >
Cc: Birming Chiu <birming@realtek.com >
Cc: Shaofu <shaofu@realtek.com >
Cc: Steven Ting <steventing@realtek.com >
Signed-off-by: Kalle Valo <kvalo@codeaurora.org >
2017-04-13 17:09:36 +03:00
Yan-Hsuan Chuang
acb9c779ec
rtlwifi: btcoex: 23b 2ant: remove debugging code for 0x948
...
Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com >
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net >
Cc: Pkshih <pkshih@realtek.com >
Cc: Birming Chiu <birming@realtek.com >
Cc: Shaofu <shaofu@realtek.com >
Cc: Steven Ting <steventing@realtek.com >
Signed-off-by: Kalle Valo <kvalo@codeaurora.org >
2017-04-13 17:09:36 +03:00
Yan-Hsuan Chuang
2037b83c12
rtlwifi: btcoex: 23b 2ant: treat too many low prio packets as retry
...
Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com >
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net >
Cc: Pkshih <pkshih@realtek.com >
Cc: Birming Chiu <birming@realtek.com >
Cc: Shaofu <shaofu@realtek.com >
Cc: Steven Ting <steventing@realtek.com >
Signed-off-by: Kalle Valo <kvalo@codeaurora.org >
2017-04-13 17:09:35 +03:00
Yan-Hsuan Chuang
470eec1a3d
rtlwifi: btcoex: 23b 2ant: set coex table when wifi is idle
...
When wifi is idle, the bt should have more resource to transmit.
Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com >
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net >
Cc: Pkshih <pkshih@realtek.com >
Cc: Birming Chiu <birming@realtek.com >
Cc: Shaofu <shaofu@realtek.com >
Cc: Steven Ting <steventing@realtek.com >
Signed-off-by: Kalle Valo <kvalo@codeaurora.org >
2017-04-13 17:09:35 +03:00
Yan-Hsuan Chuang
83cded7a1e
rtlwifi: btcoex: 23b 2ant: set coex table when wifi is linking
...
When wifi is under linking process, those packets are important. Mark
them as high priority to protect the linking process
Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com >
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net >
Cc: Pkshih <pkshih@realtek.com >
Cc: Birming Chiu <birming@realtek.com >
Cc: Shaofu <shaofu@realtek.com >
Cc: Steven Ting <steventing@realtek.com >
Signed-off-by: Kalle Valo <kvalo@codeaurora.org >
2017-04-13 17:08:40 +03:00
Yan-Hsuan Chuang
c5e2113613
rtlwifi: btcoex: 23b 2ant: turn off antenna when rssi is too high/low
...
For 2-antenna combo card, the signal of the neighbor antenna could be
over noise level and cause be severe interference. So we monitor the
rssi and turn off one of the antennas when the other is transmitting
and the rssi level is beyond a threshold.
Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com >
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net >
Cc: Pkshih <pkshih@realtek.com >
Cc: Birming Chiu <birming@realtek.com >
Cc: Shaofu <shaofu@realtek.com >
Cc: Steven Ting <steventing@realtek.com >
Signed-off-by: Kalle Valo <kvalo@codeaurora.org >
2017-04-13 17:08:39 +03:00
Yan-Hsuan Chuang
a8570896b9
rtlwifi: btcoex: 23b 2ant: turn off ps and tdma mechanism when in concurrent mode
...
When wifi is in concurrent mode, we can not distinguish if it is the
real PS or just a fake one by sending null data, so we turn it off
in case of miracast scenario.
Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com >
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net >
Cc: Pkshih <pkshih@realtek.com >
Cc: Birming Chiu <birming@realtek.com >
Cc: Shaofu <shaofu@realtek.com >
Cc: Steven Ting <steventing@realtek.com >
Signed-off-by: Kalle Valo <kvalo@codeaurora.org >
2017-04-13 17:08:39 +03:00
Yan-Hsuan Chuang
bcd37f4a08
rtlwifi: btcoex: 23b 2ant: let bt transmit when hw initialisation done
...
During hw initialisation, wifi may be ready after bt has already been
ready, which causes bt to act abnormally. To avoid this, set GNT_BT to
high during hw init.
Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com >
Cc: Stable <stable@vger.kernel.org >
Cc: Pkshih <pkshih@realtek.com >
Cc: Birming Chiu <birming@realtek.com >
Cc: Shaofu <shaofu@realtek.com >
Cc: Steven Ting <steventing@realtek.com >
Signed-off-by: Kalle Valo <kvalo@codeaurora.org >
2017-04-13 17:08:38 +03:00
Yan-Hsuan Chuang
3b4fa04d8e
rtlwifi: btcoex: 23b 2ant: tell fw if external or internal switch is used
...
Some chips use an external antenna switch, but fw may not realize it.
Here we tell fw exactly that which type of switch we are using.
Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com >
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net >
Cc: Pkshih <pkshih@realtek.com >
Cc: Birming Chiu <birming@realtek.com >
Cc: Shaofu <shaofu@realtek.com >
Cc: Steven Ting <steventing@realtek.com >
Signed-off-by: Kalle Valo <kvalo@codeaurora.org >
2017-04-13 17:08:38 +03:00
Yan-Hsuan Chuang
a0f430b3ea
rtlwifi: btcoex: 23b 2ant: workaround for bt a2dp and hid
...
For a2dp and hid, we need extra process to avoid voice degradation
Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com >
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net >
Cc: Pkshih <pkshih@realtek.com >
Cc: Birming Chiu <birming@realtek.com >
Cc: Shaofu <shaofu@realtek.com >
Cc: Steven Ting <steventing@realtek.com >
Signed-off-by: Kalle Valo <kvalo@codeaurora.org >
2017-04-13 17:08:37 +03:00
Yan-Hsuan Chuang
684df42cd5
rtlwifi: btcoex: 23b 2ant: check more cases when bt is queuing
...
If bt is queing, we need to set the packet priority properly.
Originally we only consider if wifi was connected or not, but now we
also consider if bt is under abnormal scan or wifi is scanning, roaming
or linking, and set the coex table.
Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com >
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net >
Cc: Pkshih <pkshih@realtek.com >
Cc: Birming Chiu <birming@realtek.com >
Cc: Shaofu <shaofu@realtek.com >
Cc: Steven Ting <steventing@realtek.com >
Signed-off-by: Kalle Valo <kvalo@codeaurora.org >
2017-04-13 17:08:37 +03:00
Yan-Hsuan Chuang
609d59acb6
rtlwifi: btcoex: 23b 2ant: add pnp notidy to avoid LPS/IPS mismatch
...
When driver is going to sleep, it does not leave LPS/IPS, thus the
BTCoex may have mismatch when driver wakes up. To avoid that, BTCoex
needs to clear the IPS/LPS state when it receives a pnp notify, then
it can properly set up the hw when driver wakes up.
Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com >
Cc: Pkshih <pkshih@realtek.com >
Cc: Birming Chiu <birming@realtek.com >
Cc: Shaofu <shaofu@realtek.com >
Cc: Steven Ting <steventing@realtek.com >
Signed-off-by: Kalle Valo <kvalo@codeaurora.org >
2017-04-13 17:08:36 +03:00
Yan-Hsuan Chuang
b59f02fb7f
rtlwifi: btcoex: 23b 2ant: fix PTA unstable problem when hw init
...
In the hardware initialisation stage, the PTA circuits may be unstable,
so we reset it after 6 secs to fix the problem.
Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com >
Cc: Pkshih <pkshih@realtek.com >
Cc: Birming Chiu <birming@realtek.com >
Cc: Shaofu <shaofu@realtek.com >
Cc: Steven Ting <steventing@realtek.com >
Signed-off-by: Kalle Valo <kvalo@codeaurora.org >
2017-04-13 17:08:36 +03:00
Yan-Hsuan Chuang
1712952bea
rtlwifi: btcoex: 23b 2ant: more cases for adjusting tdma duration
...
These cases are for the btcoex to tune the performance
Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com >
Cc: Pkshih <pkshih@realtek.com >
Cc: Birming Chiu <birming@realtek.com >
Cc: Shaofu <shaofu@realtek.com >
Cc: Steven Ting <steventing@realtek.com >
Signed-off-by: Kalle Valo <kvalo@codeaurora.org >
2017-04-13 17:08:35 +03:00
Yan-Hsuan Chuang
5a347a4846
rtlwifi: btcoex: 23b 2ant: detect ap num and set GNT_BT properly
...
If ap num < 10, let wifi and bt transmit simultaneously, otherwise set
wifi into standy when bt is transmitting
Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com >
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net >
Cc: Pkshih <pkshih@realtek.com >
Cc: Birming Chiu <birming@realtek.com >
Cc: Shaofu <shaofu@realtek.com >
Cc: Steven Ting <steventing@realtek.com >
Signed-off-by: Kalle Valo <kvalo@codeaurora.org >
2017-04-13 17:08:35 +03:00
Yan-Hsuan Chuang
b91ed73139
rtlwifi: btcoex: 23b 2ant: rename tdma_adj_type to ps_tdma_du_adj_type
...
The variable is for PS tdma duration adjust, so rename it to clearly
to specify its usage.
Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com >
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net >
Cc: Pkshih <pkshih@realtek.com >
Cc: Birming Chiu <birming@realtek.com >
Cc: Shaofu <shaofu@realtek.com >
Cc: Steven Ting <steventing@realtek.com >
Signed-off-by: Kalle Valo <kvalo@codeaurora.org >
2017-04-13 17:08:34 +03:00
Yan-Hsuan Chuang
b01127b268
rtlwifi: btcoex: 23b 2ant: check PS state before setting tdma duration
...
For time division multiple access, the wifi and bt take turns to
transmit, but we need to let AP know that wifi is under standby mode by
sending null data to "pretend" entering power saving state using lps
rpwm.
But, the fw does not know if it is the actual power saving mode or just a
fake one to cheat to the AP. Hence, before fw setting the tdma duration,
the fw needs the driver to check the power saving state first.
Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com >
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net >
Cc: Pkshih <pkshih@realtek.com >
Cc: Birming Chiu <birming@realtek.com >
Cc: Shaofu <shaofu@realtek.com >
Cc: Steven Ting <steventing@realtek.com >
Signed-off-by: Kalle Valo <kvalo@codeaurora.org >
2017-04-13 17:08:34 +03:00
Arend Van Spriel
6ea51fc708
brcmfmac: only add channels and ssids once in scan request
...
When receiving pno results there may be duplicate channels and/or
ssids. Assure each is added only once when preparing the internal
escan request.
Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com >
Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com >
Reviewed-by: Franky Lin <franky.lin@broadcom.com >
Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com >
Signed-off-by: Kalle Valo <kvalo@codeaurora.org >
2017-04-13 17:07:23 +03:00
Arend Van Spriel
6594e1e834
brcmfmac: remove bogus check in scheduled scan result handler
...
Checking whether the address of an array element is null is bogus
so removing it.
Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com >
Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com >
Reviewed-by: Franky Lin <franky.lin@broadcom.com >
Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com >
Signed-off-by: Kalle Valo <kvalo@codeaurora.org >
2017-04-13 17:07:23 +03:00
Arend Van Spriel
4835f37e3b
brcmfmac: add length checks in scheduled scan result handler
...
Assure the event data buffer is long enough to hold the array
of netinfo items and that SSID length does not exceed the maximum
of 32 characters as per 802.11 spec.
Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com >
Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com >
Reviewed-by: Franky Lin <franky.lin@broadcom.com >
Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com >
Signed-off-by: Kalle Valo <kvalo@codeaurora.org >
2017-04-13 17:07:22 +03:00
Arend Van Spriel
acf8ac41dd
brcmfmac: remove reference to fwsignal data from struct brcmf_pub
...
The fwsignal module is part of the bcdc protocol and as such does
its instance data is not needed in core structure. Moving it into
struct brcmf_bcdc instead.
Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com >
Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com >
Reviewed-by: Franky Lin <franky.lin@broadcom.com >
Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com >
Signed-off-by: Kalle Valo <kvalo@codeaurora.org >
2017-04-13 17:07:22 +03:00