mirror of
https://github.com/nxp-imx/mwifiex.git
synced 2026-11-20 18:39:49 -05:00
mxm_wifiex: fix build error on L6.14 kernel next tree
When build wifi driver based on L6.14 kernel next tree, will observe the
following build error. This is caused by the upstream patch:
f835bdae7167 ("net: remove init_dummy_netdev()").
Need to change corresponding API here to avoid the build break.
Build error logs:
mlinux/moal_main.c: In function 'woal_add_card':
mlinux/moal_main.c:13469:17: error: implicit declaration of function 'init_dummy_netdev' [-Wimplicit-function-declaration]
13469 | init_dummy_netdev(&handle->napi_dev);
Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
This commit is contained in:
parent
3383eb3ec9
commit
0ea4f2ff50
2 changed files with 14 additions and 1 deletions
|
|
@ -13466,11 +13466,20 @@ moal_handle *woal_add_card(void *card, struct device *dev, moal_if_ops *if_ops,
|
|||
|
||||
#define NAPI_BUDGET 64
|
||||
if (moal_extflg_isset(handle, EXT_NAPI)) {
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 14, 0)
|
||||
handle->napi_dev = alloc_netdev_dummy(0);
|
||||
if (!handle->napi_dev) {
|
||||
PRINTM(MERROR, "%s: Failed to allocate woal dummy netdev\n", __func__);
|
||||
goto err_kmalloc;
|
||||
}
|
||||
netif_napi_add(handle->napi_dev, &handle->napi_rx,
|
||||
woal_netdev_poll_rx);
|
||||
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)
|
||||
init_dummy_netdev(&handle->napi_dev);
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)
|
||||
netif_napi_add(&handle->napi_dev, &handle->napi_rx,
|
||||
woal_netdev_poll_rx);
|
||||
#else
|
||||
init_dummy_netdev(&handle->napi_dev);
|
||||
netif_napi_add(&handle->napi_dev, &handle->napi_rx,
|
||||
woal_netdev_poll_rx, NAPI_BUDGET);
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -3229,7 +3229,11 @@ struct _moal_handle {
|
|||
#endif
|
||||
mlan_ds_misc_keep_alive keep_alive[MAX_KEEP_ALIVE_ID];
|
||||
mlan_ds_misc_keep_alive_rx keep_alive_rx[MAX_KEEP_ALIVE_RX_ID];
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 14, 0)
|
||||
struct net_device *napi_dev;
|
||||
#else
|
||||
struct net_device napi_dev;
|
||||
#endif
|
||||
struct napi_struct napi_rx;
|
||||
/* bus interface operations */
|
||||
moal_if_ops ops;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue