mirror of
https://github.com/nxp-imx/mwifiex.git
synced 2026-11-20 18:39:49 -05:00
mxm_wifiex: fix build errors on L6.16 kernel next tree
When build wifi driver based on L6.16 kernel next tree, will observe the
following build errors. These are caused by the upstream patches:
41cb08555c41 ("treewide, timers: Rename from_timer() to timer_container_of()")
b74947b4f6ff ("wifi: cfg80211/mac80211: Add support to get radio index")
Need to change corresponding API here to avoid the build break.
Build error logs:
mlinux/moal_main.h:498:54: note: each undeclared identifier is reported only once for each function it appears in
In file included from mlinux/moal_cfg80211.h:26,
from mlinux/moal_sta_cfg80211.c:23:
mlinux/moal_main.h: In function ‘woal_timer_handler’:
mlinux/moal_main.h:498:33: error: implicit declaration of function ‘from_timer’; did you mean ‘mod_timer’? [-Werror=implicit-function-declaration]
498 | pmoal_drv_timer timer = from_timer(timer, t, tl);
| ^~~~~~~~~~
| mod_timer
mlinux/moal_sta_cfg80211.c: At top level:
mlinux/moal_sta_cfg80211.c:403:29: error: initialization of ‘int (*)(struct wiphy *, int, u32)’ {aka ‘int (*)(struct wiphy *, int, unsigned int)’} from incompatible pointer type ‘int (*)(struct wiphy *, u32)’ {aka ‘int (*)(struct wiphy *, unsigned int)’} [-Werror=incompatible-pointer-types]
403 | .set_wiphy_params = woal_cfg80211_set_wiphy_params,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mlinux/moal_sta_cfg80211.c:403:29: note: (near initialization for ‘woal_cfg80211_ops.set_wiphy_params’)
mlinux/moal_sta_cfg80211.c:428:25: error: initialization of ‘int (*)(struct wiphy *, struct wireless_dev *, int, enum nl80211_tx_power_setting, int)’ from incompatible pointer type ‘int (*)(struct wiphy *, struct wireless_dev *, enum nl80211_tx_power_setting, int)’ [-Werror=incompatible-pointer-types]
428 | .set_tx_power = woal_cfg80211_set_tx_power,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
mlinux/moal_sta_cfg80211.c:428:25: note: (near initialization for ‘woal_cfg80211_ops.set_tx_power’)
mlinux/moal_sta_cfg80211.c:429:25: error: initialization of ‘int (*)(struct wiphy *, struct wireless_dev *, int, unsigned int, int *)’ from incompatible pointer type ‘int (*)(struct wiphy *, struct wireless_dev *, unsigned int, int *)’ [-Werror=incompatible-pointer-types]
429 | .get_tx_power = woal_cfg80211_get_tx_power,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
mlinux/moal_sta_cfg80211.c:429:25: note: (near initialization for ‘woal_cfg80211_ops.get_tx_power’)
mlinux/moal_sta_cfg80211.c:444:24: error: initialization of ‘int (*)(struct wiphy *, int, u32, u32)’ {aka ‘int (*)(struct wiphy *, int, unsigned int, unsigned int)’} from incompatible pointer type ‘int (*)(struct wiphy *, u32, u32)’ {aka ‘int (*)(struct wiphy *, unsigned int, unsigned int)’} [-Werror=incompatible-pointer-types]
444 | .set_antenna = woal_cfg80211_set_antenna,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
mlinux/moal_sta_cfg80211.c:444:24: note: (near initialization for ‘woal_cfg80211_ops.set_antenna’)
mlinux/moal_sta_cfg80211.c:445:24: error: initialization of ‘int (*)(struct wiphy *, int, u32 *, u32 *)’ {aka ‘int (*)(struct wiphy *, int, unsigned int *, unsigned int *)’} from incompatible pointer type ‘int (*)(struct wiphy *, u32 *, u32 *)’ {aka ‘int (*)(struct wiphy *, unsigned int *, unsigned int *)’} [-Werror=incompatible-pointer-types]
445 | .get_antenna = woal_cfg80211_get_antenna,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
mlinux/moal_sta_cfg80211.c:445:24: note: (near initialization for ‘woal_cfg80211_ops.get_antenna’)
Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
This commit is contained in:
parent
c29c64d863
commit
038a307943
4 changed files with 50 additions and 7 deletions
|
|
@ -1683,11 +1683,16 @@ done:
|
|||
* threshold or rts threshold or retry limit
|
||||
*
|
||||
* @param wiphy A pointer to wiphy structure
|
||||
* @param radio_idx Radio index
|
||||
* @param changed Change flags
|
||||
*
|
||||
* @return 0 -- success, otherwise fail
|
||||
*/
|
||||
int woal_cfg80211_set_wiphy_params(struct wiphy *wiphy, u32 changed)
|
||||
int woal_cfg80211_set_wiphy_params(struct wiphy *wiphy,
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(6, 16, 0)
|
||||
int radio_idx,
|
||||
#endif
|
||||
u32 changed)
|
||||
{
|
||||
moal_private *priv = NULL;
|
||||
moal_handle *handle = (moal_handle *)woal_get_wiphy_priv(wiphy);
|
||||
|
|
@ -2668,12 +2673,17 @@ done:
|
|||
* @brief Request the driver to get antenna configuration
|
||||
*
|
||||
* @param wiphy A pointer to wiphy structure
|
||||
* @param radio_idx Radio index
|
||||
* @param tx_ant Bitmaps of allowed antennas to use for TX
|
||||
* @param rx_ant Bitmaps of allowed antennas to use for RX
|
||||
*
|
||||
* @return 0 -- success, otherwise fail
|
||||
*/
|
||||
int woal_cfg80211_get_antenna(struct wiphy *wiphy, u32 *tx_ant, u32 *rx_ant)
|
||||
int woal_cfg80211_get_antenna(struct wiphy *wiphy,
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(6, 16, 0)
|
||||
int radio_idx,
|
||||
#endif
|
||||
u32 *tx_ant, u32 *rx_ant)
|
||||
{
|
||||
moal_handle *handle = (moal_handle *)woal_get_wiphy_priv(wiphy);
|
||||
moal_private *priv = NULL;
|
||||
|
|
@ -2734,12 +2744,17 @@ done:
|
|||
* @brief Request the driver to set antenna configuration
|
||||
*
|
||||
* @param wiphy A pointer to wiphy structure
|
||||
* @param radio_idx Radio index
|
||||
* @param tx_ant Bitmaps of allowed antennas to use for TX
|
||||
* @param rx_ant Bitmaps of allowed antennas to use for RX
|
||||
*
|
||||
* @return 0 -- success, otherwise fail
|
||||
*/
|
||||
int woal_cfg80211_set_antenna(struct wiphy *wiphy, u32 tx_ant, u32 rx_ant)
|
||||
int woal_cfg80211_set_antenna(struct wiphy *wiphy,
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(6, 16, 0)
|
||||
int radio_idx,
|
||||
#endif
|
||||
u32 tx_ant, u32 rx_ant)
|
||||
{
|
||||
moal_handle *handle = (moal_handle *)woal_get_wiphy_priv(wiphy);
|
||||
moal_private *priv = NULL;
|
||||
|
|
|
|||
|
|
@ -143,7 +143,11 @@ int woal_cfg80211_change_virtual_intf(struct wiphy *wiphy,
|
|||
#endif
|
||||
struct vif_params *params);
|
||||
|
||||
int woal_cfg80211_set_wiphy_params(struct wiphy *wiphy, u32 changed);
|
||||
int woal_cfg80211_set_wiphy_params(struct wiphy *wiphy,
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(6, 16, 0)
|
||||
int radio_idx,
|
||||
#endif
|
||||
u32 changed);
|
||||
|
||||
int woal_cfg80211_add_key(struct wiphy *wiphy, struct net_device *dev,
|
||||
#if ((KERNEL_VERSION(6, 1, 0) <= LINUX_VERSION_CODE) || \
|
||||
|
|
@ -189,8 +193,16 @@ int woal_cfg80211_set_bitrate_mask(struct wiphy *wiphy, struct net_device *dev,
|
|||
const u8 *peer,
|
||||
const struct cfg80211_bitrate_mask *mask);
|
||||
#if KERNEL_VERSION(2, 6, 38) <= CFG80211_VERSION_CODE
|
||||
int woal_cfg80211_set_antenna(struct wiphy *wiphy, u32 tx_ant, u32 rx_ant);
|
||||
int woal_cfg80211_get_antenna(struct wiphy *wiphy, u32 *tx_ant, u32 *rx_ant);
|
||||
int woal_cfg80211_set_antenna(struct wiphy *wiphy,
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(6, 16, 0)
|
||||
int radio_idx,
|
||||
#endif
|
||||
u32 tx_ant, u32 rx_ant);
|
||||
int woal_cfg80211_get_antenna(struct wiphy *wiphy,
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(6, 16, 0)
|
||||
int radio_idx,
|
||||
#endif
|
||||
u32 *tx_ant, u32 *rx_ant);
|
||||
#endif
|
||||
|
||||
#if KERNEL_VERSION(3, 14, 0) <= CFG80211_VERSION_CODE
|
||||
|
|
|
|||
|
|
@ -490,7 +490,11 @@ typedef struct {
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 16, 0)
|
||||
static inline void woal_timer_handler(struct timer_list *t)
|
||||
{
|
||||
pmoal_drv_timer timer = timer_container_of(timer, t, tl);
|
||||
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
|
||||
static inline void woal_timer_handler(struct timer_list *t)
|
||||
{
|
||||
// Coverity violation raised for kernel's API
|
||||
|
|
|
|||
|
|
@ -201,6 +201,9 @@ static int woal_cfg80211_get_tx_power(struct wiphy *wiphy,
|
|||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 8, 0)
|
||||
struct wireless_dev *wdev,
|
||||
#endif
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(6, 16, 0)
|
||||
int radio_idx,
|
||||
#endif
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(6, 14, 0)
|
||||
unsigned int link_id,
|
||||
#endif
|
||||
|
|
@ -210,6 +213,9 @@ static int woal_cfg80211_set_tx_power(struct wiphy *wiphy,
|
|||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 8, 0)
|
||||
struct wireless_dev *wdev,
|
||||
#endif
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(6, 16, 0)
|
||||
int radio_idx,
|
||||
#endif
|
||||
#if CFG80211_VERSION_CODE < KERNEL_VERSION(2, 6, 36)
|
||||
enum tx_power_setting type,
|
||||
#else
|
||||
|
|
@ -6821,6 +6827,9 @@ static int woal_cfg80211_set_power_mgmt(struct wiphy *wiphy,
|
|||
static int woal_cfg80211_get_tx_power(struct wiphy *wiphy,
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 8, 0)
|
||||
struct wireless_dev *wdev,
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(6, 16, 0)
|
||||
int radio_idx,
|
||||
#endif
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(6, 14, 0)
|
||||
unsigned int link_id,
|
||||
#endif
|
||||
|
|
@ -6872,6 +6881,9 @@ static int woal_cfg80211_set_tx_power(struct wiphy *wiphy,
|
|||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 8, 0)
|
||||
struct wireless_dev *wdev,
|
||||
#endif
|
||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(6, 16, 0)
|
||||
int radio_idx,
|
||||
#endif
|
||||
#if CFG80211_VERSION_CODE < KERNEL_VERSION(2, 6, 36)
|
||||
enum tx_power_setting type,
|
||||
#else
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue