PRINT_D(RX_DBG, "RX completed\n");
}
-int linux_wlan_get_firmware(perInterface_wlan_t *p_nic)
+int linux_wlan_get_firmware(struct net_device *dev)
{
-
- perInterface_wlan_t *nic = p_nic;
+ perInterface_wlan_t *nic;
+ struct wilc *wilc;
int ret = 0;
const struct firmware *wilc_firmware;
char *firmware;
+ nic = netdev_priv(dev);
+ wilc = nic->wilc;
+
if (nic->iftype == AP_MODE)
firmware = AP_FIRMWARE;
else if (nic->iftype == STATION_MODE)
* root file system with the name specified above */
#ifdef WILC_SDIO
- if (request_firmware(&wilc_firmware, firmware, &g_linux_wlan->wilc_sdio_func->dev) != 0) {
+ if (request_firmware(&wilc_firmware, firmware, &wilc->wilc_sdio_func->dev) != 0) {
PRINT_ER("%s - firmare not available\n", firmware);
ret = -1;
goto _fail_;
}
#else
- if (request_firmware(&wilc_firmware, firmware, &g_linux_wlan->wilc_spidev->dev) != 0) {
+ if (request_firmware(&wilc_firmware, firmware, &wilc->wilc_spidev->dev) != 0) {
PRINT_ER("%s - firmare not available\n", firmware);
ret = -1;
goto _fail_;
}
#endif
- g_linux_wlan->firmware = wilc_firmware;
+ wilc->firmware = wilc_firmware;
_fail_:
}
#endif
- if (linux_wlan_get_firmware(nic)) {
+ if (linux_wlan_get_firmware(dev)) {
PRINT_ER("Can't get firmware\n");
ret = -EIO;
goto _fail_irq_enable_;
#define IS_MGMT_STATUS_SUCCES 0x040
#define GET_PKT_OFFSET(a) (((a) >> 22) & 0x1ff)
-extern int linux_wlan_get_firmware(perInterface_wlan_t *p_nic);
-
extern int mac_open(struct net_device *ndev);
extern int mac_close(struct net_device *ndev);
PRINT_D(CORECONFIG_DBG, "priv->hWILCWFIDrv[%p]\n", priv->hWILCWFIDrv);
PRINT_D(HOSTAPD_DBG, "Downloading AP firmware\n");
- linux_wlan_get_firmware(nic);
+ linux_wlan_get_firmware(dev);
/*If wilc is running, then close-open to actually get new firmware running (serves P2P)*/
if (wl->initialized) {
nic->iftype = AP_MODE;
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 bValue);
+int linux_wlan_get_firmware(struct net_device *dev);
#endif