mxm_wifiex: fix the build errors with the API changes on next-20220912 kernel tag

Kernel cfg80211 add link_id parameter to various key operations for
MLO, for more details, please check the following link:
https://lore.kernel.org/all/20220730052643.1959111-4-quic_vjakkam@quicinc.com/

As these API changes on next-20220912 kernel tag, corresponding
functions also need to be changed to avoid build break.

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
This commit is contained in:
Sherry Sun 2022-09-26 12:03:35 +08:00
parent fb098b07fc
commit d88bd98445
2 changed files with 32 additions and 1 deletions

View file

@ -1371,6 +1371,9 @@ fail:
*/
#endif
int woal_cfg80211_add_key(struct wiphy *wiphy, struct net_device *netdev,
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(6, 0, 0)
int link_id,
#endif
t_u8 key_index,
#if KERNEL_VERSION(2, 6, 36) < CFG80211_VERSION_CODE
bool pairwise,
@ -1427,6 +1430,9 @@ int woal_cfg80211_add_key(struct wiphy *wiphy, struct net_device *netdev,
*/
#endif
int woal_cfg80211_del_key(struct wiphy *wiphy, struct net_device *netdev,
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(6, 0, 0)
int link_id,
#endif
t_u8 key_index,
#if KERNEL_VERSION(2, 6, 36) < CFG80211_VERSION_CODE
bool pairwise,
@ -1482,7 +1488,11 @@ int woal_cfg80211_del_key(struct wiphy *wiphy, struct net_device *netdev,
*/
#endif
int woal_cfg80211_set_default_key(struct wiphy *wiphy,
struct net_device *netdev, t_u8 key_index
struct net_device *netdev,
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(6, 0, 0)
int link_id,
#endif
t_u8 key_index
#if KERNEL_VERSION(2, 6, 37) < CFG80211_VERSION_CODE
,
bool ucast, bool mcast
@ -1514,6 +1524,9 @@ int woal_cfg80211_set_default_key(struct wiphy *wiphy,
#if KERNEL_VERSION(2, 6, 30) <= CFG80211_VERSION_CODE
int woal_cfg80211_set_default_mgmt_key(struct wiphy *wiphy,
struct net_device *netdev,
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(6, 0, 0)
int link_id,
#endif
t_u8 key_index)
{
PRINTM(MINFO, "set default mgmt key, key index=%d\n", key_index);
@ -1525,6 +1538,9 @@ int woal_cfg80211_set_default_mgmt_key(struct wiphy *wiphy,
#if KERNEL_VERSION(5, 10, 0) <= CFG80211_VERSION_CODE
int woal_cfg80211_set_default_beacon_key(struct wiphy *wiphy,
struct net_device *netdev,
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(6, 0, 0)
int link_id,
#endif
t_u8 key_index)
{
PRINTM(MINFO, "set default beacon key, key index=%d\n", key_index);

View file

@ -128,6 +128,9 @@ int woal_cfg80211_change_virtual_intf(struct wiphy *wiphy,
int woal_cfg80211_set_wiphy_params(struct wiphy *wiphy, u32 changed);
int woal_cfg80211_add_key(struct wiphy *wiphy, struct net_device *dev,
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(6, 0, 0)
int link_id,
#endif
t_u8 key_index,
#if KERNEL_VERSION(2, 6, 36) < CFG80211_VERSION_CODE
bool pairwise,
@ -135,6 +138,9 @@ int woal_cfg80211_add_key(struct wiphy *wiphy, struct net_device *dev,
const t_u8 *mac_addr, struct key_params *params);
int woal_cfg80211_del_key(struct wiphy *wiphy, struct net_device *dev,
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(6, 0, 0)
int link_id,
#endif
t_u8 key_index,
#if KERNEL_VERSION(2, 6, 36) < CFG80211_VERSION_CODE
bool pairwise,
@ -207,6 +213,9 @@ int woal_cfg80211_set_channel(struct wiphy *wiphy,
#if KERNEL_VERSION(2, 6, 37) < CFG80211_VERSION_CODE
int woal_cfg80211_set_default_key(struct wiphy *wiphy, struct net_device *dev,
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(6, 0, 0)
int link_id,
#endif
t_u8 key_index, bool ucast, bool mcast);
#else
int woal_cfg80211_set_default_key(struct wiphy *wiphy, struct net_device *dev,
@ -216,12 +225,18 @@ int woal_cfg80211_set_default_key(struct wiphy *wiphy, struct net_device *dev,
#if KERNEL_VERSION(2, 6, 30) <= CFG80211_VERSION_CODE
int woal_cfg80211_set_default_mgmt_key(struct wiphy *wiphy,
struct net_device *netdev,
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(6, 0, 0)
int link_id,
#endif
t_u8 key_index);
#endif
#if KERNEL_VERSION(5, 10, 0) <= CFG80211_VERSION_CODE
int woal_cfg80211_set_default_beacon_key(struct wiphy *wiphy,
struct net_device *netdev,
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(6, 0, 0)
int link_id,
#endif
t_u8 key_index);
#endif