rtlwifi: Add encryption argument in rtl_is_special_data for checking DHCP packet.
rtl8192cu can't connect to AP after physical reconnect. according to dmesg, that problem's cause was DHCP timeout. rtl_is_special_data function checks packet type for adjusting rate. when that function is called from _rtl_rc_get_highest_rix, it can not calculate offset correctly. so i add argument is_encn in rtl_is_special_data. is_enc variable mean that iv header is added in skb parameter. i test only rtl8192cu chipset. because i doesn't have other rtlwifi chipsets. Signed-off-by: Taehee Yoo <ap420073@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
This commit is contained in:
@@ -1315,7 +1315,8 @@ static void setup_arp_tx(struct rtl_priv *rtlpriv, struct rtl_ps_ctl *ppsc)
|
||||
}
|
||||
|
||||
/*should call before software enc*/
|
||||
u8 rtl_is_special_data(struct ieee80211_hw *hw, struct sk_buff *skb, u8 is_tx)
|
||||
u8 rtl_is_special_data(struct ieee80211_hw *hw, struct sk_buff *skb, u8 is_tx,
|
||||
bool is_enc)
|
||||
{
|
||||
struct rtl_priv *rtlpriv = rtl_priv(hw);
|
||||
struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw));
|
||||
@@ -1344,7 +1345,9 @@ u8 rtl_is_special_data(struct ieee80211_hw *hw, struct sk_buff *skb, u8 is_tx)
|
||||
break;
|
||||
}
|
||||
|
||||
offset = mac_hdr_len + SNAP_SIZE + encrypt_header_len;
|
||||
offset = mac_hdr_len + SNAP_SIZE;
|
||||
if (is_enc)
|
||||
offset += encrypt_header_len;
|
||||
ether_type = be16_to_cpup((__be16 *)(skb->data + offset));
|
||||
|
||||
if (ETH_P_IP == ether_type) {
|
||||
|
||||
Reference in New Issue
Block a user