From a9bb8a1e1cd5470765bc568b5e27d1cc69ddae7f Mon Sep 17 00:00:00 2001 From: Zhipeng Wang Date: Tue, 9 Aug 2022 11:46:54 +0000 Subject: [PATCH] MA-20371-1 Fix build errors of wifi driver after merge AOSP kernel After merge AOSP kernel added patch: BACKPORT: FROMLIST: wifi: cfg80211: Add link_id parameter to various key operations for MLO The patches has been merged into an upstream maintainer tree, but has not yet been merged into Linux mainline. More importantly, the patches changed the function, resulting in build errors. Signed-off-by: Zhipeng Wang --- mxm_wifiex/wlan_src/mlinux/moal_cfg80211.c | 10 +++++----- mxm_wifiex/wlan_src/mlinux/moal_cfg80211.h | 12 ++++++------ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/mxm_wifiex/wlan_src/mlinux/moal_cfg80211.c b/mxm_wifiex/wlan_src/mlinux/moal_cfg80211.c index 2f76c1b..bfbb4b9 100644 --- a/mxm_wifiex/wlan_src/mlinux/moal_cfg80211.c +++ b/mxm_wifiex/wlan_src/mlinux/moal_cfg80211.c @@ -1375,7 +1375,7 @@ fail: */ #endif int woal_cfg80211_add_key(struct wiphy *wiphy, struct net_device *netdev, - t_u8 key_index, + int link_id, t_u8 key_index, #if KERNEL_VERSION(2, 6, 36) < CFG80211_VERSION_CODE bool pairwise, #endif @@ -1431,7 +1431,7 @@ 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, - t_u8 key_index, + int link_id, t_u8 key_index, #if KERNEL_VERSION(2, 6, 36) < CFG80211_VERSION_CODE bool pairwise, #endif @@ -1486,7 +1486,7 @@ 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, int link_id, t_u8 key_index #if KERNEL_VERSION(2, 6, 37) < CFG80211_VERSION_CODE , bool ucast, bool mcast @@ -1517,7 +1517,7 @@ 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, + struct net_device *netdev, int link_id, t_u8 key_index) { PRINTM(MINFO, "set default mgmt key, key index=%d\n", key_index); @@ -1528,7 +1528,7 @@ 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, + struct net_device *netdev, int link_id, t_u8 key_index) { PRINTM(MINFO, "set default beacon key, key index=%d\n", key_index); diff --git a/mxm_wifiex/wlan_src/mlinux/moal_cfg80211.h b/mxm_wifiex/wlan_src/mlinux/moal_cfg80211.h index 20f43e8..0e39e99 100644 --- a/mxm_wifiex/wlan_src/mlinux/moal_cfg80211.h +++ b/mxm_wifiex/wlan_src/mlinux/moal_cfg80211.h @@ -136,14 +136,14 @@ 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, - t_u8 key_index, + int link_id, t_u8 key_index, #if KERNEL_VERSION(2, 6, 36) < CFG80211_VERSION_CODE bool pairwise, #endif const t_u8 *mac_addr, struct key_params *params); int woal_cfg80211_del_key(struct wiphy *wiphy, struct net_device *dev, - t_u8 key_index, + int link_id, t_u8 key_index, #if KERNEL_VERSION(2, 6, 36) < CFG80211_VERSION_CODE bool pairwise, #endif @@ -211,22 +211,22 @@ int woal_cfg80211_set_channel(struct wiphy *wiphy, #endif #if KERNEL_VERSION(2, 6, 37) < CFG80211_VERSION_CODE -int woal_cfg80211_set_default_key(struct wiphy *wiphy, struct net_device *dev, +int woal_cfg80211_set_default_key(struct wiphy *wiphy, struct net_device *dev, int link_id, t_u8 key_index, bool ucast, bool mcast); #else -int woal_cfg80211_set_default_key(struct wiphy *wiphy, struct net_device *dev, +int woal_cfg80211_set_default_key(struct wiphy *wiphy, struct net_device *dev, int link_id, t_u8 key_index); #endif #if KERNEL_VERSION(2, 6, 30) <= CFG80211_VERSION_CODE int woal_cfg80211_set_default_mgmt_key(struct wiphy *wiphy, - struct net_device *netdev, + struct net_device *netdev, int link_id, 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, + struct net_device *netdev, int link_id, t_u8 key_index); #endif