diff options
| author | Srinivas Girigowda <sgirigow@codeaurora.org> | 2017-01-04 12:20:42 -0800 |
|---|---|---|
| committer | Ashish kumar goswami <agoswa@codeaurora.org> | 2017-01-05 16:12:43 +0530 |
| commit | f270bb34c81289c9dcce470cf6b2e899dfc29670 (patch) | |
| tree | fa3ca5277c7fd8eb71548a0112b8fb9a5b9d85ef | |
| parent | 7ff3de481604c783d0b62f40c30217b293d222b0 (diff) | |
qcacld-2.0: Reinitialization of BPF and llstats callbacks
After SSR has triggered, BPF and llstats are not working
because callbacks are NULL. Initialization of BPF and
llstats callbacks are done during WLAN startup, but
when SSR is triggered HDD context is invalidated.
Hence the fix is to initialize the callbacks during re-init also.
Change-Id: I0b7571c66e90a84a80b675a433a7a752c82865d3
CRs-Fixed: 1107505
| -rw-r--r-- | CORE/HDD/inc/wlan_hdd_main.h | 21 | ||||
| -rw-r--r-- | CORE/HDD/src/wlan_hdd_cfg80211.c | 12 | ||||
| -rw-r--r-- | CORE/HDD/src/wlan_hdd_early_suspend.c | 4 | ||||
| -rw-r--r-- | CORE/HDD/src/wlan_hdd_main.c | 4 |
4 files changed, 25 insertions, 16 deletions
diff --git a/CORE/HDD/inc/wlan_hdd_main.h b/CORE/HDD/inc/wlan_hdd_main.h index 2afef81812ad..e6d6d360b6cc 100644 --- a/CORE/HDD/inc/wlan_hdd_main.h +++ b/CORE/HDD/inc/wlan_hdd_main.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2016 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2017 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -2189,10 +2189,6 @@ static inline int hdd_wlan_enable_egap(struct hdd_context_s *hdd_ctx) { void wlan_hdd_cfg80211_stats_ext_init(hdd_context_t *pHddCtx); #endif -#ifdef WLAN_FEATURE_LINK_LAYER_STATS -void wlan_hdd_cfg80211_link_layer_stats_init(hdd_context_t *pHddCtx); -#endif - void hdd_update_macaddr(hdd_config_t *cfg_ini, v_MACADDR_t hw_macaddr); #if defined(FEATURE_WLAN_LFR) && defined(WLAN_FEATURE_ROAM_SCAN_OFFLOAD) void wlan_hdd_disable_roaming(hdd_adapter_t *pAdapter); @@ -2239,15 +2235,30 @@ static inline void hdd_init_ll_stats_ctx(hdd_context_t *hdd_ctx) return; } + +/** + * wlan_hdd_cfg80211_link_layer_stats_init() - Initialize llstats callbacks + * @pHddCtx: HDD context + * + * Return: none + */ +void wlan_hdd_cfg80211_link_layer_stats_init(hdd_context_t *pHddCtx); + #else static inline bool hdd_link_layer_stats_supported(void) { return false; } + static inline void hdd_init_ll_stats_ctx(hdd_context_t *hdd_ctx) { return; } + +void wlan_hdd_cfg80211_link_layer_stats_init(hdd_context_t *pHddCtx) +{ + return; +} #endif /* WLAN_FEATURE_LINK_LAYER_STATS */ #ifdef FEATURE_WLAN_LFR diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c index 54605a2a4e81..d2e15058809c 100644 --- a/CORE/HDD/src/wlan_hdd_cfg80211.c +++ b/CORE/HDD/src/wlan_hdd_cfg80211.c @@ -5944,8 +5944,7 @@ static void hdd_link_layer_process_radio_stats(hdd_adapter_t *pAdapter, * after receiving Link Layer indications from FW.This callback converts the * firmware data to the NL data and send the same to the kernel/upper layers. */ -static void wlan_hdd_cfg80211_link_layer_stats_callback(void *ctx, - int indType, +static void wlan_hdd_cfg80211_link_layer_stats_callback(void *ctx, int indType, void *pRsp) { hdd_adapter_t *pAdapter = NULL; @@ -7162,13 +7161,12 @@ static void wlan_hdd_cfg80211_ll_stats_ext_callback(tSirLLStatsResults *rsp) void wlan_hdd_cfg80211_link_layer_stats_init(hdd_context_t *pHddCtx) { - sme_SetLinkLayerStatsIndCB(pHddCtx->hHal, - wlan_hdd_cfg80211_link_layer_stats_callback); - sme_set_ll_ext_cb(pHddCtx->hHal, - wlan_hdd_cfg80211_ll_stats_ext_callback); + sme_SetLinkLayerStatsIndCB(pHddCtx->hHal, + wlan_hdd_cfg80211_link_layer_stats_callback); + sme_set_ll_ext_cb(pHddCtx->hHal, + wlan_hdd_cfg80211_ll_stats_ext_callback); } - const struct nla_policy qca_wlan_vendor_ll_set_policy[QCA_WLAN_VENDOR_ATTR_LL_STATS_SET_MAX +1] = diff --git a/CORE/HDD/src/wlan_hdd_early_suspend.c b/CORE/HDD/src/wlan_hdd_early_suspend.c index 97f9232ab158..5d23dc62aa8a 100644 --- a/CORE/HDD/src/wlan_hdd_early_suspend.c +++ b/CORE/HDD/src/wlan_hdd_early_suspend.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2016 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2017 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -2409,6 +2409,8 @@ VOS_STATUS hdd_wlan_re_init(void *hif_sc) wlan_hdd_cfg80211_extscan_callback); #endif /* FEATURE_WLAN_EXTSCAN */ sme_set_rssi_threshold_breached_cb(pHddCtx->hHal, hdd_rssi_threshold_breached); + wlan_hdd_cfg80211_link_layer_stats_init(pHddCtx); + sme_bpf_offload_register_callback(pHddCtx->hHal, hdd_get_bpf_offload_cb); #ifdef WLAN_FEATURE_LPSS wlan_hdd_send_all_scan_intf_info(pHddCtx); diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c index fab1eac42230..bd89af3cd02f 100644 --- a/CORE/HDD/src/wlan_hdd_main.c +++ b/CORE/HDD/src/wlan_hdd_main.c @@ -15793,9 +15793,7 @@ int hdd_wlan_startup(struct device *dev, v_VOID_t *hif_sc) sme_chain_rssi_register_callback(pHddCtx->hHal, wlan_hdd_cfg80211_chainrssi_callback); sme_set_rssi_threshold_breached_cb(pHddCtx->hHal, hdd_rssi_threshold_breached); -#ifdef WLAN_FEATURE_LINK_LAYER_STATS - wlan_hdd_cfg80211_link_layer_stats_init(pHddCtx); -#endif + wlan_hdd_cfg80211_link_layer_stats_init(pHddCtx); wlan_hdd_tsf_init(pHddCtx); |
