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
David S. Miller
cdd3210c3d
Merge tag 'wireless-drivers-next-for-davem-2017-04-07' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next
...
Kalle Valo says:
====================
wireless-drivers-next patches for 4.12
Lots of bugfixes as usual but also some new features.
Major changes:
ath10k
* improve firmware download time for QCA6174 and QCA9377, especially
helps resume time
ath9k_htc
* add support AirTies 1eda:2315 AR9271 device
rt2x00
* add support MT7620
mwifiex
* enable auto deep sleep mode for USB chipsets
brcmfmac
* add support for network namespaces (WIPHY_FLAG_NETNS_OK)
====================
Signed-off-by: David S. Miller <davem@davemloft.net >
2017-04-09 18:13:12 -07:00
Yan-Hsuan Chuang
495d36e668
rtlwifi: btcoex: 23b 2ant: new fw use h2c to control GNT_BT
...
Earlier versions of the FW did not support h2c to set GNT_BT, but later
versions have that capability. Hence we check the FW version and decide
whether to use h2c or just write to the register.
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-05 15:53:30 +03:00
Yan-Hsuan Chuang
a66a4176b7
rtlwifi: btcoex: 23b 2ant: add comments to describe how duration adjusted
...
Since btcoex uses static variables to store the cumulative information
on the wifi status, some tricks are used that are a bit obscure. We add
some comments about the criteria we use to adjust wifi duration.
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-05 15:53:30 +03:00
Yan-Hsuan Chuang
44e9a5340e
rtlwifi: btcoex: 23b 2ant: finer bt power adjustment
...
The bt can specify a power level to decrease. Rather than decreasing by a
fixed value (usually 2), this change makes the driver fit to the
environment more quickly.
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-05 15:53:29 +03:00
Yan-Hsuan Chuang
7ff9809322
rtlwifi: btcoex: 23b 2ant: remove redundant bt stack report
...
New ICs have hardware mailbox to deliver bt information instead of doing
it by driver itself, so remove them.
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-05 15:53:29 +03:00
Yan-Hsuan Chuang
f36714fbfa
rtlwifi: btcoex: 23b 2ant: coex table fine tune
...
set coex table fine tune, for register settings
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-05 15:53:28 +03:00
Yan-Hsuan Chuang
3f957062c9
rtlwifi: btcoex: 23b 2ant: adjust wifi duration for bt a2dp
...
The larger the bt a2dp bit pool is, the more time bt needs to receive
them. If we do not adjust the wifi duration, the voice quality will be
low. Hence we reduce the time that wifi holds, to improve the a2dp
service.
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-05 15:53:28 +03:00
Yan-Hsuan Chuang
e4782bc6ce
rtlwifi: btcoex: 23b 2ant: less sensitive to tx rate penalty
...
modify h2c parameter so that the rate suffers less penalty from 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-05 15:53:27 +03:00
Yan-Hsuan Chuang
55e9e37da2
rtlwifi: btcoex: 23b 2ant: monitor wifi counter for allocate tdma time
...
If there are too many CRC error packets, it means the wifi is operating
under low quality circumstances. If so, we need to reallocate the
resources of 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-05 15:53:27 +03:00
Yan-Hsuan Chuang
61d802619b
rtlwifi: btcoex: 23b 2ant: detect if bt is slave, and modify tdma
...
if the bt is slave, it may receive packet at any time, so we
need to mark them as high priority packets to avoid packet loss.
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-05 15:53:27 +03:00
Yan-Hsuan Chuang
155305f5b0
rtlwifi: btcoex: 23b 2ant: add btc8723b2ant_limited_rx to reduce agg size
...
For wifi and bt coexistence, if the aggregation size of wifi is too
large, the transmission time of the aggregated packet could be too long
and the bt packets might "cut off" the wifi packet. We need to reduce
the aggregation size to improve wifi performance.
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-05 15:53:26 +03:00
Yan-Hsuan Chuang
c6821613e6
rtlwifi: btcoex: follow linux coding style
...
Fix a number of checkpatch.pl warnings. In addition, some variable and
function names are shortened, and/or renamed to be more consistent.
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-05 15:53:25 +03:00
Yan-Hsuan Chuang
27a31a60a4
rtlwifi: btcoex: remove unused functions
...
A number of functions in the Bluetooth Coexistence routines are not used,
and can be removed.
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-05 15:53:25 +03:00
Larry Finger
893dc68f1b
rtlwifi: Fix scheduling while atomic splat
...
Following commit cceb0a5973
("rtlwifi: Add work queue for c2h cmd."),
the following BUG is reported when rtl8723be is used:
BUG: sleeping function called from invalid context at mm/slab.h:432
in_atomic(): 1, irqs_disabled(): 1, pid: 0, name: swapper/0
CPU: 0 PID: 0 Comm: swapper/0 Tainted: G W O 4.11.0-rc3-wl+ #276
Hardware name: TOSHIBA TECRA A50-A/TECRA A50-A, BIOS Version 4.50 09/29/2014
Call Trace:
<IRQ>
dump_stack+0x63/0x89
___might_sleep+0xe9/0x130
__might_sleep+0x4a/0x90
kmem_cache_alloc_trace+0x19f/0x200
? rtl_c2hcmd_enqueue+0x3e/0x110 [rtlwifi]
rtl_c2hcmd_enqueue+0x3e/0x110 [rtlwifi]
rtl8723be_c2h_packet_handler+0xac/0xc0 [rtl8723be]
rtl8723be_rx_command_packet+0x37/0x5c [rtl8723be]
_rtl_pci_rx_interrupt+0x200/0x6b0 [rtl_pci]
_rtl_pci_interrupt+0x20c/0x5d0 [rtl_pci]
__handle_irq_event_percpu+0x3f/0x1d0
handle_irq_event_percpu+0x23/0x60
handle_irq_event+0x3c/0x60
handle_fasteoi_irq+0xa2/0x170
handle_irq+0x20/0x30
do_IRQ+0x48/0xd0
common_interrupt+0x89/0x89
...
Although commit cceb0a5973
converted most c2h commands to use a work
queue, the Bluetooth coexistence routines can be in atomic mode when
they execute such a call.
Fixes: cceb0a5973
("rtlwifi: Add work queue for c2h cmd.")
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net >
Cc: Ping-Ke Shih <pkshih@realtek.com >
Signed-off-by: Kalle Valo <kvalo@codeaurora.org >
2017-03-30 19:43:01 +03:00
Masanari Iida
0a95160ed3
treewide: Fix typos in printk
...
This patch fix some spelling typos found in printk.
[jkosina@suse.cz: drop arch/arm64/kernel/hibernate.c that was already
in place]
Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2017-03-24 15:24:00 +01:00
Ping-Ke Shih
74a7dfbcc6
rtlwifi: Add QoS-NULL and BT-QoS-NULL to reserved page.
...
Two additional preset responses are added to the reserved page on the
wifi device.
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com >
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net >
Signed-off-by: Kalle Valo <kvalo@codeaurora.org >
2017-03-20 19:10:15 +02:00
Larry Finger
f70e4df2b3
rtlwifi: Add code to read new versions of firmware
...
Changes in the drivers for RTL8723BE and RTL8821AE require corresponding
changes in the firmware. This new firmware has been accepted into the
Linux firmware repo. To handle the case where the kernel has been
updated before the firmware, the new versions have been given new names.
The code will attempt to read the new name, and fall back to the old one
if the new one is not available.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net >
Cc: Ping-Ke Shih <pkshih@realtek.com >
Signed-off-by: Kalle Valo <kvalo@codeaurora.org >
2017-03-20 19:10:15 +02:00
Ping-Ke Shih
e604285930
rtlwifi: Update 8812ae new phy parameters and its parser.
...
Update PHY tables for the RTL8812AE. A new parser is also needed.
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com >
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net >
Signed-off-by: Kalle Valo <kvalo@codeaurora.org >
2017-03-20 19:10:15 +02:00
Ping-Ke Shih
84d26fda52
rtlwifi: Update 8821ae new phy parameters and its parser.
...
There are new PHY table values for the RTL8821AE. The changes require
new parsing code.
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com >
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net >
Signed-off-by: Kalle Valo <kvalo@codeaurora.org >
2017-03-20 19:10:14 +02:00
Colin Ian King
3e062eb21d
rtlwifi: fix spelling mistake: "conuntry" -> "country"
...
trivial fix to spelling mistake in RT_TRACE message
Signed-off-by: Colin Ian King <colin.king@canonical.com >
Signed-off-by: Kalle Valo <kvalo@codeaurora.org >
2017-03-08 17:07:32 +02:00
Nils Holland
3beb27028c
rtl8187: Enable monitor mode to fix multicast reception
...
The rtl8187 cards don't seem to receive multicast frames, which,
among other things, makes them fail to receive RAs in IPv6 networks.
The cause seems to be that the RTL818X_RX_CONF_MULTICAST flag doesn't
have the desired effect.
Fix the issue by setting RTL818X_RX_CONF_MONITOR instead, which puts the
card into monitor mode and resolves the problem so that multicast frames
are sucessfully passed to the kernel.
The existence of the problem and the effectiveness of the solution has
originally been confirmed on an 8187B based card with the USB id of
0bda:8197. Subsequent testing by Larry Finger on an 8187L based card,
which follows the second (8187, i.e. "non-b") code path in the driver,
has confirmed that the fix does not cause any noticeable regresssions
there either.
Signed-off-by: Nils Holland <nholland@tisys.org >
Acked-by: Larry Finger <Larry.Finger@lwfinger.net >
Signed-off-by: Kalle Valo <kvalo@codeaurora.org >
2017-03-08 17:07:10 +02:00