wlan: Disable NS offload for used slot index instead of all slots
Currently, Host driver disable NS offload for all the slots index
instead of actually used slots. Because of this host is sending
many unnecessary commands to firmware. Hence firmware is
entering and exit BMPS many time internally which is leading
to interrupts lock in firmware, which lead to delay in scheduling
of BT thread. Eventually user is getting A2DP glitches in BT.
As a part of this fix, Host stores used slots and disable NS offload
For these slots only.
Change-Id: Iaebf0971758fea116c398f1034028b0537eca119
CRs-Fixed: 2069206
diff --git a/CORE/HDD/inc/wlan_hdd_main.h b/CORE/HDD/inc/wlan_hdd_main.h
index 45a0f0b..73e021a 100644
--- a/CORE/HDD/inc/wlan_hdd_main.h
+++ b/CORE/HDD/inc/wlan_hdd_main.h
@@ -1246,7 +1246,10 @@
#ifdef FEATURE_WLAN_WAPI
hdd_wapi_info_t wapi_info;
#endif
-
+
+ /* Keep track ns offload count */
+ v_U8_t ns_slots;
+
v_S7_t rssi;
v_S7_t rssi_on_disconnect;
diff --git a/CORE/HDD/src/wlan_hdd_early_suspend.c b/CORE/HDD/src/wlan_hdd_early_suspend.c
index 27a8ce0..1ebcf4d 100644
--- a/CORE/HDD/src/wlan_hdd_early_suspend.c
+++ b/CORE/HDD/src/wlan_hdd_early_suspend.c
@@ -875,6 +875,8 @@
i++;
}
}
+ /* store actual slots being used */
+ pAdapter->ns_slots = i;
read_unlock_bh(&in6_dev->lock);
vos_mem_zero(&offLoadRequest, sizeof(offLoadRequest));
@@ -979,7 +981,7 @@
hdd_wlan_offload_event(SIR_IPV6_NS_OFFLOAD,
SIR_OFFLOAD_DISABLE);
- for (i = 0; i < slot_index; i++)
+ for (i = 0; i < pAdapter->ns_slots; i++)
{
hddLog(VOS_TRACE_LEVEL_INFO, FL("Disable Slot= %d"), i);
offLoadRequest.nsOffloadInfo.slotIdx = i;
@@ -991,6 +993,7 @@
" %d Slot"), i);
}
}
+ pAdapter->ns_slots = 0;
}
end:
while (slot > 0 && selfIPv6Addr[--slot])