diff options
| author | Srinivas Girigowda <sgirigow@qca.qualcomm.com> | 2014-02-24 17:37:09 -0800 |
|---|---|---|
| committer | Akash Patel <c_akashp@qca.qualcomm.com> | 2014-03-21 08:53:02 -0700 |
| commit | 94bbfab76308abdf77f81bc6332e0073b750a316 (patch) | |
| tree | 4a5b83b1ff283f82f2c7bbc78599ab660636d7eb | |
| parent | f30f35fbbc09fb2ccc899129012f55a41b7c165c (diff) | |
qcacld: hdd: HS2.0 gratuitous ARP/unsolicited NA dropping
This change at the HDD layer implements
gratuitous ARP/unsolicited NA dropping
Change-Id: Ibce71d0cd524b341d69b749ecfa3daa73d725bbb
CRs-Fixed: 621569
| -rw-r--r-- | CORE/HDD/inc/wlan_hdd_assoc.h | 2 | ||||
| -rw-r--r-- | CORE/HDD/src/wlan_hdd_assoc.c | 3 | ||||
| -rw-r--r-- | CORE/HDD/src/wlan_hdd_tx_rx.c | 13 |
3 files changed, 17 insertions, 1 deletions
diff --git a/CORE/HDD/inc/wlan_hdd_assoc.h b/CORE/HDD/inc/wlan_hdd_assoc.h index 7ba62db11533..158ed3d184a7 100644 --- a/CORE/HDD/inc/wlan_hdd_assoc.h +++ b/CORE/HDD/inc/wlan_hdd_assoc.h @@ -117,6 +117,8 @@ typedef struct connection_info_s /** Dot11Mode */ tANI_U32 dot11Mode; + v_U8_t proxyARPService; + }connection_info_t; /*Forward declaration of Adapter*/ typedef struct hdd_adapter_s hdd_adapter_t; diff --git a/CORE/HDD/src/wlan_hdd_assoc.c b/CORE/HDD/src/wlan_hdd_assoc.c index e1d066f171c3..c0b45ef7678e 100644 --- a/CORE/HDD/src/wlan_hdd_assoc.c +++ b/CORE/HDD/src/wlan_hdd_assoc.c @@ -307,6 +307,8 @@ void hdd_connSaveConnectInfo( hdd_adapter_t *pAdapter, tCsrRoamInfo *pRoamInfo, // Save dot11mode in which STA associated to AP pHddStaCtx->conn_info.dot11Mode = pRoamInfo->u.pConnectedProfile->dot11Mode; + + pHddStaCtx->conn_info.proxyARPService = pRoamInfo->u.pConnectedProfile->proxyARPService; } } @@ -775,6 +777,7 @@ void hdd_connRemoveConnectInfo( hdd_station_ctx_t *pHddStaCtx ) // Set not-connected state pHddStaCtx->conn_info.connDot11DesiredBssType = eCSR_BSS_TYPE_ANY; hdd_connSetConnectionState( pHddStaCtx, eConnectionState_NotConnected ); + pHddStaCtx->conn_info.proxyARPService = 0; vos_mem_zero( &pHddStaCtx->conn_info.SSID, sizeof( tCsrSSIDInfo ) ); } diff --git a/CORE/HDD/src/wlan_hdd_tx_rx.c b/CORE/HDD/src/wlan_hdd_tx_rx.c index 995b88c8de0d..efbc79a68d97 100644 --- a/CORE/HDD/src/wlan_hdd_tx_rx.c +++ b/CORE/HDD/src/wlan_hdd_tx_rx.c @@ -2045,6 +2045,7 @@ VOS_STATUS hdd_rx_packet_cbk(v_VOID_t *vosContext, #ifdef QCA_PKT_PROTO_TRACE v_U8_t proto_type; #endif /* QCA_PKT_PROTO_TRACE */ + hdd_station_ctx_t *pHddStaCtx = NULL; //Sanity check on inputs if ((NULL == vosContext) || (NULL == rxBuf)) @@ -2077,12 +2078,22 @@ VOS_STATUS hdd_rx_packet_cbk(v_VOID_t *vosContext, return eHAL_STATUS_FAILURE; } + pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(pAdapter); + if ((pHddStaCtx->conn_info.proxyARPService) && + cfg80211_is_gratuitous_arp_unsolicited_na(skb)) + { + ++pAdapter->hdd_stats.hddTxRxStats.rxDropped; + VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO, + "%s: Dropping HS 2.0 Gratuitous ARP or Unsolicited NA", __func__); + kfree_skb(skb); + return VOS_STATUS_SUCCESS; + } + #ifdef FEATURE_WLAN_TDLS #ifndef QCA_WIFI_2_0 if ((eTDLS_SUPPORT_ENABLED == pHddCtx->tdls_mode) && 0 != pHddCtx->connected_peer_count) { - hdd_station_ctx_t *pHddStaCtx = &pAdapter->sessionCtx.station; u8 mac[6]; wlan_hdd_tdls_extract_sa(skb, mac); |
