mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 21:59:12 -04:00
qcacld-3.0: Driver changes to accumulate kernel changes related to FILS
With kernel version 4.19, a new structure cfg80211_fils_resp_params is introduced for fils parameters in the existing structure cfg80211_connect_resp_params. The functions hdd_populate_fils_params and hdd_connect_done use cfg80211_fils_resp_params as argument for modifying the fils parameters. This causes compilation issues with 4.19 kernel. Add changes to accumulate cfg80211_fils_resp_params structure addition from 4.19 kernel. Change-Id: I71e1084a190b1b089c132c5f3916c22691ba674e CRs-Fixed: 2386259
This commit is contained in:
parent
604b033e71
commit
9e61908e57
1 changed files with 43 additions and 7 deletions
|
|
@ -6091,8 +6091,9 @@ static void hdd_connect_bss(struct net_device *dev, const u8 *bssid,
|
|||
#endif
|
||||
|
||||
#if defined(WLAN_FEATURE_FILS_SK)
|
||||
#if defined(CFG80211_CONNECT_DONE) || \
|
||||
(LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0))
|
||||
#if (defined(CFG80211_CONNECT_DONE) || \
|
||||
(LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0))) && \
|
||||
(LINUX_VERSION_CODE < KERNEL_VERSION(4, 19, 0))
|
||||
#if defined(CFG80211_FILS_SK_OFFLOAD_SUPPORT) || \
|
||||
(LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0))
|
||||
/**
|
||||
|
|
@ -6121,6 +6122,8 @@ static void hdd_populate_fils_params(struct cfg80211_connect_resp_params
|
|||
fils_params->pmk = pmk;
|
||||
fils_params->pmk_len = pmk_len;
|
||||
fils_params->pmkid = pmkid;
|
||||
hdd_debug("FILS erp_next_seq_num:%d",
|
||||
fils_params->fils_erp_next_seq_num);
|
||||
}
|
||||
#else
|
||||
static inline void hdd_populate_fils_params(struct cfg80211_connect_resp_params
|
||||
|
|
@ -6132,6 +6135,41 @@ static inline void hdd_populate_fils_params(struct cfg80211_connect_resp_params
|
|||
{ }
|
||||
#endif
|
||||
|
||||
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 19, 0))
|
||||
/**
|
||||
* hdd_populate_fils_params() - Populate FILS keys to connect response
|
||||
* @fils_params: connect response to supplicant
|
||||
* @fils_kek: FILS kek
|
||||
* @fils_kek_len: FILS kek length
|
||||
* @pmk: FILS PMK
|
||||
* @pmk_len: FILS PMK length
|
||||
* @pmkid: PMKID
|
||||
* @fils_seq_num: FILS Seq number
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
static void hdd_populate_fils_params(struct cfg80211_connect_resp_params
|
||||
*fils_params, const uint8_t *fils_kek,
|
||||
size_t fils_kek_len, const uint8_t *pmk,
|
||||
size_t pmk_len, const uint8_t *pmkid,
|
||||
uint16_t fils_seq_num)
|
||||
{
|
||||
/* Increament seq number to be used for next FILS */
|
||||
fils_params->fils.erp_next_seq_num = fils_seq_num + 1;
|
||||
fils_params->fils.update_erp_next_seq_num = true;
|
||||
fils_params->fils.kek = fils_kek;
|
||||
fils_params->fils.kek_len = fils_kek_len;
|
||||
fils_params->fils.pmk = pmk;
|
||||
fils_params->fils.pmk_len = pmk_len;
|
||||
fils_params->fils.pmkid = pmkid;
|
||||
hdd_debug("FILS erp_next_seq_num:%d",
|
||||
fils_params->fils.erp_next_seq_num);
|
||||
}
|
||||
#endif /* CFG80211_CONNECT_DONE */
|
||||
|
||||
#if defined(CFG80211_CONNECT_DONE) || \
|
||||
(LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0))
|
||||
|
||||
void hdd_update_hlp_info(struct net_device *dev,
|
||||
struct csr_roam_info *roam_info)
|
||||
{
|
||||
|
|
@ -6251,9 +6289,7 @@ static void hdd_connect_done(struct net_device *dev, const u8 *bssid,
|
|||
roam_info->fils_seq_num);
|
||||
hdd_save_gtk_params(adapter, roam_info, false);
|
||||
}
|
||||
hdd_debug("FILS indicate connect status %d seq no %d",
|
||||
fils_params.status,
|
||||
fils_params.fils_erp_next_seq_num);
|
||||
hdd_debug("FILS indicate connect status %d", fils_params.status);
|
||||
|
||||
cfg80211_connect_done(dev, &fils_params, gfp);
|
||||
|
||||
|
|
@ -6267,7 +6303,7 @@ static void hdd_connect_done(struct net_device *dev, const u8 *bssid,
|
|||
qdf_mem_free(roam_fils_params);
|
||||
roam_info->fils_join_rsp = NULL;
|
||||
}
|
||||
#else
|
||||
#else /* CFG80211_CONNECT_DONE */
|
||||
static inline void
|
||||
hdd_connect_done(struct net_device *dev, const u8 *bssid,
|
||||
struct cfg80211_bss *bss, struct csr_roam_info *roam_info,
|
||||
|
|
@ -6277,7 +6313,7 @@ hdd_connect_done(struct net_device *dev, const u8 *bssid,
|
|||
tSirResultCodes timeout_reason)
|
||||
{ }
|
||||
#endif
|
||||
#endif
|
||||
#endif /* WLAN_FEATURE_FILS_SK */
|
||||
|
||||
#if defined(WLAN_FEATURE_FILS_SK) && \
|
||||
(defined(CFG80211_CONNECT_DONE) || \
|
||||
|
|
|
|||
Loading…
Reference in a new issue