Commit 0e1af73d authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Greg Kroah-Hartman

staging/wilc1000: use proper naming for global symbols

There are many global symbols in the wilc1000 driver, some of them
with names like "DEBUG_LEVEL" or "probe" that are not acceptable
for globals in the linux kernel as they may easily conflict with other
(equally broken) drivers.

This renames all the globals that do not already start with
wilc or a variation of that to start with wilc_ and to follow
the usual naming conventions.
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1608c403
......@@ -344,7 +344,7 @@ static u8 get_current_channel_802_11n(u8 *pu8msa, u16 u16RxLen)
* @date 1 Mar 2012
* @version 1.0
*/
s32 parse_network_info(u8 *pu8MsgBuffer, tstrNetworkInfo **ppstrNetworkInfo)
s32 wilc_parse_network_info(u8 *pu8MsgBuffer, tstrNetworkInfo **ppstrNetworkInfo)
{
tstrNetworkInfo *pstrNetworkInfo = NULL;
u8 u8MsgType = 0;
......@@ -466,7 +466,7 @@ s32 parse_network_info(u8 *pu8MsgBuffer, tstrNetworkInfo **ppstrNetworkInfo)
* @date 1 Mar 2012
* @version 1.0
*/
s32 DeallocateNetworkInfo(tstrNetworkInfo *pstrNetworkInfo)
s32 wilc_dealloc_network_info(tstrNetworkInfo *pstrNetworkInfo)
{
s32 s32Error = 0;
......@@ -499,7 +499,7 @@ s32 DeallocateNetworkInfo(tstrNetworkInfo *pstrNetworkInfo)
* @date 2 Apr 2012
* @version 1.0
*/
s32 ParseAssocRespInfo(u8 *pu8Buffer, u32 u32BufferLen,
s32 wilc_parse_assoc_resp_info(u8 *pu8Buffer, u32 u32BufferLen,
tstrConnectRespInfo **ppstrConnectRespInfo)
{
s32 s32Error = 0;
......@@ -551,7 +551,7 @@ s32 ParseAssocRespInfo(u8 *pu8Buffer, u32 u32BufferLen,
* @date 2 Apr 2012
* @version 1.0
*/
s32 DeallocateAssocRespInfo(tstrConnectRespInfo *pstrConnectRespInfo)
s32 wilc_dealloc_assoc_resp_info(tstrConnectRespInfo *pstrConnectRespInfo)
{
s32 s32Error = 0;
......@@ -588,7 +588,7 @@ s32 DeallocateAssocRespInfo(tstrConnectRespInfo *pstrConnectRespInfo)
* @date 1 Mar 2012
* @version 1.0
*/
s32 send_config_pkt(u8 mode, struct wid *wids, u32 count, u32 drv)
s32 wilc_send_config_pkt(u8 mode, struct wid *wids, u32 count, u32 drv)
{
s32 counter = 0, ret = 0;
......
......@@ -127,16 +127,16 @@ typedef struct {
size_t ie_len;
} tstrDisconnectNotifInfo;
s32 send_config_pkt(u8 mode, struct wid *wids, u32 count, u32 drv);
s32 parse_network_info(u8 *pu8MsgBuffer, tstrNetworkInfo **ppstrNetworkInfo);
s32 DeallocateNetworkInfo(tstrNetworkInfo *pstrNetworkInfo);
s32 wilc_send_config_pkt(u8 mode, struct wid *wids, u32 count, u32 drv);
s32 wilc_parse_network_info(u8 *pu8MsgBuffer, tstrNetworkInfo **ppstrNetworkInfo);
s32 wilc_dealloc_network_info(tstrNetworkInfo *pstrNetworkInfo);
s32 ParseAssocRespInfo(u8 *pu8Buffer, u32 u32BufferLen,
s32 wilc_parse_assoc_resp_info(u8 *pu8Buffer, u32 u32BufferLen,
tstrConnectRespInfo **ppstrConnectRespInfo);
s32 DeallocateAssocRespInfo(tstrConnectRespInfo *pstrConnectRespInfo);
s32 wilc_dealloc_assoc_resp_info(tstrConnectRespInfo *pstrConnectRespInfo);
void NetworkInfoReceived(u8 *pu8Buffer, u32 u32Length);
void GnrlAsyncInfoReceived(u8 *pu8Buffer, u32 u32Length);
void host_int_ScanCompleteReceived(u8 *pu8Buffer, u32 u32Length);
void wilc_network_info_received(u8 *pu8Buffer, u32 u32Length);
void wilc_gnrl_async_info_received(u8 *pu8Buffer, u32 u32Length);
void wilc_scan_complete_received(u8 *pu8Buffer, u32 u32Length);
#endif
This diff is collapsed.
......@@ -303,95 +303,95 @@ struct add_sta_param {
u16 flags_set;
};
s32 host_int_remove_key(struct host_if_drv *hWFIDrv, const u8 *pu8StaAddress);
int host_int_remove_wep_key(struct host_if_drv *wfi_drv, u8 index);
int host_int_set_wep_default_key(struct host_if_drv *hif_drv, u8 index);
int host_int_add_wep_key_bss_sta(struct host_if_drv *hif_drv,
s32 wilc_remove_key(struct host_if_drv *hWFIDrv, const u8 *pu8StaAddress);
int wilc_remove_wep_key(struct host_if_drv *wfi_drv, u8 index);
int wilc_set_wep_default_keyid(struct host_if_drv *hif_drv, u8 index);
int wilc_add_wep_key_bss_sta(struct host_if_drv *hif_drv,
const u8 *key, u8 len, u8 index);
int host_int_add_wep_key_bss_ap(struct host_if_drv *hif_drv,
int wilc_add_wep_key_bss_ap(struct host_if_drv *hif_drv,
const u8 *key, u8 len, u8 index, u8 mode,
enum AUTHTYPE auth_type);
s32 host_int_add_ptk(struct host_if_drv *hWFIDrv, const u8 *pu8Ptk,
s32 wilc_add_ptk(struct host_if_drv *hWFIDrv, const u8 *pu8Ptk,
u8 u8PtkKeylen, const u8 *mac_addr,
const u8 *pu8RxMic, const u8 *pu8TxMic,
u8 mode, u8 u8Ciphermode, u8 u8Idx);
s32 host_int_get_inactive_time(struct host_if_drv *hWFIDrv, const u8 *mac,
s32 wilc_get_inactive_time(struct host_if_drv *hWFIDrv, const u8 *mac,
u32 *pu32InactiveTime);
s32 host_int_add_rx_gtk(struct host_if_drv *hWFIDrv, const u8 *pu8RxGtk,
s32 wilc_add_rx_gtk(struct host_if_drv *hWFIDrv, const u8 *pu8RxGtk,
u8 u8GtkKeylen, u8 u8KeyIdx,
u32 u32KeyRSClen, const u8 *KeyRSC,
const u8 *pu8RxMic, const u8 *pu8TxMic,
u8 mode, u8 u8Ciphermode);
s32 host_int_add_tx_gtk(struct host_if_drv *hWFIDrv, u8 u8KeyLen,
s32 wilc_add_tx_gtk(struct host_if_drv *hWFIDrv, u8 u8KeyLen,
u8 *pu8TxGtk, u8 u8KeyIdx);
s32 host_int_set_pmkid_info(struct host_if_drv *hWFIDrv,
s32 wilc_set_pmkid_info(struct host_if_drv *hWFIDrv,
struct host_if_pmkid_attr *pu8PmkidInfoArray);
s32 hif_get_mac_address(struct host_if_drv *hWFIDrv, u8 *pu8MacAddress);
s32 host_int_set_MacAddress(struct host_if_drv *hWFIDrv, u8 *pu8MacAddress);
int host_int_wait_msg_queue_idle(void);
s32 host_int_set_start_scan_req(struct host_if_drv *hWFIDrv, u8 scanSource);
s32 host_int_set_join_req(struct host_if_drv *hWFIDrv, u8 *pu8bssid,
s32 wilc_get_mac_address(struct host_if_drv *hWFIDrv, u8 *pu8MacAddress);
s32 wilc_set_mac_address(struct host_if_drv *hWFIDrv, u8 *pu8MacAddress);
int wilc_wait_msg_queue_idle(void);
s32 wilc_set_start_scan_req(struct host_if_drv *hWFIDrv, u8 scanSource);
s32 wilc_set_join_req(struct host_if_drv *hWFIDrv, u8 *pu8bssid,
const u8 *pu8ssid, size_t ssidLen,
const u8 *pu8IEs, size_t IEsLen,
wilc_connect_result pfConnectResult, void *pvUserArg,
u8 u8security, enum AUTHTYPE tenuAuth_type,
u8 u8channel, void *pJoinParams);
s32 host_int_flush_join_req(struct host_if_drv *hWFIDrv);
s32 host_int_disconnect(struct host_if_drv *hWFIDrv, u16 u16ReasonCode);
int host_int_set_mac_chnl_num(struct host_if_drv *wfi_drv, u8 channel);
s32 host_int_get_rssi(struct host_if_drv *hWFIDrv, s8 *ps8Rssi);
s32 host_int_scan(struct host_if_drv *hWFIDrv, u8 u8ScanSource,
s32 wilc_flush_join_req(struct host_if_drv *hWFIDrv);
s32 wilc_disconnect(struct host_if_drv *hWFIDrv, u16 u16ReasonCode);
int wilc_set_mac_chnl_num(struct host_if_drv *wfi_drv, u8 channel);
s32 wilc_get_rssi(struct host_if_drv *hWFIDrv, s8 *ps8Rssi);
s32 wilc_scan(struct host_if_drv *hWFIDrv, u8 u8ScanSource,
u8 u8ScanType, u8 *pu8ChnlFreqList,
u8 u8ChnlListLen, const u8 *pu8IEs,
size_t IEsLen, wilc_scan_result ScanResult,
void *pvUserArg, struct hidden_network *pstrHiddenNetwork);
s32 hif_set_cfg(struct host_if_drv *hWFIDrv,
s32 wilc_hif_set_cfg(struct host_if_drv *hWFIDrv,
struct cfg_param_val *pstrCfgParamVal);
s32 host_int_init(struct net_device *dev, struct host_if_drv **phWFIDrv);
s32 host_int_deinit(struct host_if_drv *hWFIDrv);
s32 host_int_add_beacon(struct host_if_drv *hWFIDrv, u32 u32Interval,
s32 wilc_init(struct net_device *dev, struct host_if_drv **phWFIDrv);
s32 wilc_deinit(struct host_if_drv *hWFIDrv);
s32 wilc_add_beacon(struct host_if_drv *hWFIDrv, u32 u32Interval,
u32 u32DTIMPeriod,
u32 u32HeadLen,
u8 *pu8Head,
u32 u32TailLen,
u8 *pu8tail);
int host_int_del_beacon(struct host_if_drv *hif_drv);
int host_int_add_station(struct host_if_drv *hif_drv,
int wilc_del_beacon(struct host_if_drv *hif_drv);
int wilc_add_station(struct host_if_drv *hif_drv,
struct add_sta_param *sta_param);
s32 host_int_del_allstation(struct host_if_drv *hWFIDrv,
s32 wilc_del_allstation(struct host_if_drv *hWFIDrv,
u8 pu8MacAddr[][ETH_ALEN]);
int host_int_del_station(struct host_if_drv *hif_drv, const u8 *mac_addr);
s32 host_int_edit_station(struct host_if_drv *hWFIDrv,
int wilc_del_station(struct host_if_drv *hif_drv, const u8 *mac_addr);
s32 wilc_edit_station(struct host_if_drv *hWFIDrv,
struct add_sta_param *pstrStaParams);
s32 host_int_set_power_mgmt(struct host_if_drv *hWFIDrv,
s32 wilc_set_power_mgmt(struct host_if_drv *hWFIDrv,
bool bIsEnabled,
u32 u32Timeout);
s32 host_int_setup_multicast_filter(struct host_if_drv *hWFIDrv,
s32 wilc_setup_multicast_filter(struct host_if_drv *hWFIDrv,
bool bIsEnabled,
u32 u32count);
s32 host_int_setup_ipaddress(struct host_if_drv *hWFIDrv,
s32 wilc_setup_ipaddress(struct host_if_drv *hWFIDrv,
u8 *pu8IPAddr,
u8 idx);
s32 host_int_del_All_Rx_BASession(struct host_if_drv *hWFIDrv,
s32 wilc_del_all_rx_ba_session(struct host_if_drv *hWFIDrv,
char *pBSSID,
char TID);
s32 host_int_remain_on_channel(struct host_if_drv *hWFIDrv,
s32 wilc_remain_on_channel(struct host_if_drv *hWFIDrv,
u32 u32SessionID,
u32 u32duration,
u16 chan,
wilc_remain_on_chan_expired RemainOnChanExpired,
wilc_remain_on_chan_ready RemainOnChanReady,
void *pvUserArg);
s32 host_int_ListenStateExpired(struct host_if_drv *hWFIDrv, u32 u32SessionID);
s32 host_int_frame_register(struct host_if_drv *hWFIDrv,
s32 wilc_listen_state_expired(struct host_if_drv *hWFIDrv, u32 u32SessionID);
s32 wilc_frame_register(struct host_if_drv *hWFIDrv,
u16 u16FrameType,
bool bReg);
int host_int_set_wfi_drv_handler(struct host_if_drv *address);
int host_int_set_operation_mode(struct host_if_drv *wfi_drv, u32 mode);
int wilc_set_wfi_drv_handler(struct host_if_drv *address);
int wilc_set_operation_mode(struct host_if_drv *wfi_drv, u32 mode);
void host_int_freeJoinParams(void *pJoinParams);
void wilc_free_join_params(void *pJoinParams);
s32 host_int_get_statistics(struct host_if_drv *hWFIDrv,
s32 wilc_get_statistics(struct host_if_drv *hWFIDrv,
struct rf_info *pstrStatistics);
void resolve_disconnect_aberration(struct host_if_drv *hif_drv);
void wilc_resolve_disconnect_aberration(struct host_if_drv *hif_drv);
#endif
......@@ -26,7 +26,7 @@ struct wilc_wfi_radiotap_cb_hdr {
static struct net_device *wilc_wfi_mon; /* global monitor netdev */
extern int mac_xmit(struct sk_buff *skb, struct net_device *dev);
extern int wilc_mac_xmit(struct sk_buff *skb, struct net_device *dev);
static u8 srcAdd[6];
......@@ -298,7 +298,7 @@ static netdev_tx_t WILC_WFI_mon_xmit(struct sk_buff *skb,
mon_mgmt_tx(mon_priv->real_ndev, skb->data, skb->len);
dev_kfree_skb(skb);
} else
ret = mac_xmit(skb, mon_priv->real_ndev);
ret = wilc_mac_xmit(skb, mon_priv->real_ndev);
return ret;
}
......
This diff is collapsed.
......@@ -41,8 +41,8 @@ enum debug_region {
int wilc_debugfs_init(void);
void wilc_debugfs_remove(void);
extern atomic_t REGION;
extern atomic_t DEBUG_LEVEL;
extern atomic_t WILC_REGION;
extern atomic_t WILC_DEBUG_LEVEL;
#define DEBUG BIT(0)
#define INFO BIT(1)
......@@ -51,8 +51,8 @@ extern atomic_t DEBUG_LEVEL;
#define PRINT_D(region, ...) \
do { \
if ((atomic_read(&DEBUG_LEVEL) & DEBUG) && \
((atomic_read(&REGION)) & (region))) { \
if ((atomic_read(&WILC_DEBUG_LEVEL) & DEBUG) && \
((atomic_read(&WILC_REGION)) & (region))) { \
printk("DBG [%s: %d]", __func__, __LINE__); \
printk(__VA_ARGS__); \
} \
......@@ -60,8 +60,8 @@ extern atomic_t DEBUG_LEVEL;
#define PRINT_INFO(region, ...) \
do { \
if ((atomic_read(&DEBUG_LEVEL) & INFO) && \
((atomic_read(&REGION)) & (region))) { \
if ((atomic_read(&WILC_DEBUG_LEVEL) & INFO) && \
((atomic_read(&WILC_REGION)) & (region))) { \
printk("INFO [%s]", __func__); \
printk(__VA_ARGS__); \
} \
......@@ -69,8 +69,8 @@ extern atomic_t DEBUG_LEVEL;
#define PRINT_WRN(region, ...) \
do { \
if ((atomic_read(&DEBUG_LEVEL) & WRN) && \
((atomic_read(&REGION)) & (region))) { \
if ((atomic_read(&WILC_DEBUG_LEVEL) & WRN) && \
((atomic_read(&WILC_REGION)) & (region))) { \
printk("WRN [%s: %d]", __func__, __LINE__); \
printk(__VA_ARGS__); \
} \
......@@ -78,7 +78,7 @@ extern atomic_t DEBUG_LEVEL;
#define PRINT_ER(...) \
do { \
if ((atomic_read(&DEBUG_LEVEL) & ERR)) { \
if ((atomic_read(&WILC_DEBUG_LEVEL) & ERR)) { \
printk("ERR [%s: %d]", __func__, __LINE__); \
printk(__VA_ARGS__); \
} \
......
......@@ -26,7 +26,7 @@ struct wilc_sdio {
struct wilc *wilc;
};
struct sdio_func *local_sdio_func;
struct sdio_func *wilc_sdio_func;
static unsigned int sdio_default_speed;
......@@ -53,9 +53,9 @@ static void wilc_sdio_interrupt(struct sdio_func *func)
#endif
int linux_sdio_cmd52(sdio_cmd52_t *cmd)
int wilc_sdio_cmd52(sdio_cmd52_t *cmd)
{
struct sdio_func *func = g_linux_wlan->wilc_sdio_func;
struct sdio_func *func = wilc_dev->wilc_sdio_func;
int ret;
u8 data;
......@@ -85,9 +85,9 @@ int linux_sdio_cmd52(sdio_cmd52_t *cmd)
}
int linux_sdio_cmd53(sdio_cmd53_t *cmd)
int wilc_sdio_cmd53(sdio_cmd53_t *cmd)
{
struct sdio_func *func = g_linux_wlan->wilc_sdio_func;
struct sdio_func *func = wilc_dev->wilc_sdio_func;
int size, ret;
sdio_claim_host(func);
......@@ -127,7 +127,7 @@ static int linux_sdio_probe(struct sdio_func *func, const struct sdio_device_id
return -ENOMEM;
PRINT_D(INIT_DBG, "Initializing netdev\n");
local_sdio_func = func;
wilc_sdio_func = func;
if (wilc_netdev_init(&wilc)) {
PRINT_ER("Couldn't initialize netdev\n");
kfree(wl_sdio);
......@@ -157,14 +157,14 @@ struct sdio_driver wilc_bus = {
.remove = linux_sdio_remove,
};
int enable_sdio_interrupt(void)
int wilc_sdio_enable_interrupt(void)
{
int ret = 0;
#ifndef WILC_SDIO_IRQ_GPIO
sdio_claim_host(local_sdio_func);
ret = sdio_claim_irq(local_sdio_func, wilc_sdio_interrupt);
sdio_release_host(local_sdio_func);
sdio_claim_host(wilc_sdio_func);
ret = sdio_claim_irq(wilc_sdio_func, wilc_sdio_interrupt);
sdio_release_host(wilc_sdio_func);
if (ret < 0) {
PRINT_ER("can't claim sdio_irq, err(%d)\n", ret);
......@@ -174,22 +174,22 @@ int enable_sdio_interrupt(void)
return ret;
}
void disable_sdio_interrupt(void)
void wilc_sdio_disable_interrupt(void)
{
#ifndef WILC_SDIO_IRQ_GPIO
int ret;
PRINT_D(INIT_DBG, "disable_sdio_interrupt IN\n");
PRINT_D(INIT_DBG, "wilc_sdio_disable_interrupt IN\n");
sdio_claim_host(local_sdio_func);
ret = sdio_release_irq(local_sdio_func);
sdio_claim_host(wilc_sdio_func);
ret = sdio_release_irq(wilc_sdio_func);
if (ret < 0) {
PRINT_ER("can't release sdio_irq, err(%d)\n", ret);
}
sdio_release_host(local_sdio_func);
sdio_release_host(wilc_sdio_func);
PRINT_D(INIT_DBG, "disable_sdio_interrupt OUT\n");
PRINT_D(INIT_DBG, "wilc_sdio_disable_interrupt OUT\n");
#endif
}
......@@ -197,13 +197,13 @@ static int linux_sdio_set_speed(int speed)
{
struct mmc_ios ios;
sdio_claim_host(local_sdio_func);
sdio_claim_host(wilc_sdio_func);
memcpy((void *)&ios, (void *)&local_sdio_func->card->host->ios, sizeof(struct mmc_ios));
local_sdio_func->card->host->ios.clock = speed;
memcpy((void *)&ios, (void *)&wilc_sdio_func->card->host->ios, sizeof(struct mmc_ios));
wilc_sdio_func->card->host->ios.clock = speed;
ios.clock = speed;
local_sdio_func->card->host->ops->set_ios(local_sdio_func->card->host, &ios);
sdio_release_host(local_sdio_func);
wilc_sdio_func->card->host->ops->set_ios(wilc_sdio_func->card->host, &ios);
sdio_release_host(wilc_sdio_func);
PRINT_INFO(INIT_DBG, "@@@@@@@@@@@@ change SDIO speed to %d @@@@@@@@@\n", speed);
return 1;
......@@ -211,10 +211,10 @@ static int linux_sdio_set_speed(int speed)
static int linux_sdio_get_speed(void)
{
return local_sdio_func->card->host->ios.clock;
return wilc_sdio_func->card->host->ios.clock;
}
int linux_sdio_init(void)
int wilc_sdio_init(void)
{
/**
......@@ -226,12 +226,12 @@ int linux_sdio_init(void)
return 1;
}
int linux_sdio_set_max_speed(void)
int wilc_sdio_set_max_speed(void)
{
return linux_sdio_set_speed(MAX_SPEED);
}
int linux_sdio_set_default_speed(void)
int wilc_sdio_set_default_speed(void)
{
return linux_sdio_set_speed(sdio_default_speed);
}
......
extern struct sdio_func *local_sdio_func;
extern struct sdio_func *wilc_sdio_func;
extern struct sdio_driver wilc_bus;
#include <linux/mmc/sdio_func.h>
int linux_sdio_init(void);
int linux_sdio_cmd52(sdio_cmd52_t *cmd);
int linux_sdio_cmd53(sdio_cmd53_t *cmd);
int enable_sdio_interrupt(void);
void disable_sdio_interrupt(void);
int linux_sdio_set_max_speed(void);
int linux_sdio_set_default_speed(void);
int wilc_sdio_init(void);
int wilc_sdio_cmd52(sdio_cmd52_t *cmd);
int wilc_sdio_cmd53(sdio_cmd53_t *cmd);
int wilc_sdio_enable_interrupt(void);
void wilc_sdio_disable_interrupt(void);
int wilc_sdio_set_max_speed(void);
int wilc_sdio_set_default_speed(void);
......@@ -79,7 +79,7 @@ struct spi_driver wilc_bus __refdata = {
.remove = __exit_p(wilc_bus_remove),
};
int linux_spi_init(void)
int wilc_spi_init(void)
{
int ret = 1;
static int called;
......@@ -102,7 +102,7 @@ int linux_spi_init(void)
#if defined(TXRX_PHASE_SIZE)
int linux_spi_write(u8 *b, u32 len)
int wilc_spi_write(u8 *b, u32 len)
{
int ret;
......@@ -179,7 +179,7 @@ int linux_spi_write(u8 *b, u32 len)
}
#else
int linux_spi_write(u8 *b, u32 len)
int wilc_spi_write(u8 *b, u32 len)
{
int ret;
......@@ -230,7 +230,7 @@ int linux_spi_write(u8 *b, u32 len)
#if defined(TXRX_PHASE_SIZE)
int linux_spi_read(u8 *rb, u32 rlen)
int wilc_spi_read(u8 *rb, u32 rlen)
{
int ret;
......@@ -304,7 +304,7 @@ int linux_spi_read(u8 *rb, u32 rlen)
}
#else
int linux_spi_read(u8 *rb, u32 rlen)
int wilc_spi_read(u8 *rb, u32 rlen)
{
int ret;
......@@ -349,7 +349,7 @@ int linux_spi_read(u8 *rb, u32 rlen)
#endif
int linux_spi_write_read(u8 *wb, u8 *rb, u32 rlen)
int wilc_spi_write_read(u8 *wb, u8 *rb, u32 rlen)
{
int ret;
......@@ -386,7 +386,7 @@ int linux_spi_write_read(u8 *wb, u8 *rb, u32 rlen)
return ret;
}
int linux_spi_set_max_speed(void)
int wilc_spi_set_max_speed(void)
{
SPEED = MAX_SPEED;
......
......@@ -5,9 +5,9 @@
extern struct spi_device *wilc_spi_dev;
extern struct spi_driver wilc_bus;
int linux_spi_init(void);
int linux_spi_write(u8 *b, u32 len);
int linux_spi_read(u8 *rb, u32 rlen);
int linux_spi_write_read(u8 *wb, u8 *rb, u32 rlen);
int linux_spi_set_max_speed(void);
int wilc_spi_init(void);
int wilc_spi_write(u8 *b, u32 len);
int wilc_spi_read(u8 *rb, u32 rlen);
int wilc_spi_write_read(u8 *wb, u8 *rb, u32 rlen);
int wilc_spi_set_max_speed(void);
#endif
......@@ -26,8 +26,8 @@ static struct dentry *wilc_dir;
#define DBG_REGION_ALL (GENERIC_DBG | HOSTAPD_DBG | HOSTINF_DBG | CORECONFIG_DBG | CFG80211_DBG | INT_DBG | TX_DBG | RX_DBG | LOCK_DBG | INIT_DBG | BUS_DBG | MEM_DBG)
#define DBG_LEVEL_ALL (DEBUG | INFO | WRN | ERR)
atomic_t REGION = ATOMIC_INIT(INIT_DBG | GENERIC_DBG | CFG80211_DBG | FIRM_DBG | HOSTAPD_DBG);
atomic_t DEBUG_LEVEL = ATOMIC_INIT(ERR);
atomic_t WILC_REGION = ATOMIC_INIT(INIT_DBG | GENERIC_DBG | CFG80211_DBG | FIRM_DBG | HOSTAPD_DBG);
atomic_t WILC_DEBUG_LEVEL = ATOMIC_INIT(ERR);
/*
* --------------------------------------------------------------------------------
......@@ -43,7 +43,7 @@ static ssize_t wilc_debug_level_read(struct file *file, char __user *userbuf, si
if (*ppos > 0)
return 0;
res = scnprintf(buf, sizeof(buf), "Debug Level: %x\n", atomic_read(&DEBUG_LEVEL));
res = scnprintf(buf, sizeof(buf), "Debug Level: %x\n", atomic_read(&WILC_DEBUG_LEVEL));
return simple_read_from_buffer(userbuf, count, ppos, buf, res);
}
......@@ -59,11 +59,11 @@ static ssize_t wilc_debug_level_write(struct file *filp, const char __user *buf,
return ret;
if (flag > DBG_LEVEL_ALL) {
printk("%s, value (0x%08x) is out of range, stay previous flag (0x%08x)\n", __func__, flag, atomic_read(&DEBUG_LEVEL));
printk("%s, value (0x%08x) is out of range, stay previous flag (0x%08x)\n", __func__, flag, atomic_read(&WILC_DEBUG_LEVEL));
return -EINVAL;
}
atomic_set(&DEBUG_LEVEL, (int)flag);
atomic_set(&WILC_DEBUG_LEVEL, (int)flag);
if (flag == 0)
printk("Debug-level disabled\n");
......@@ -82,7 +82,7 @@ static ssize_t wilc_debug_region_read(struct file *file, char __user *userbuf, s
if (*ppos > 0)
return 0;
res = scnprintf(buf, sizeof(buf), "Debug region: %x\n", atomic_read(&REGION));
res = scnprintf(buf, sizeof(buf), "Debug region: %x\n", atomic_read(&WILC_REGION));
return simple_read_from_buffer(userbuf, count, ppos, buf, res);
}
......@@ -102,12 +102,12 @@ static ssize_t wilc_debug_region_write(struct file *filp, const char *buf, size_
flag = buffer[0] - '0';
if (flag > DBG_REGION_ALL) {
printk("%s, value (0x%08x) is out of range, stay previous flag (0x%08x)\n", __func__, flag, atomic_read(&REGION));
printk("%s, value (0x%08x) is out of range, stay previous flag (0x%08x)\n", __func__, flag, atomic_read(&WILC_REGION));
return -EFAULT;
}
atomic_set(&REGION, (int)flag);
printk("new debug-region is %x\n", atomic_read(&REGION));
atomic_set(&WILC_REGION, (int)flag);
printk("new debug-region is %x\n", atomic_read(&WILC_REGION));
return count;
}
......
......@@ -48,21 +48,21 @@ static int sdio_set_func0_csa_address(u32 adr)
cmd.raw = 0;
cmd.address = 0x10c;
cmd.data = (u8)adr;
if (!linux_sdio_cmd52(&cmd)) {
if (!wilc_sdio_cmd52(&cmd)) {
g_sdio.dPrint(N_ERR, "[wilc sdio]: Failed cmd52, set 0x10c data...\n");
goto _fail_;
}
cmd.address = 0x10d;
cmd.data = (u8)(adr >> 8);
if (!linux_sdio_cmd52(&cmd)) {
if (!wilc_sdio_cmd52(&cmd)) {
g_sdio.dPrint(N_ERR, "[wilc sdio]: Failed cmd52, set 0x10d data...\n");
goto _fail_;
}
cmd.address = 0x10e;
cmd.data = (u8)(adr >> 16);
if (!linux_sdio_cmd52(&cmd)) {
if (!wilc_sdio_cmd52(&cmd)) {
g_sdio.dPrint(N_ERR, "[wilc sdio]: Failed cmd52, set 0x10e data...\n");
goto _fail_;
}
......@@ -81,14 +81,14 @@ static int sdio_set_func0_block_size(u32 block_size)
cmd.raw = 0;
cmd.address = 0x10;
cmd.data = (u8)block_size;
if (!linux_sdio_cmd52(&cmd)) {
if (!wilc_sdio_cmd52(&cmd)) {
g_sdio.dPrint(N_ERR, "[wilc sdio]: Failed cmd52, set 0x10 data...\n");
goto _fail_;
}
cmd.address = 0x11;
cmd.data = (u8)(block_size >> 8);
if (!linux_sdio_cmd52(&cmd)) {
if (!wilc_sdio_cmd52(&cmd)) {
g_sdio.dPrint(N_ERR, "[wilc sdio]: Failed cmd52, set 0x11 data...\n");
goto _fail_;
}
......@@ -113,13 +113,13 @@ static int sdio_set_func1_block_size(u32 block_size)
cmd.raw = 0;
cmd.address = 0x110;
cmd.data = (u8)block_size;
if (!linux_sdio_cmd52(&cmd)) {
if (!wilc_sdio_cmd52(&cmd)) {
g_sdio.dPrint(N_ERR, "[wilc sdio]: Failed cmd52, set 0x110 data...\n");
goto _fail_;
}
cmd.address = 0x111;
cmd.data = (u8)(block_size >> 8);
if (!linux_sdio_cmd52(&cmd)) {
if (!wilc_sdio_cmd52(&cmd)) {
g_sdio.dPrint(N_ERR, "[wilc sdio]: Failed cmd52, set 0x111 data...\n");
goto _fail_;
}
......@@ -140,7 +140,7 @@ static int sdio_clear_int(void)
cmd.raw = 0;
cmd.address = 0x4;
cmd.data = 0;
linux_sdio_cmd52(&cmd);
wilc_sdio_cmd52(&cmd);
return cmd.data;
#else
......@@ -176,7 +176,7 @@ static int sdio_write_reg(u32 addr, u32 data)
cmd.raw = 0;
cmd.address = addr;
cmd.data = data;
if (!linux_sdio_cmd52(&cmd)) {
if (!wilc_sdio_cmd52(&cmd)) {
g_sdio.dPrint(N_ERR, "[wilc sdio]: Failed cmd 52, read reg (%08x) ...\n", addr);
goto _fail_;
}
......@@ -198,7 +198,7 @@ static int sdio_write_reg(u32 addr, u32 data)
cmd.buffer = (u8 *)&data;
cmd.block_size = g_sdio.block_size; /* johnny : prevent it from setting unexpected value */
if (!linux_sdio_cmd53(&cmd)) {
if (!wilc_sdio_cmd53(&cmd)) {
g_sdio.dPrint(N_ERR, "[wilc sdio]: Failed cmd53, write reg (%08x)...\n", addr);
goto _fail_;
}
......@@ -261,7 +261,7 @@ static int sdio_write(u32 addr, u8 *buf, u32 size)
if (!sdio_set_func0_csa_address(addr))
goto _fail_;
}
if (!linux_sdio_cmd53(&cmd)) {
if (!wilc_sdio_cmd53(&cmd)) {
g_sdio.dPrint(N_ERR, "[wilc sdio]: Failed cmd53 [%x], block send...\n", addr);
goto _fail_;
}
......@@ -282,7 +282,7 @@ static int sdio_write(u32 addr, u8 *buf, u32 size)
if (!sdio_set_func0_csa_address(addr))
goto _fail_;
}
if (!linux_sdio_cmd53(&cmd)) {
if (!wilc_sdio_cmd53(&cmd)) {
g_sdio.dPrint(N_ERR, "[wilc sdio]: Failed cmd53 [%x], bytes send...\n", addr);
goto _fail_;
}
......@@ -304,7 +304,7 @@ static int sdio_read_reg(u32 addr, u32 *data)
cmd.function = 0;
cmd.raw = 0;
cmd.address = addr;
if (!linux_sdio_cmd52(&cmd)) {
if (!wilc_sdio_cmd52(&cmd)) {
g_sdio.dPrint(N_ERR, "[wilc sdio]: Failed cmd 52, read reg (%08x) ...\n", addr);
goto _fail_;
}
......@@ -325,7 +325,7 @@ static int sdio_read_reg(u32 addr, u32 *data)
cmd.block_size = g_sdio.block_size; /* johnny : prevent it from setting unexpected value */
if (!linux_sdio_cmd53(&cmd)) {
if (!wilc_sdio_cmd53(&cmd)) {
g_sdio.dPrint(N_ERR, "[wilc sdio]: Failed cmd53, read reg (%08x)...\n", addr);
goto _fail_;
}
......@@ -392,7 +392,7 @@ static int sdio_read(u32 addr, u8 *buf, u32 size)
if (!sdio_set_func0_csa_address(addr))
goto _fail_;
}
if (!linux_sdio_cmd53(&cmd)) {
if (!wilc_sdio_cmd53(&cmd)) {
g_sdio.dPrint(N_ERR, "[wilc sdio]: Failed cmd53 [%x], block read...\n", addr);
goto _fail_;
}
......@@ -413,7 +413,7 @@ static int sdio_read(u32 addr, u8 *buf, u32 size)
if (!sdio_set_func0_csa_address(addr))
goto _fail_;
}
if (!linux_sdio_cmd53(&cmd)) {
if (!wilc_sdio_cmd53(&cmd)) {
g_sdio.dPrint(N_ERR, "[wilc sdio]: Failed cmd53 [%x], bytes read...\n", addr);
goto _fail_;
}
......@@ -505,7 +505,7 @@ static int sdio_init(struct wilc *wilc, wilc_debug_func func)
g_sdio.dPrint = func;
if (!linux_sdio_init()) {
if (!wilc_sdio_init()) {
g_sdio.dPrint(N_ERR, "[wilc sdio]: Failed io init bus...\n");
return 0;
} else {
......@@ -520,7 +520,7 @@ static int sdio_init(struct wilc *wilc, wilc_debug_func func)
cmd.raw = 1;
cmd.address = 0x100;
cmd.data = 0x80;
if (!linux_sdio_cmd52(&cmd)) {
if (!wilc_sdio_cmd52(&cmd)) {
g_sdio.dPrint(N_ERR, "[wilc sdio]: Fail cmd 52, enable csa...\n");
goto _fail_;
}
......@@ -542,7 +542,7 @@ static int sdio_init(struct wilc *wilc, wilc_debug_func func)
cmd.raw = 1;
cmd.address = 0x2;
cmd.data = 0x2;
if (!linux_sdio_cmd52(&cmd)) {
if (!wilc_sdio_cmd52(&cmd)) {
g_sdio.dPrint(N_ERR, "[wilc sdio] Fail cmd 52, set IOE register...\n");
goto _fail_;
}
......@@ -557,7 +557,7 @@ static int sdio_init(struct wilc *wilc, wilc_debug_func func)
loop = 3;
do {
cmd.data = 0;
if (!linux_sdio_cmd52(&cmd)) {
if (!wilc_sdio_cmd52(&cmd)) {
g_sdio.dPrint(N_ERR, "[wilc sdio]: Fail cmd 52, get IOR register...\n");
goto _fail_;
}
......@@ -586,7 +586,7 @@ static int sdio_init(struct wilc *wilc, wilc_debug_func func)
cmd.raw = 1;
cmd.address = 0x4;
cmd.data = 0x3;
if (!linux_sdio_cmd52(&cmd)) {
if (!wilc_sdio_cmd52(&cmd)) {
g_sdio.dPrint(N_ERR, "[wilc sdio]: Fail cmd 52, set IEN register...\n");
goto _fail_;
}
......@@ -614,12 +614,12 @@ static int sdio_init(struct wilc *wilc, wilc_debug_func func)
static void sdio_set_max_speed(void)
{
linux_sdio_set_max_speed();
wilc_sdio_set_max_speed();
}
static void sdio_set_default_speed(void)
{
linux_sdio_set_default_speed();
wilc_sdio_set_default_speed();
}
static int sdio_read_size(u32 *size)
......@@ -636,7 +636,7 @@ static int sdio_read_size(u32 *size)
cmd.raw = 0;
cmd.address = 0xf2;
cmd.data = 0;
linux_sdio_cmd52(&cmd);
wilc_sdio_cmd52(&cmd);
tmp = cmd.data;
/* cmd.read_write = 0; */
......@@ -644,7 +644,7 @@ static int sdio_read_size(u32 *size)
/* cmd.raw = 0; */
cmd.address = 0xf3;
cmd.data = 0;
linux_sdio_cmd52(&cmd);
wilc_sdio_cmd52(&cmd);
tmp |= (cmd.data << 8);
*size = tmp;
......@@ -666,7 +666,7 @@ static int sdio_read_int(u32 *int_status)
cmd.function = 1;
cmd.address = 0x04;
cmd.data = 0;
linux_sdio_cmd52(&cmd);
wilc_sdio_cmd52(&cmd);
if (cmd.data & BIT(0))
tmp |= INT_0;
......@@ -699,7 +699,7 @@ static int sdio_read_int(u32 *int_status)
cmd.raw = 0;
cmd.address = 0xf7;
cmd.data = 0;
linux_sdio_cmd52(&cmd);
wilc_sdio_cmd52(&cmd);
irq_flags = cmd.data & 0x1f;
tmp |= ((irq_flags >> 0) << IRG_FLAGS_OFFSET);
}
......@@ -746,7 +746,7 @@ static int sdio_clear_int_ext(u32 val)
cmd.address = 0xf8;
cmd.data = reg;
ret = linux_sdio_cmd52(&cmd);
ret = wilc_sdio_cmd52(&cmd);
if (!ret) {
g_sdio.dPrint(N_ERR, "[wilc sdio]: Failed cmd52, set 0xf8 data (%d) ...\n", __LINE__);
goto _fail_;
......@@ -775,7 +775,7 @@ static int sdio_clear_int_ext(u32 val)
cmd.address = 0xf8;
cmd.data = BIT(i);
ret = linux_sdio_cmd52(&cmd);
ret = wilc_sdio_cmd52(&cmd);
if (!ret) {
g_sdio.dPrint(N_ERR, "[wilc sdio]: Failed cmd52, set 0xf8 data (%d) ...\n", __LINE__);
goto _fail_;
......@@ -819,7 +819,7 @@ static int sdio_clear_int_ext(u32 val)
cmd.raw = 0;
cmd.address = 0xf6;
cmd.data = vmm_ctl;
ret = linux_sdio_cmd52(&cmd);
ret = wilc_sdio_cmd52(&cmd);
if (!ret) {
g_sdio.dPrint(N_ERR, "[wilc sdio]: Failed cmd52, set 0xf6 data (%d) ...\n", __LINE__);
goto _fail_;
......@@ -925,7 +925,7 @@ static int sdio_sync_ext(int nint /* how mant interrupts to enable. */)
*
********************************************/
struct wilc_hif_func hif_sdio = {
struct wilc_hif_func wilc_hif_sdio = {
sdio_init,
sdio_deinit,
sdio_read_reg,
......
......@@ -22,8 +22,8 @@ typedef struct {
static wilc_spi_t g_spi;
static int wilc_spi_read(u32, u8 *, u32);
static int wilc_spi_write(u32, u8 *, u32);
static int _wilc_spi_read(u32, u8 *, u32);
static int _wilc_spi_write(u32, u8 *, u32);
/********************************************
*
......@@ -249,7 +249,7 @@ static int spi_cmd_complete(u8 cmd, u32 adr, u8 *b, u32 sz, u8 clockless)
}
rix = len;
if (!linux_spi_write_read(wb, rb, len2)) {
if (!wilc_spi_write_read(wb, rb, len2)) {
PRINT_ER("[wilc spi]: Failed cmd write, bus error...\n");
result = N_FAIL;
return result;
......@@ -364,7 +364,7 @@ static int spi_cmd_complete(u8 cmd, u32 adr, u8 *b, u32 sz, u8 clockless)
/**
* Read bytes
**/
if (!linux_spi_read(&b[ix], nbytes)) {
if (!wilc_spi_read(&b[ix], nbytes)) {
PRINT_ER("[wilc spi]: Failed data block read, bus error...\n");
result = N_FAIL;
goto _error_;
......@@ -374,7 +374,7 @@ static int spi_cmd_complete(u8 cmd, u32 adr, u8 *b, u32 sz, u8 clockless)
* Read Crc
**/
if (!g_spi.crc_off) {
if (!linux_spi_read(crc, 2)) {
if (!wilc_spi_read(crc, 2)) {
PRINT_ER("[wilc spi]: Failed data block crc read, bus error...\n");
result = N_FAIL;
goto _error_;
......@@ -405,7 +405,7 @@ static int spi_cmd_complete(u8 cmd, u32 adr, u8 *b, u32 sz, u8 clockless)
**/
retry = 10;
do {
if (!linux_spi_read(&rsp, 1)) {
if (!wilc_spi_read(&rsp, 1)) {
PRINT_ER("[wilc spi]: Failed data response read, bus error...\n");
result = N_FAIL;
break;
......@@ -421,7 +421,7 @@ static int spi_cmd_complete(u8 cmd, u32 adr, u8 *b, u32 sz, u8 clockless)
/**
* Read bytes
**/
if (!linux_spi_read(&b[ix], nbytes)) {
if (!wilc_spi_read(&b[ix], nbytes)) {
PRINT_ER("[wilc spi]: Failed data block read, bus error...\n");
result = N_FAIL;
break;
......@@ -431,7 +431,7 @@ static int spi_cmd_complete(u8 cmd, u32 adr, u8 *b, u32 sz, u8 clockless)
* Read Crc
**/
if (!g_spi.crc_off) {
if (!linux_spi_read(crc, 2)) {
if (!wilc_spi_read(crc, 2)) {
PRINT_ER("[wilc spi]: Failed data block crc read, bus error...\n");
result = N_FAIL;
break;
......@@ -481,7 +481,7 @@ static int spi_data_write(u8 *b, u32 sz)
order = 0x2;
}
cmd |= order;
if (!linux_spi_write(&cmd, 1)) {
if (!wilc_spi_write(&cmd, 1)) {
PRINT_ER("[wilc spi]: Failed data block cmd write, bus error...\n");
result = N_FAIL;
break;
......@@ -490,7 +490,7 @@ static int spi_data_write(u8 *b, u32 sz)
/**
* Write data
**/
if (!linux_spi_write(&b[ix], nbytes)) {
if (!wilc_spi_write(&b[ix], nbytes)) {
PRINT_ER("[wilc spi]: Failed data block write, bus error...\n");
result = N_FAIL;
break;
......@@ -500,7 +500,7 @@ static int spi_data_write(u8 *b, u32 sz)
* Write Crc
**/
if (!g_spi.crc_off) {
if (!linux_spi_write(crc, 2)) {
if (!wilc_spi_write(crc, 2)) {
PRINT_ER("[wilc spi]: Failed data block crc write, bus error...\n");
result = N_FAIL;
break;
......@@ -585,7 +585,7 @@ static int wilc_spi_write_reg(u32 addr, u32 data)
return result;
}
static int wilc_spi_write(u32 addr, u8 *buf, u32 size)
static int _wilc_spi_write(u32 addr, u8 *buf, u32 size)
{
int result;
u8 cmd = CMD_DMA_EXT_WRITE;
......@@ -639,7 +639,7 @@ static int wilc_spi_read_reg(u32 addr, u32 *data)
return 1;
}
static int wilc_spi_read(u32 addr, u8 *buf, u32 size)
static int _wilc_spi_read(u32 addr, u8 *buf, u32 size)
{
u8 cmd = CMD_DMA_EXT_READ;
int result;
......@@ -675,7 +675,7 @@ static int wilc_spi_clear_int(void)
return 1;
}
static int wilc_spi_deinit(void *pv)
static int _wilc_spi_deinit(void *pv)
{
/**
* TODO:
......@@ -721,7 +721,7 @@ static int wilc_spi_sync(void)
return 1;
}
static int wilc_spi_init(struct wilc *wilc, wilc_debug_func func)
static int _wilc_spi_init(struct wilc *wilc, wilc_debug_func func)
{
u32 reg;
u32 chipid;
......@@ -740,7 +740,7 @@ static int wilc_spi_init(struct wilc *wilc, wilc_debug_func func)
memset(&g_spi, 0, sizeof(wilc_spi_t));
g_spi.dPrint = func;
if (!linux_spi_init()) {
if (!wilc_spi_init()) {
PRINT_ER("[wilc spi]: Failed io init bus...\n");
return 0;
} else {
......@@ -795,7 +795,7 @@ static int wilc_spi_init(struct wilc *wilc, wilc_debug_func func)
static void wilc_spi_max_bus_speed(void)
{
linux_spi_set_max_speed();
wilc_spi_set_max_speed();
}
static void wilc_spi_default_bus_speed(void)
......@@ -1021,20 +1021,20 @@ static int wilc_spi_sync_ext(int nint /* how mant interrupts to enable. */)
* Global spi HIF function table
*
********************************************/
struct wilc_hif_func hif_spi = {
wilc_spi_init,
wilc_spi_deinit,
struct wilc_hif_func wilc_hif_spi = {
_wilc_spi_init,
_wilc_spi_deinit,
wilc_spi_read_reg,
wilc_spi_write_reg,
wilc_spi_read,
wilc_spi_write,
_wilc_spi_read,
_wilc_spi_write,
wilc_spi_sync,
wilc_spi_clear_int,
wilc_spi_read_int,
wilc_spi_clear_int_ext,
wilc_spi_read_size,
wilc_spi_write,
wilc_spi_read,
_wilc_spi_write,
_wilc_spi_read,
wilc_spi_sync_ext,
wilc_spi_max_bus_speed,
wilc_spi_default_bus_speed,
......
......@@ -103,6 +103,6 @@ void wilc_mgmt_frame_register(struct wiphy *wiphy, struct wireless_dev *wdev,
#define TCP_ACK_FILTER_LINK_SPEED_THRESH 54
#define DEFAULT_LINK_SPEED 72
void enable_tcp_ack_filter(bool value);
void wilc_enable_tcp_ack_filter(bool value);
#endif
......@@ -206,7 +206,7 @@ struct WILC_WFI_mon_priv {
struct net_device *real_ndev;
};
extern struct wilc *g_linux_wlan;
extern struct wilc *wilc_dev;
extern struct net_device *WILC_WFI_devs[];
void frmw_to_linux(struct wilc *wilc, u8 *buff, u32 size, u32 pkt_offset);
void linux_wlan_mac_indicate(struct wilc *wilc, int flag);
......@@ -217,7 +217,7 @@ void wl_wlan_cleanup(struct wilc *wilc);
int wilc_netdev_init(struct wilc **wilc);
void wilc1000_wlan_deinit(struct net_device *dev);
void WILC_WFI_mgmt_rx(struct wilc *wilc, u8 *buff, u32 size);
u16 set_machw_change_vir_if(struct net_device *dev, bool value);
int linux_wlan_get_firmware(struct net_device *dev);
int linux_wlan_set_bssid(struct net_device *wilc_netdev, u8 *bssid);
u16 wilc_set_machw_change_vir_if(struct net_device *dev, bool value);
int wilc_wlan_get_firmware(struct net_device *dev);
int wilc_wlan_set_bssid(struct net_device *wilc_netdev, u8 *bssid);
#endif
......@@ -3,9 +3,9 @@
#include "wilc_wlan_cfg.h"
#ifdef WILC_SDIO
extern struct wilc_hif_func hif_sdio;
extern struct wilc_hif_func wilc_hif_sdio;
#else
extern struct wilc_hif_func hif_spi;
extern struct wilc_hif_func wilc_hif_spi;
#endif
u32 wilc_get_chipid(u8 update);
......@@ -64,7 +64,7 @@ static CHIP_PS_STATE_T chip_ps_state = CHIP_WAKEDUP;
static inline void acquire_bus(BUS_ACQUIRE_T acquire)
{
mutex_lock(&g_linux_wlan->hif_cs);
mutex_lock(&wilc_dev->hif_cs);
#ifndef WILC_OPTIMIZE_SLEEP_INT
if (chip_ps_state != CHIP_WAKEDUP)
#endif
......@@ -80,7 +80,7 @@ static inline void release_bus(BUS_RELEASE_T release)
if (release == RELEASE_ALLOW_SLEEP)
chip_allow_sleep();
#endif
mutex_unlock(&g_linux_wlan->hif_cs);
mutex_unlock(&wilc_dev->hif_cs);
}
#ifdef TCP_ACK_FILTER
......@@ -169,11 +169,11 @@ static int wilc_wlan_txq_add_to_head(struct txq_entry_t *tqe)
{
wilc_wlan_dev_t *p = &g_wlan;
unsigned long flags;
if (linux_wlan_lock_timeout(&g_linux_wlan->txq_add_to_head_cs,
if (linux_wlan_lock_timeout(&wilc_dev->txq_add_to_head_cs,
CFG_PKTS_TIMEOUT))
return -1;
spin_lock_irqsave(&g_linux_wlan->txq_spinlock, flags);
spin_lock_irqsave(&wilc_dev->txq_spinlock, flags);
if (!p->txq_head) {
tqe->next = NULL;
......@@ -189,9 +189,9 @@ static int wilc_wlan_txq_add_to_head(struct txq_entry_t *tqe)
p->txq_entries += 1;
PRINT_D(TX_DBG, "Number of entries in TxQ = %d\n", p->txq_entries);
spin_unlock_irqrestore(&g_linux_wlan->txq_spinlock, flags);
up(&g_linux_wlan->txq_add_to_head_cs);
up(&g_linux_wlan->txq_event);
spin_unlock_irqrestore(&wilc_dev->txq_spinlock, flags);
up(&wilc_dev->txq_add_to_head_cs);
up(&wilc_dev->txq_event);
PRINT_D(TX_DBG, "Wake up the txq_handler\n");
return 0;
......@@ -266,9 +266,9 @@ static inline int remove_TCP_related(void)
wilc_wlan_dev_t *p = &g_wlan;
unsigned long flags;
spin_lock_irqsave(&g_linux_wlan->txq_spinlock, flags);
spin_lock_irqsave(&wilc_dev->txq_spinlock, flags);
spin_unlock_irqrestore(&g_linux_wlan->txq_spinlock, flags);
spin_unlock_irqrestore(&wilc_dev->txq_spinlock, flags);
return 0;
}
......@@ -393,7 +393,7 @@ static int wilc_wlan_txq_filter_dup_tcp_ack(struct net_device *dev)
static bool enabled = false;
void enable_tcp_ack_filter(bool value)
void wilc_enable_tcp_ack_filter(bool value)
{
enabled = value;
}
......@@ -413,7 +413,7 @@ static int wilc_wlan_txq_add_cfg_pkt(u8 *buffer, u32 buffer_size)
PRINT_D(TX_DBG, "Adding config packet ...\n");
if (p->quit) {
PRINT_D(TX_DBG, "Return due to clear function\n");
up(&g_linux_wlan->cfg_event);
up(&wilc_dev->cfg_event);
return 0;
}
......@@ -684,7 +684,7 @@ static inline void chip_wakeup(void)
chip_ps_state = CHIP_WAKEDUP;
}
#endif
void chip_sleep_manually(void)
void wilc_chip_sleep_manually(void)
{
if (chip_ps_state != CHIP_WAKEDUP)
return;
......@@ -1520,7 +1520,7 @@ int wilc_wlan_cfg_set(int start, u32 wid, u8 *buffer, u32 buffer_size,
if (wilc_wlan_cfg_commit(WILC_CFG_SET, drv_handler))
ret_size = 0;
if (linux_wlan_lock_timeout(&g_linux_wlan->cfg_event,
if (linux_wlan_lock_timeout(&wilc_dev->cfg_event,
CFG_PKTS_TIMEOUT)) {
PRINT_D(TX_DBG, "Set Timed Out\n");
ret_size = 0;
......@@ -1556,7 +1556,7 @@ int wilc_wlan_cfg_get(int start, u32 wid, int commit, u32 drv_handler)
if (wilc_wlan_cfg_commit(WILC_CFG_QUERY, drv_handler))
ret_size = 0;
if (linux_wlan_lock_timeout(&g_linux_wlan->cfg_event,
if (linux_wlan_lock_timeout(&wilc_dev->cfg_event,
CFG_PKTS_TIMEOUT)) {
PRINT_D(TX_DBG, "Get Timed Out\n");
ret_size = 0;
......@@ -1670,18 +1670,18 @@ int wilc_wlan_init(struct net_device *dev, wilc_wlan_inp_t *inp)
sizeof(wilc_wlan_io_func_t));
#ifdef WILC_SDIO
if (!hif_sdio.hif_init(wilc, wilc_debug)) {
if (!wilc_hif_sdio.hif_init(wilc, wilc_debug)) {
ret = -EIO;
goto _fail_;
}
memcpy((void *)&g_wlan.hif_func, &hif_sdio,
memcpy((void *)&g_wlan.hif_func, &wilc_hif_sdio,
sizeof(struct wilc_hif_func));
#else
if (!hif_spi.hif_init(wilc, wilc_debug)) {
if (!wilc_hif_spi.hif_init(wilc, wilc_debug)) {
ret = -EIO;
goto _fail_;
}
memcpy((void *)&g_wlan.hif_func, &hif_spi,
memcpy((void *)&g_wlan.hif_func, &wilc_hif_spi,
sizeof(struct wilc_hif_func));
#endif
......@@ -1733,7 +1733,7 @@ int wilc_wlan_init(struct net_device *dev, wilc_wlan_inp_t *inp)
return ret;
}
u16 set_machw_change_vir_if(struct net_device *dev, bool value)
u16 wilc_set_machw_change_vir_if(struct net_device *dev, bool value)
{
u16 ret;
u32 reg;
......
......@@ -290,5 +290,5 @@ int wilc_wlan_cfg_get(int start, u32 wid, int commit, u32 drv_handler);
int wilc_wlan_cfg_get_val(u32 wid, u8 *buffer, u32 buffer_size);
int wilc_wlan_txq_add_mgmt_pkt(struct net_device *dev, void *priv, u8 *buffer,
u32 buffer_size, wilc_tx_complete_func_t func);
void chip_sleep_manually(void);
void wilc_chip_sleep_manually(void);
#endif
......@@ -532,17 +532,17 @@ int wilc_wlan_cfg_indicate_rx(u8 *frame, int size, struct wilc_cfg_rsp *rsp)
rsp->seq_no = msg_id;
/*call host interface info parse as well*/
PRINT_INFO(RX_DBG, "Info message received\n");
GnrlAsyncInfoReceived(frame - 4, size + 4);
wilc_gnrl_async_info_received(frame - 4, size + 4);
break;
case 'N':
NetworkInfoReceived(frame - 4, size + 4);
wilc_network_info_received(frame - 4, size + 4);
rsp->type = 0;
break;
case 'S':
PRINT_INFO(RX_DBG, "Scan Notification Received\n");
host_int_ScanCompleteReceived(frame - 4, size + 4);
wilc_scan_complete_received(frame - 4, size + 4);
break;
default:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment