diff --git a/core/hdd/inc/wlan_hdd_power.h b/core/hdd/inc/wlan_hdd_power.h index a57e9b6eec..44780ec7bc 100644 --- a/core/hdd/inc/wlan_hdd_power.h +++ b/core/hdd/inc/wlan_hdd_power.h @@ -167,6 +167,7 @@ int wlan_hdd_cfg80211_resume_wlan(struct wiphy *wiphy); void hdd_ipv4_notifier_work_queue(struct work_struct *work); #ifdef WLAN_NS_OFFLOAD +void hdd_conf_ns_offload(hdd_adapter_t *adapter, bool fenable); void hdd_ipv6_notifier_work_queue(struct work_struct *work); #endif diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index d66047884d..00f4306a0c 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -4849,6 +4849,8 @@ __wlan_hdd_cfg80211_set_ns_offload(struct wiphy *wiphy, int status; struct nlattr *tb[QCA_WLAN_VENDOR_ATTR_ND_OFFLOAD_MAX + 1]; hdd_context_t *pHddCtx = wiphy_priv(wiphy); + struct net_device *dev = wdev->netdev; + hdd_adapter_t *adapter = WLAN_HDD_GET_PRIV_PTR(dev); ENTER_DEV(wdev->netdev); @@ -4875,6 +4877,9 @@ __wlan_hdd_cfg80211_set_ns_offload(struct wiphy *wiphy, pHddCtx->ns_offload_enable = nla_get_u8(tb[QCA_WLAN_VENDOR_ATTR_ND_OFFLOAD_FLAG]); + /* update ns offload in case it is already enabled/disabled */ + hdd_conf_ns_offload(adapter, pHddCtx->ns_offload_enable); + return 0; } diff --git a/core/hdd/src/wlan_hdd_power.c b/core/hdd/src/wlan_hdd_power.c index 72d957535f..dafd85ec06 100644 --- a/core/hdd/src/wlan_hdd_power.c +++ b/core/hdd/src/wlan_hdd_power.c @@ -508,7 +508,7 @@ static void hdd_enable_ns_offload(hdd_adapter_t *adapter) * * Return: nothing */ -static void hdd_conf_ns_offload(hdd_adapter_t *adapter, bool fenable) +void hdd_conf_ns_offload(hdd_adapter_t *adapter, bool fenable) { hdd_context_t *hdd_ctx;