Search Linux Wireless

[PATCH 10/10] rtlwifi: Fill in_4way field by vendor command

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Ping-Ke Shih <pkshih@xxxxxxxxxxx>

The in_4way can be filled by wpa_cli's VENDOR command.

Signed-off-by: Ping-Ke Shih <pkshih@xxxxxxxxxxx>
Signed-off-by: Larry Finger <Larry.Finger@xxxxxxxxxxxx>
Cc: Yan-Hsuan Chuang <yhchuang@xxxxxxxxxxx>
Cc: Birming Chiu <birming@xxxxxxxxxxx>
Cc: Shaofu <shaofu@xxxxxxxxxxx>
Cc: Steven Ting <steventing@xxxxxxxxxxx>
---
 drivers/net/wireless/realtek/rtlwifi/base.c | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/drivers/net/wireless/realtek/rtlwifi/base.c b/drivers/net/wireless/realtek/rtlwifi/base.c
index 574f9943d70e..1b81bfa083ed 100644
--- a/drivers/net/wireless/realtek/rtlwifi/base.c
+++ b/drivers/net/wireless/realtek/rtlwifi/base.c
@@ -319,6 +319,7 @@ static void _rtl_init_hw_vht_capab(struct ieee80211_hw *hw,
 
 enum {
 	RTL_VENDOR_SCMD_COEX_AP_NUM	= 2000,
+	RTL_VENDOR_SCMD_COEX_4WAY	= 2001,
 };
 
 static u32 rtl_data_to_int(struct rtl_priv *rtlpriv, const void *data, int len)
@@ -364,6 +365,24 @@ static int rtl_cfgvendor_coex_ap_num(struct wiphy *wiphy,
 	return 0;
 }
 
+static int rtl_cfgvendor_coex_4way(struct wiphy *wiphy,
+				   struct wireless_dev *wdev,
+				   const void *data, int len)
+{
+	struct ieee80211_hw *hw = wiphy_to_ieee80211_hw(wiphy);
+	struct rtl_priv *rtlpriv = rtl_priv(hw);
+	bool tmp;
+
+	tmp = (rtl_data_to_int(rtlpriv, data, len) ? true : false);
+
+	rtlpriv->btcoexist.btc_info.in_4way = tmp;
+
+	RT_TRACE(rtlpriv, COMP_VENDOR_CMD, DBG_DMESG,
+		 "cfgvendor 4way is %d\n", rtlpriv->btcoexist.btc_info.in_4way);
+
+	return 0;
+}
+
 static const struct wiphy_vendor_command rtl_vendor_cmds[] = {
 	{
 		{
@@ -374,6 +393,15 @@ static const struct wiphy_vendor_command rtl_vendor_cmds[] = {
 			 WIPHY_VENDOR_CMD_NEED_NETDEV,
 		.doit = rtl_cfgvendor_coex_ap_num,
 	},
+	{
+		{
+			.vendor_id = OUI_REALTEK,
+			.subcmd = RTL_VENDOR_SCMD_COEX_4WAY
+		},
+		.flags = WIPHY_VENDOR_CMD_NEED_WDEV |
+			 WIPHY_VENDOR_CMD_NEED_NETDEV,
+		.doit = rtl_cfgvendor_coex_4way,
+	},
 };
 
 static void _rtl_init_mac80211(struct ieee80211_hw *hw)
-- 
2.12.3




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux