linux/drivers/net/wireless
Ping-Ke Shih b68c7af0b2 rtlwifi: cleanup 8723be ant_sel definition
commit af8a41cccf upstream.

Some HP laptops have only a single wifi antenna. This would not be a
problem except that they were shipped with an incorrectly encoded
EFUSE. It should have been possible to open the computer and transfer
the antenna connection to the other terminal except that such action
might void the warranty, and moving the antenna broke the Windows
driver. The fix was to add a module option that would override the
EFUSE encoding. That was done with commit c18d8f5095 ("rtlwifi:
rtl8723be: Add antenna select module parameter"). There was still a
problem with Bluetooth coexistence, which was addressed with commit
baa1702290 ("rtlwifi: btcoexist: Implement antenna selection").
There were still problems, thus there were commit 0ff78adeef
("rtlwifi: rtl8723be: fix ant_sel code") and commit 6d62269283
("rtlwifi: btcoexist: Fix antenna selection code"). Despite all these
attempts at fixing the problem, the code is not yet right. A proper
fix is important as there are now instances of laptops having
RTL8723DE chips with the same problem.

The module parameter ant_sel is used to control antenna number and path.
At present enum ANT_{X2,X1} is used to define the antenna number, but
this choice is not intuitive, thus change to a new enum ANT_{MAIN,AUX}
to make it more readable. This change showed examples where incorrect
values were used. It was also possible to remove a workaround in
halbtcoutsrc.c.

The experimental results with single antenna connected to specific path
are now as follows:
  ant_sel  ANT_MAIN(#1)  ANT_AUX(#2)
     0        -8            -62
     1        -62           -10
     2        -6            -60

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Fixes: c18d8f5095 ("rtlwifi: rtl8723be: Add antenna select module parameter")
Fixes: baa1702290 ("rtlwifi: btcoexist: Implement antenna selection")
Fixes: 0ff78adeef ("rtlwifi: rtl8723be: fix ant_sel code")
Fixes: 6d62269283 ("rtlwifi: btcoexist: Fix antenna selection code")
Cc: Stable <stable@vger.kernel.org> # 4.7+
Reviewed-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2018-05-09 09:51:51 +02:00
..
admtek License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ath Revert "ath10k: send (re)assoc peer command when NSS changed" 2018-04-29 11:33:10 +02:00
atmel at76c50x: constify usb_device_id 2017-08-10 11:55:57 +03:00
broadcom brcmfmac: fix P2P_DEVICE ethernet address generation 2018-03-28 18:24:42 +02:00
cisco License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
intel iwlwifi: add a bunch of new 9000 PCI IDs 2018-04-24 09:36:39 +02:00
intersil p54: don't unregister leds when they are not initialized 2017-11-30 08:40:52 +00:00
marvell mwifiex: cfg80211: do not change virtual interface during scan processing 2018-03-19 08:42:52 +01:00
mediatek mt7601u: check memory allocation failure 2017-08-24 12:54:33 +03:00
quantenna qtnfmac: modify full Tx queue error reporting 2017-12-20 10:10:30 +01:00
ralink rt2x00: do not pause queue unconditionally on error path 2018-04-12 12:32:17 +02:00
realtek rtlwifi: cleanup 8723be ant_sel definition 2018-05-09 09:51:51 +02:00
rsi rsi: fix memory leak on buf and usb_reg_buf 2017-12-14 09:53:07 +01:00
st mac80211: use QoS NDP for AP probing 2018-02-03 17:39:03 +01:00
ti wl1251: check return from call to wl1251_acx_arp_ip_filter 2018-04-12 12:32:17 +02:00
zydas License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Kconfig qtnfmac: introduce new FullMAC driver for Quantenna chipsets 2017-05-24 17:04:13 +03:00
mac80211_hwsim.c mac80211_hwsim: fix use-after-free bug in hwsim_exit_net 2018-04-26 11:02:22 +02:00
mac80211_hwsim.h mac80211_hwsim: fix command documentation indentation 2017-03-06 09:21:48 +01:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ray_cs.c ray_cs: Avoid reading past end of buffer 2017-05-22 18:27:22 +03:00
ray_cs.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
rayctl.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
rndis_wlan.c Another set of patches for -next: 2017-04-28 14:41:15 -04:00
wl3501.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
wl3501_cs.c wl3501_cs: fix spelling mistake: "Insupported" -> "Unsupported" 2017-07-28 18:06:31 +03:00