Commit 11f35c95 authored by Ping-Ke Shih's avatar Ping-Ke Shih Committed by Kalle Valo

rtlwifi: Fill in_4way field by driver

Because it isn't always correct to use EAPOL to check 4-way,
we add a timer to handle exception.
Signed-off-by: default avatarPing-Ke Shih <pkshih@realtek.com>
Signed-off-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
Cc: Yan-Hsuan Chuang <yhchuang@realtek.com>
Cc: Birming Chiu <birming@realtek.com>
Cc: Shaofu <shaofu@realtek.com>
Cc: Steven Ting <steventing@realtek.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent fcc870d7
...@@ -1408,6 +1408,11 @@ u8 rtl_is_special_data(struct ieee80211_hw *hw, struct sk_buff *skb, u8 is_tx, ...@@ -1408,6 +1408,11 @@ u8 rtl_is_special_data(struct ieee80211_hw *hw, struct sk_buff *skb, u8 is_tx,
return true; return true;
} else if (ETH_P_PAE == ether_type) { } else if (ETH_P_PAE == ether_type) {
/* EAPOL is seens as in-4way */
rtlpriv->btcoexist.btc_info.in_4way = true;
rtlpriv->btcoexist.btc_info.in_4way_ts = jiffies;
rtlpriv->btcoexist.btc_info.in_4way_ts = jiffies;
RT_TRACE(rtlpriv, (COMP_SEND | COMP_RECV), DBG_DMESG, RT_TRACE(rtlpriv, (COMP_SEND | COMP_RECV), DBG_DMESG,
"802.1X %s EAPOL pkt!!\n", (is_tx) ? "Tx" : "Rx"); "802.1X %s EAPOL pkt!!\n", (is_tx) ? "Tx" : "Rx");
...@@ -1959,6 +1964,12 @@ void rtl_watchdog_wq_callback(void *data) ...@@ -1959,6 +1964,12 @@ void rtl_watchdog_wq_callback(void *data)
if (rtlpriv->cfg->ops->get_btc_status()) if (rtlpriv->cfg->ops->get_btc_status())
rtlpriv->btcoexist.btc_ops->btc_periodical(rtlpriv); rtlpriv->btcoexist.btc_ops->btc_periodical(rtlpriv);
if (rtlpriv->btcoexist.btc_info.in_4way) {
if (time_after(jiffies, rtlpriv->btcoexist.btc_info.in_4way_ts +
msecs_to_jiffies(IN_4WAY_TIMEOUT_TIME)))
rtlpriv->btcoexist.btc_info.in_4way = false;
}
rtlpriv->link_info.bcn_rx_inperiod = 0; rtlpriv->link_info.bcn_rx_inperiod = 0;
/* <6> scan list */ /* <6> scan list */
......
...@@ -1505,6 +1505,8 @@ static int rtl_op_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, ...@@ -1505,6 +1505,8 @@ static int rtl_op_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
u8 mac_addr[ETH_ALEN]; u8 mac_addr[ETH_ALEN];
u8 bcast_addr[ETH_ALEN] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; u8 bcast_addr[ETH_ALEN] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
rtlpriv->btcoexist.btc_info.in_4way = false;
if (rtlpriv->cfg->mod_params->sw_crypto || rtlpriv->sec.use_sw_sec) { if (rtlpriv->cfg->mod_params->sw_crypto || rtlpriv->sec.use_sw_sec) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_WARNING, RT_TRACE(rtlpriv, COMP_ERR, DBG_WARNING,
"not open hw encryption\n"); "not open hw encryption\n");
......
...@@ -2477,6 +2477,8 @@ struct rtl_global_var { ...@@ -2477,6 +2477,8 @@ struct rtl_global_var {
spinlock_t glb_list_lock; spinlock_t glb_list_lock;
}; };
#define IN_4WAY_TIMEOUT_TIME (30 * MSEC_PER_SEC) /* 30 seconds */
struct rtl_btc_info { struct rtl_btc_info {
u8 bt_type; u8 bt_type;
u8 btcoexist; u8 btcoexist;
...@@ -2485,6 +2487,7 @@ struct rtl_btc_info { ...@@ -2485,6 +2487,7 @@ struct rtl_btc_info {
u8 ap_num; u8 ap_num;
bool in_4way; bool in_4way;
unsigned long in_4way_ts;
}; };
struct bt_coexist_info { struct bt_coexist_info {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment