wlan: Add station id to mac address hash
Add hash table for station id to mac address
mapping. It avoids storing station id in (skb->data -1)
location between select_queue and hard_start_xmit
call which is required to enable GRO.
This hash is created in SAP/P2P-GO and IBSS mode only.
CRs-Fixed: 849908
Change-Id: I42d3bd8942e06088fee9fb08ea8ebb27353833e7
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c
index c8ebdeb..40f4435 100644
--- a/CORE/HDD/src/wlan_hdd_cfg80211.c
+++ b/CORE/HDD/src/wlan_hdd_cfg80211.c
@@ -8093,6 +8093,12 @@
wdev->iftype = type;
hdd_set_ibss_ops( pAdapter );
hdd_ibss_init_tx_rx( pAdapter );
+
+ status = hdd_sta_id_hash_attach(pAdapter);
+ if (VOS_STATUS_SUCCESS != status) {
+ hddLog(VOS_TRACE_LEVEL_ERROR,
+ FL("Failed to initialize hash for IBSS"));
+ }
break;
case NL80211_IFTYPE_AP:
@@ -8224,6 +8230,14 @@
}
hdd_set_conparam(1);
+ status = hdd_sta_id_hash_attach(pAdapter);
+ if (VOS_STATUS_SUCCESS != status)
+ {
+ hddLog(VOS_TRACE_LEVEL_ERROR,
+ FL("Failed to initialize hash for AP"));
+ return -EINVAL;
+ }
+
/*interface type changed update in wiphy structure*/
if(wdev)
{