icnss: Add APIs to store driver load count

Host wlan driver needs to know if the drive has been
reloaded and wiphy re-registered with the kernel.
Therefore add APIs to retrieve this information.

CRs-Fixed: 2058292
Change-Id: Ia323e31e9b6779e2f5279f42b6e1860a9259a189
Signed-off-by: Amar Singhal <asinghal@codeaurora.org>
This commit is contained in:
Amar Singhal 2017-06-07 16:53:06 -07:00
parent 55a25be010
commit e090be48c6
2 changed files with 16 additions and 0 deletions

View file

@ -12,11 +12,13 @@
#include <linux/module.h>
#include <linux/slab.h>
#include <soc/qcom/icnss.h>
#define ICNSS_MAX_CH_NUM 45
static DEFINE_MUTEX(unsafe_channel_list_lock);
static DEFINE_SPINLOCK(dfs_nol_info_lock);
static int driver_load_cnt;
static struct icnss_unsafe_channel_list {
u16 unsafe_ch_count;
@ -124,3 +126,15 @@ int icnss_wlan_get_dfs_nol(void *info, u16 info_len)
return len;
}
EXPORT_SYMBOL(icnss_wlan_get_dfs_nol);
void icnss_increment_driver_load_cnt(void)
{
++driver_load_cnt;
}
EXPORT_SYMBOL(icnss_increment_driver_load_cnt);
int icnss_get_driver_load_cnt(void)
{
return driver_load_cnt;
}
EXPORT_SYMBOL(icnss_get_driver_load_cnt);

View file

@ -152,4 +152,6 @@ extern u8 *icnss_get_wlan_mac_address(struct device *dev, uint32_t *num);
extern int icnss_trigger_recovery(struct device *dev);
extern void cnss_set_cc_source(enum cnss_cc_src cc_source);
extern enum cnss_cc_src cnss_get_cc_source(void);
extern int icnss_get_driver_load_cnt(void);
extern void icnss_increment_driver_load_cnt(void);
#endif /* _ICNSS_WLAN_H_ */