{
s32 counter = 0, ret = 0;
- if (gpstrWlanOps == NULL) {
- PRINT_D(CORECONFIG_DBG, "Net Dev is still not initialized\n");
- return 1;
- } else {
- PRINT_D(CORECONFIG_DBG, "Net Dev is initialized\n");
- }
if (u8Mode == GET_CFG) {
for (counter = 0; counter < u32WIDsCount; counter++) {
PRINT_INFO(CORECONFIG_DBG, "Sending CFG packet [%d][%d]\n", !counter,
mgmt_tx->size = len;
memcpy(mgmt_tx->buff, buf, len);
- g_linux_wlan->oup.wlan_add_mgmt_to_tx_que(mgmt_tx, mgmt_tx->buff, mgmt_tx->size, mgmt_tx_complete);
+ wilc_wlan_txq_add_mgmt_pkt(mgmt_tx, mgmt_tx->buff, mgmt_tx->size,
+ mgmt_tx_complete);
netif_wake_queue(dev);
return 0;
* and this data should be pointer to net device
*/
linux_wlan_t *g_linux_wlan;
-wilc_wlan_oup_t *gpstrWlanOps;
bool bEnablePS = true;
static const struct net_device_ops wilc_netdev_ops = {
#define READY_CHECK_THRESHOLD 30
extern void wilc_wlan_global_reset(void);
-u8 wilc1000_prepare_11b_core(wilc_wlan_inp_t *nwi, wilc_wlan_oup_t *nwo, linux_wlan_t *nic)
+u8 wilc1000_prepare_11b_core(wilc_wlan_inp_t *nwi, linux_wlan_t *nic)
{
u8 trials = 0;
probe = 0;
g_linux_wlan->wilc_sdio_func = local_sdio_func;
linux_to_wlan(nwi, nic);
- wilc_wlan_init(nwi, nwo);
+ wilc_wlan_init(nwi);
}
if (READY_CHECK_THRESHOLD <= trials)
{
int ret = 0;
wilc_wlan_inp_t nwi;
- wilc_wlan_oup_t nwo;
sdio_unregister_driver(&wilc_bus);
probe = 0;
g_linux_wlan->wilc_sdio_func = local_sdio_func;
linux_to_wlan(&nwi, g_linux_wlan);
- ret = wilc_wlan_init(&nwi, &nwo);
+ ret = wilc_wlan_init(&nwi);
g_linux_wlan->mac_status = WILC_MAC_STATUS_INIT;
#if (defined WILC_SDIO) && (!defined WILC_SDIO_IRQ_GPIO)
int wilc1000_wlan_init(struct net_device *dev, perInterface_wlan_t *p_nic)
{
wilc_wlan_inp_t nwi;
- wilc_wlan_oup_t nwo;
perInterface_wlan_t *nic = p_nic;
int ret = 0;
linux_to_wlan(&nwi, g_linux_wlan);
- ret = wilc_wlan_init(&nwi, &nwo);
+ ret = wilc_wlan_init(&nwi);
if (ret < 0) {
PRINT_ER("Initializing WILC_Wlan FAILED\n");
ret = -EIO;
goto _fail_locks_;
}
- memcpy(&g_linux_wlan->oup, &nwo, sizeof(wilc_wlan_oup_t));
-
- /*Save the oup structre into global pointer*/
- gpstrWlanOps = &g_linux_wlan->oup;
ret = wlan_initialize_threads(nic);
if (ret < 0) {
}
#if (defined WILC_SDIO) && (defined COMPLEMENT_BOOT)
- if (wilc1000_prepare_11b_core(&nwi, &nwo, g_linux_wlan)) {
+ if (wilc1000_prepare_11b_core(&nwi, g_linux_wlan)) {
PRINT_ER("11b Core is not ready\n");
ret = -EIO;
goto _fail_threads_;
}
- g_linux_wlan->oup.wlan_add_mgmt_to_tx_que(mgmt_tx, mgmt_tx->buff, mgmt_tx->size, WILC_WFI_mgmt_tx_complete);
+ wilc_wlan_txq_add_mgmt_pkt(mgmt_tx, mgmt_tx->buff,
+ mgmt_tx->size,
+ WILC_WFI_mgmt_tx_complete);
} else {
PRINT_D(GENERIC_DBG, "This function transmits only management frames\n");
}
#if (!defined WILC_SDIO) || (defined WILC_SDIO_IRQ_GPIO)
unsigned short dev_irq_num;
#endif
- wilc_wlan_oup_t oup;
int close;
u8 u8NoIfcs;
tstrInterfaceInfo strInterfaceInfo[NUM_CONCURRENT_IFC];
}
#endif
-int wilc_wlan_init(wilc_wlan_inp_t *inp, wilc_wlan_oup_t *oup)
+int wilc_wlan_init(wilc_wlan_inp_t *inp)
{
int ret = 0;
}
#endif
- /**
- * export functions
- **/
- oup->wlan_add_mgmt_to_tx_que = wilc_wlan_txq_add_mgmt_pkt;
-
if (!init_chip()) {
/* EIO 5 */
ret = -5;
int commit, u32 drvHandler);
int wilc_wlan_cfg_get(int start, u32 wid, int commit, u32 drvHandler);
int wilc_wlan_cfg_get_val(u32 wid, u8 *buffer, u32 buffer_size);
+int wilc_wlan_txq_add_mgmt_pkt(void *priv, u8 *buffer, u32 buffer_size,
+ wilc_tx_complete_func_t func);
#endif
#define WILC_TX_ERR_NO_BUF (-2)
-typedef struct {
- int (*wlan_add_mgmt_to_tx_que)(void *, u8 *, u32,
- wilc_tx_complete_func_t);
-} wilc_wlan_oup_t;
-
/********************************************
*
* Wlan Configuration ID
WID_MAX = 0xFFFF
} WID_T;
-int wilc_wlan_init(wilc_wlan_inp_t *inp, wilc_wlan_oup_t *oup);
+int wilc_wlan_init(wilc_wlan_inp_t *inp);
void wilc_bus_set_max_speed(void);
void wilc_bus_set_default_speed(void);
u32 wilc_get_chipid(u8 update);
-extern wilc_wlan_oup_t *gpstrWlanOps;
#endif