From 989127d3ef0c4024bccfc58e0ade06ecb9b65b76 Mon Sep 17 00:00:00 2001 From: Prakash Dhavali Date: Tue, 29 Nov 2016 14:56:44 +0530 Subject: [PATCH] qcacld-3.0: Update correct interface index to supplicant Currently host driver does not send interface index to supplicant after successful roaming, this leads to disconnection in DBS mode. Add changes to update respective interface index by passing wdev to cfg80211_vendor_event_alloc(). Change-Id: Ic22fdd56a26a27d42a3ac7aaaf67bfba273a2697 CRs-Fixed: 1094297 --- core/hdd/src/wlan_hdd_assoc.c | 5 ++--- core/hdd/src/wlan_hdd_cfg80211.c | 7 ++++--- core/hdd/src/wlan_hdd_cfg80211.h | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/core/hdd/src/wlan_hdd_assoc.c b/core/hdd/src/wlan_hdd_assoc.c index fe9b4a869e6d..4b00e15970f3 100644 --- a/core/hdd/src/wlan_hdd_assoc.c +++ b/core/hdd/src/wlan_hdd_assoc.c @@ -1936,7 +1936,6 @@ static void hdd_send_re_assoc_event(struct net_device *dev, uint8_t *assoc_req_ies = kmalloc(IW_GENERIC_IE_MAX, GFP_KERNEL); uint32_t rspRsnLength = 0; struct ieee80211_channel *chan; - hdd_context_t *pHddCtx = WLAN_HDD_GET_CTX(pAdapter); uint8_t buf_ssid_ie[2 + SIR_MAC_SSID_EID_MAX]; /* 2 bytes-EID and len */ uint8_t *buf_ptr, ssid_ie_len; struct cfg80211_bss *bss = NULL; @@ -2046,7 +2045,7 @@ static void hdd_send_re_assoc_event(struct net_device *dev, QDF_TRACE_HEX_DUMP(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_DEBUG, assoc_req_ies, pCsrRoamInfo->nAssocReqLength); - wlan_hdd_send_roam_auth_event(pHddCtx, pCsrRoamInfo->bssid.bytes, + wlan_hdd_send_roam_auth_event(pAdapter, pCsrRoamInfo->bssid.bytes, assoc_req_ies, pCsrRoamInfo->nAssocReqLength, rspRsnIe, rspRsnLength, pCsrRoamInfo); @@ -2583,7 +2582,7 @@ static QDF_STATUS hdd_association_completion_handler(hdd_adapter_t *pAdapter, assocRsplen, GFP_KERNEL); wlan_hdd_send_roam_auth_event( - pHddCtx, + pAdapter, pRoamInfo->bssid.bytes, pFTAssocReq, assocReqlen, diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index 552673ebd51b..d90a75cbd874 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -3782,7 +3782,7 @@ wlan_hdd_cfg80211_get_logger_supp_feature(struct wiphy *wiphy, #ifdef WLAN_FEATURE_ROAM_OFFLOAD /** * wlan_hdd_send_roam_auth_event() - Send the roamed and authorized event - * @hdd_ctx_ptr: pointer to HDD Context. + * @adapter: Pointer to adapter struct * @bssid: pointer to bssid of roamed AP. * @req_rsn_ie: Pointer to request RSN IE * @req_rsn_len: Length of the request RSN IE @@ -3807,10 +3807,11 @@ wlan_hdd_cfg80211_get_logger_supp_feature(struct wiphy *wiphy, * * Return: Return the Success or Failure code. */ -int wlan_hdd_send_roam_auth_event(hdd_context_t *hdd_ctx_ptr, uint8_t *bssid, +int wlan_hdd_send_roam_auth_event(hdd_adapter_t *adapter, uint8_t *bssid, uint8_t *req_rsn_ie, uint32_t req_rsn_len, uint8_t *rsp_rsn_ie, uint32_t rsp_rsn_len, tCsrRoamInfo *roam_info_ptr) { + hdd_context_t *hdd_ctx_ptr = WLAN_HDD_GET_CTX(adapter); struct sk_buff *skb = NULL; eCsrAuthType auth_type; ENTER(); @@ -3823,7 +3824,7 @@ int wlan_hdd_send_roam_auth_event(hdd_context_t *hdd_ctx_ptr, uint8_t *bssid, return 0; skb = cfg80211_vendor_event_alloc(hdd_ctx_ptr->wiphy, - NULL, + &(adapter->wdev), ETH_ALEN + req_rsn_len + rsp_rsn_len + sizeof(uint8_t) + SIR_REPLAY_CTR_LEN + SIR_KCK_KEY_LEN + SIR_KCK_KEY_LEN + diff --git a/core/hdd/src/wlan_hdd_cfg80211.h b/core/hdd/src/wlan_hdd_cfg80211.h index 4e3f951ce3db..02a06c57fa8c 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.h +++ b/core/hdd/src/wlan_hdd_cfg80211.h @@ -3276,12 +3276,12 @@ int wlan_hdd_cfg80211_update_bss(struct wiphy *wiphy, void wlan_hdd_cfg80211_acs_ch_select_evt(hdd_adapter_t *adapter); #ifdef WLAN_FEATURE_ROAM_OFFLOAD -int wlan_hdd_send_roam_auth_event(hdd_context_t *hdd_ctx_ptr, uint8_t *bssid, +int wlan_hdd_send_roam_auth_event(hdd_adapter_t *adapter, uint8_t *bssid, uint8_t *req_rsn_ie, uint32_t req_rsn_length, uint8_t *rsp_rsn_ie, uint32_t rsp_rsn_length, tCsrRoamInfo *roam_info_ptr); #else -static inline int wlan_hdd_send_roam_auth_event(hdd_context_t *hdd_ctx_ptr, +static inline int wlan_hdd_send_roam_auth_event(hdd_adapter_t *adapter, uint8_t *bssid, uint8_t *req_rsn_ie, uint32_t req_rsn_length, uint8_t *rsp_rsn_ie, uint32_t rsp_rsn_length, tCsrRoamInfo *roam_info_ptr)