Merge "cnss2: Remove utils"
This commit is contained in:
commit
ed2c8ee369
5 changed files with 0 additions and 172 deletions
|
@ -5,5 +5,4 @@ cnss2-y += debug.o
|
|||
cnss2-y += pci.o
|
||||
cnss2-y += power.o
|
||||
cnss2-y += qmi.o
|
||||
cnss2-y += utils.o
|
||||
cnss2-y += wlan_firmware_service_v01.o
|
||||
|
|
|
@ -322,31 +322,6 @@ void cnss_remove_pm_qos(void)
|
|||
}
|
||||
EXPORT_SYMBOL(cnss_remove_pm_qos);
|
||||
|
||||
u8 *cnss_common_get_wlan_mac_address(struct device *dev, u32 *num)
|
||||
{
|
||||
struct cnss_plat_data *plat_priv = cnss_bus_dev_to_plat_priv(dev);
|
||||
struct cnss_wlan_mac_info *wlan_mac_info;
|
||||
struct cnss_wlan_mac_addr *addr;
|
||||
|
||||
if (!plat_priv)
|
||||
goto out;
|
||||
|
||||
wlan_mac_info = &plat_priv->wlan_mac_info;
|
||||
if (!wlan_mac_info->is_wlan_mac_set) {
|
||||
cnss_pr_info("Platform driver doesn't have any MAC address!\n");
|
||||
goto out;
|
||||
}
|
||||
|
||||
addr = &wlan_mac_info->wlan_mac_addr;
|
||||
*num = addr->no_of_mac_addr_set;
|
||||
|
||||
return &addr->mac_addr[0][0];
|
||||
out:
|
||||
*num = 0;
|
||||
return NULL;
|
||||
}
|
||||
EXPORT_SYMBOL(cnss_common_get_wlan_mac_address);
|
||||
|
||||
int cnss_wlan_enable(struct device *dev,
|
||||
struct cnss_wlan_enable_cfg *config,
|
||||
enum cnss_driver_mode mode,
|
||||
|
|
|
@ -97,16 +97,6 @@ struct cnss_bus_bw_info {
|
|||
int current_bw_vote;
|
||||
};
|
||||
|
||||
struct cnss_wlan_mac_addr {
|
||||
u8 mac_addr[MAX_NO_OF_MAC_ADDR][ETH_ALEN];
|
||||
u32 no_of_mac_addr_set;
|
||||
};
|
||||
|
||||
struct cnss_wlan_mac_info {
|
||||
struct cnss_wlan_mac_addr wlan_mac_addr;
|
||||
bool is_wlan_mac_set;
|
||||
};
|
||||
|
||||
struct cnss_fw_mem {
|
||||
size_t size;
|
||||
void *va;
|
||||
|
@ -185,7 +175,6 @@ struct cnss_plat_data {
|
|||
struct cnss_wlan_driver *driver_ops;
|
||||
enum cnss_driver_status driver_status;
|
||||
u32 recovery_count;
|
||||
struct cnss_wlan_mac_info wlan_mac_info;
|
||||
unsigned long driver_state;
|
||||
struct list_head event_list;
|
||||
spinlock_t event_lock; /* spinlock for driver work event handling */
|
||||
|
|
|
@ -1,129 +0,0 @@
|
|||
/* Copyright (c) 2016-2017, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 and
|
||||
* only version 2 as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#define CNSS_MAX_CH_NUM 45
|
||||
|
||||
#include <linux/module.h>
|
||||
#include <linux/slab.h>
|
||||
|
||||
static DEFINE_MUTEX(unsafe_channel_list_lock);
|
||||
static DEFINE_MUTEX(dfs_nol_info_lock);
|
||||
|
||||
static struct cnss_unsafe_channel_list {
|
||||
u16 unsafe_ch_count;
|
||||
u16 unsafe_ch_list[CNSS_MAX_CH_NUM];
|
||||
} unsafe_channel_list;
|
||||
|
||||
static struct cnss_dfs_nol_info {
|
||||
void *dfs_nol_info;
|
||||
u16 dfs_nol_info_len;
|
||||
} dfs_nol_info;
|
||||
|
||||
int cnss_set_wlan_unsafe_channel(u16 *unsafe_ch_list, u16 ch_count)
|
||||
{
|
||||
mutex_lock(&unsafe_channel_list_lock);
|
||||
if ((!unsafe_ch_list) || (ch_count > CNSS_MAX_CH_NUM)) {
|
||||
mutex_unlock(&unsafe_channel_list_lock);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
unsafe_channel_list.unsafe_ch_count = ch_count;
|
||||
|
||||
if (ch_count != 0) {
|
||||
memcpy((char *)unsafe_channel_list.unsafe_ch_list,
|
||||
(char *)unsafe_ch_list, ch_count * sizeof(u16));
|
||||
}
|
||||
mutex_unlock(&unsafe_channel_list_lock);
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(cnss_set_wlan_unsafe_channel);
|
||||
|
||||
int cnss_get_wlan_unsafe_channel(u16 *unsafe_ch_list,
|
||||
u16 *ch_count, u16 buf_len)
|
||||
{
|
||||
mutex_lock(&unsafe_channel_list_lock);
|
||||
if (!unsafe_ch_list || !ch_count) {
|
||||
mutex_unlock(&unsafe_channel_list_lock);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (buf_len < (unsafe_channel_list.unsafe_ch_count * sizeof(u16))) {
|
||||
mutex_unlock(&unsafe_channel_list_lock);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
*ch_count = unsafe_channel_list.unsafe_ch_count;
|
||||
memcpy((char *)unsafe_ch_list,
|
||||
(char *)unsafe_channel_list.unsafe_ch_list,
|
||||
unsafe_channel_list.unsafe_ch_count * sizeof(u16));
|
||||
mutex_unlock(&unsafe_channel_list_lock);
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(cnss_get_wlan_unsafe_channel);
|
||||
|
||||
int cnss_wlan_set_dfs_nol(const void *info, u16 info_len)
|
||||
{
|
||||
void *temp;
|
||||
struct cnss_dfs_nol_info *dfs_info;
|
||||
|
||||
mutex_lock(&dfs_nol_info_lock);
|
||||
if (!info || !info_len) {
|
||||
mutex_unlock(&dfs_nol_info_lock);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
temp = kmalloc(info_len, GFP_KERNEL);
|
||||
if (!temp) {
|
||||
mutex_unlock(&dfs_nol_info_lock);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
memcpy(temp, info, info_len);
|
||||
dfs_info = &dfs_nol_info;
|
||||
kfree(dfs_info->dfs_nol_info);
|
||||
|
||||
dfs_info->dfs_nol_info = temp;
|
||||
dfs_info->dfs_nol_info_len = info_len;
|
||||
mutex_unlock(&dfs_nol_info_lock);
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(cnss_wlan_set_dfs_nol);
|
||||
|
||||
int cnss_wlan_get_dfs_nol(void *info, u16 info_len)
|
||||
{
|
||||
int len;
|
||||
struct cnss_dfs_nol_info *dfs_info;
|
||||
|
||||
mutex_lock(&dfs_nol_info_lock);
|
||||
if (!info || !info_len) {
|
||||
mutex_unlock(&dfs_nol_info_lock);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
dfs_info = &dfs_nol_info;
|
||||
|
||||
if (!dfs_info->dfs_nol_info || dfs_info->dfs_nol_info_len == 0) {
|
||||
mutex_unlock(&dfs_nol_info_lock);
|
||||
return -ENOENT;
|
||||
}
|
||||
|
||||
len = min(info_len, dfs_info->dfs_nol_info_len);
|
||||
|
||||
memcpy(info, dfs_info->dfs_nol_info, len);
|
||||
mutex_unlock(&dfs_nol_info_lock);
|
||||
|
||||
return len;
|
||||
}
|
||||
EXPORT_SYMBOL(cnss_wlan_get_dfs_nol);
|
|
@ -153,14 +153,8 @@ extern int cnss_get_platform_cap(struct cnss_platform_cap *cap);
|
|||
extern int cnss_get_soc_info(struct device *dev, struct cnss_soc_info *info);
|
||||
extern void cnss_set_driver_status(enum cnss_driver_status driver_status);
|
||||
extern int cnss_request_bus_bandwidth(int bandwidth);
|
||||
extern int cnss_set_wlan_unsafe_channel(u16 *unsafe_ch_list, u16 ch_count);
|
||||
extern int cnss_get_wlan_unsafe_channel(u16 *unsafe_ch_list, u16 *ch_count,
|
||||
u16 buf_len);
|
||||
extern int cnss_wlan_set_dfs_nol(const void *info, u16 info_len);
|
||||
extern int cnss_wlan_get_dfs_nol(void *info, u16 info_len);
|
||||
extern int cnss_power_up(struct device *dev);
|
||||
extern int cnss_power_down(struct device *dev);
|
||||
extern u8 *cnss_common_get_wlan_mac_address(struct device *dev, uint32_t *num);
|
||||
extern void cnss_request_pm_qos(u32 qos_val);
|
||||
extern void cnss_remove_pm_qos(void);
|
||||
extern void cnss_lock_pm_sem(void);
|
||||
|
|
Loading…
Add table
Reference in a new issue