diff options
| author | Diogo Ferreira <defer@cyngn.com> | 2016-07-29 14:35:12 +0100 |
|---|---|---|
| committer | Mister Oyster <oysterized@gmail.com> | 2017-04-13 12:34:35 +0200 |
| commit | d802d9e1ad90c0efe2fe815e92106a013e241fae (patch) | |
| tree | 35130a9f68cf0340fb22866a4cbf16a15ee532c1 | |
| parent | fe5032e69350eb7e234673d9ef8395503a9bb744 (diff) | |
mediatek: wlan: Add an option to disable 5ghz channels for P2P
Some devices might contain antennas that can do ap-sta connectivity fine
in 5ghz but cannot provide a consistent experience when forming P2P
groups.
This patch adds a toggle that, when active, disables 5ghz channels in
P2P negotiations.
Change-Id: I491f1a7973f1248bd50c381d05987d2814b6f7cd
Ticket: PORRIDGE-56
| -rw-r--r-- | drivers/misc/mediatek/connectivity/Kconfig | 8 | ||||
| -rw-r--r-- | drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/gl_p2p.c | 3 |
2 files changed, 11 insertions, 0 deletions
diff --git a/drivers/misc/mediatek/connectivity/Kconfig b/drivers/misc/mediatek/connectivity/Kconfig index 18c335bfa..ea1c3954f 100644 --- a/drivers/misc/mediatek/connectivity/Kconfig +++ b/drivers/misc/mediatek/connectivity/Kconfig @@ -278,3 +278,11 @@ config MTK_GPS_REGISTER_SETTING depends on MTK_COMBO_GPS help GPS register settings. + +config MTK_COMBO_DISABLE_5G_FOR_P2P + bool "Disable 5Ghz bands from P2P negotiations" + default n + help + When true, 5Ghz bands will not be attempted in P2P group + formation negotiations. + diff --git a/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/gl_p2p.c b/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/gl_p2p.c index b3f4c9da0..07794b66e 100644 --- a/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/gl_p2p.c +++ b/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/gl_p2p.c @@ -1533,6 +1533,9 @@ BOOLEAN glRegisterP2P(P_GLUE_INFO_T prGlueInfo, const char *prDevName, BOOLEAN f /*set_wiphy_dev(gprP2pWdev->wiphy, prDev);*/ if (!prGlueInfo->prAdapter->fgEnable5GBand) gprP2pWdev->wiphy->bands[IEEE80211_BAND_5GHZ] = NULL; +#ifdef CONFIG_MTK_COMBO_DISABLE_5G_FOR_P2P + gprP2pWdev->wiphy->bands[IEEE80211_BAND_5GHZ] = NULL; +#endif p2pUpdateChannelTableByDomain(prGlueInfo); /* 2 set priv as pointer to glue structure */ *(P_GLUE_INFO_T *) wiphy_priv(gprP2pWdev->wiphy) = prGlueInfo; |
