Hi, This patch do recovers from PN-KEY mismatch packet drop in linux kernel 3.12.2. diff -Nurp linux-custom_1/net/mac80211/wpa.c linux-custom/net/mac80211/wpa.c --- linux-custom_1/net/mac80211/wpa.c 2014-11-09 23:14:57.000000000 -0800 +++ linux-custom/net/mac80211/wpa.c 2014-11-13 05:16:45.000000000 -0800 @@ -483,7 +483,7 @@ ieee80211_crypto_ccmp_encrypt(struct iee return TX_CONTINUE; } - +#define MAX_PN_TOLERANCE 0x05 //PN-KEY mismatch ieee80211_rx_result ieee80211_crypto_ccmp_decrypt(struct ieee80211_rx_data *rx) { @@ -495,6 +495,7 @@ ieee80211_crypto_ccmp_decrypt(struct iee u8 pn[IEEE80211_CCMP_PN_LEN]; int data_len; int queue; + static const u8 zero_pn[IEEE80211_CCMP_PN_LEN] = {0}; hdrlen = ieee80211_hdrlen(hdr->frame_control); @@ -537,8 +538,16 @@ ieee80211_crypto_ccmp_decrypt(struct iee skb->data + hdrlen + IEEE80211_CCMP_HDR_LEN)) return RX_DROP_UNUSABLE; } - - memcpy(key->u.ccmp.rx_pn[queue], pn, IEEE80211_CCMP_PN_LEN); + + //PN-KEY mismatch start + if (memcmp(key->u.ccmp.rx_pn[queue], zero_pn, IEEE80211_CCMP_PN_LEN) == 0) + { + if((memcmp(pn,zero_pn,(IEEE80211_CCMP_PN_LEN-1)) == 0) && (pn[IEEE80211_CCMP_PN_LEN-1] < MAX_PN_TOLERANCE)) + memcpy(key->u.ccmp.rx_pn[queue], pn, IEEE80211_CCMP_PN_LEN); + } + else + memcpy(key->u.ccmp.rx_pn[queue], pn, IEEE80211_CCMP_PN_LEN); + //PN-KEY mismatch end /* Remove CCMP header and MIC */ if (pskb_trim(skb, skb->len - IEEE80211_CCMP_MIC_LEN)) On Tue, Nov 11, 2014 at 3:49 PM, deepak kumar Pradhan <hydipu@xxxxxxxxx> wrote: > We are using IXDP465 intel board which is running kernel 3.12.2 with a > wireless >Atheros card (driver ath9k) for mesh networking using authsae for > secured mesh >network. > Under stress tests we are getting gap in wireless connectivity. On further > investigation, we found that the Packet Number and Key is mismatched and > packet >dropped. > (In function: ieee80211_crypto_ccmp_decrypt, file net/mac80211/wpa.c file). > To fix this we tried the below patch, but we still facing the same > issue(gap). > Has someone observed this issue. Any inputs on this is much appreciated. > Please forgive me if I have posted to a wrong list, and please guide me > where should I post this? -- Deepak Kumar Pradhan -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html