qcacld-3.0: Replace tSirMacAddr with cdf_mac_addr in GtkOffload Req/Rsp

Replace tSirMacAddr with cdf_mac_addr in GtkOffload Req/Rsp.

Change-Id: Ib5a20b5741d08bd86cd8674d8e9724392093b706
CRs-Fixed: 898864
This commit is contained in:
Srinivas Girigowda 2015-11-20 17:10:11 -08:00 • committed by Satish Singh
commit 2213b1d9cf
5 changed files with 35 additions and 34 deletions

View file

@ -10297,7 +10297,8 @@ void wlan_hdd_cfg80211_update_replay_counter_callback(void *callbackContext,
}
/* Update replay counter to NL */
cfg80211_gtk_rekey_notify(pAdapter->dev, pGtkOffloadGetInfoRsp->bssId,
cfg80211_gtk_rekey_notify(pAdapter->dev,
pGtkOffloadGetInfoRsp->bssid.bytes,
tempReplayCounter, GFP_KERNEL);
}
@ -10351,8 +10352,8 @@ int __wlan_hdd_cfg80211_set_rekey_data(struct wiphy *wiphy,
NL80211_KCK_LEN);
memcpy(pHddStaCtx->gtkOffloadReqParams.aKEK, data->kek,
NL80211_KEK_LEN);
memcpy(pHddStaCtx->gtkOffloadReqParams.bssId,
&pHddStaCtx->conn_info.bssId, CDF_MAC_ADDR_SIZE);
cdf_copy_macaddr(&pHddStaCtx->gtkOffloadReqParams.bssid,
&pHddStaCtx->conn_info.bssId);
{
/* changing from big to little endian since driver
* works on little endian format

View file

@ -135,9 +135,8 @@ static void hdd_conf_gtk_offload(hdd_adapter_t *pAdapter, bool fenable)
} else {
if ((eConnectionState_Associated ==
pHddStaCtx->conn_info.connState)
&& (0 ==
memcmp(&pHddStaCtx->gtkOffloadReqParams.bssId,
&pHddStaCtx->conn_info.bssId, CDF_MAC_ADDR_SIZE))
&& (cdf_is_macaddr_equal(&pHddStaCtx->gtkOffloadReqParams.bssid,
&pHddStaCtx->conn_info.bssId))
&& (GTK_OFFLOAD_ENABLE ==
pHddStaCtx->gtkOffloadReqParams.ulFlags)) {

View file

@ -3090,9 +3090,25 @@ typedef struct {
uint8_t aKCK[16]; /* Key confirmation key */
uint8_t aKEK[16]; /* key encryption key */
uint64_t ullKeyReplayCounter; /* replay counter */
tSirMacAddr bssId;
struct cdf_mac_addr bssid;
} tSirGtkOffloadParams, *tpSirGtkOffloadParams;
/*---------------------------------------------------------------------------
* WMA_GTK_OFFLOAD_GETINFO_REQ
*--------------------------------------------------------------------------*/
typedef struct {
uint16_t mesgType;
uint16_t mesgLen;
uint32_t ulStatus; /* success or failure */
uint64_t ullKeyReplayCounter; /* current replay counter value */
uint32_t ulTotalRekeyCount; /* total rekey attempts */
uint32_t ulGTKRekeyCount; /* successful GTK rekeys */
uint32_t ulIGTKRekeyCount; /* successful iGTK rekeys */
struct cdf_mac_addr bssid;
} tSirGtkOffloadGetInfoRspParams, *tpSirGtkOffloadGetInfoRspParams;
#endif /* WLAN_FEATURE_GTK_OFFLOAD */
/**
* struct sir_wifi_start_log - Structure to store the params sent to start/
* stop logging
@ -3273,22 +3289,6 @@ struct sir_dual_mac_config_resp {
uint32_t status;
};
/*---------------------------------------------------------------------------
* WMA_GTK_OFFLOAD_GETINFO_REQ
*--------------------------------------------------------------------------*/
typedef struct {
uint16_t mesgType;
uint16_t mesgLen;
uint32_t ulStatus; /* success or failure */
uint64_t ullKeyReplayCounter; /* current replay counter value */
uint32_t ulTotalRekeyCount; /* total rekey attempts */
uint32_t ulGTKRekeyCount; /* successful GTK rekeys */
uint32_t ulIGTKRekeyCount; /* successful iGTK rekeys */
tSirMacAddr bssId;
} tSirGtkOffloadGetInfoRspParams, *tpSirGtkOffloadGetInfoRspParams;
#endif /* WLAN_FEATURE_GTK_OFFLOAD */
#ifdef WLAN_WAKEUP_EVENTS
/*---------------------------------------------------------------------------
tSirWakeReasonInd

View file

@ -5899,8 +5899,8 @@ CDF_STATUS sme_set_gtk_offload(tHalHandle hHal,
return CDF_STATUS_E_NOMEM;
}
cdf_mem_copy(pGtkOffload->bssId, pSession->connectedProfile.bssid.bytes,
sizeof(tSirMacAddr));
cdf_copy_macaddr(&pGtkOffload->bssid,
&pSession->connectedProfile.bssid);
*request_buf = *pGtkOffload;
@ -5941,7 +5941,7 @@ CDF_STATUS sme_get_gtk_offload(tHalHandle hHal,
if (NULL == pSession) {
CDF_TRACE(CDF_MODULE_ID_SME, CDF_TRACE_LEVEL_ERROR,
"%s: Session not found ", __func__);
"%s: Session not found", __func__);
return CDF_STATUS_E_FAILURE;
}
@ -5952,8 +5952,8 @@ CDF_STATUS sme_get_gtk_offload(tHalHandle hHal,
return CDF_STATUS_E_NOMEM;
}
cdf_mem_copy(request_buf->bssId, pSession->connectedProfile.bssid.bytes,
sizeof(tSirMacAddr));
cdf_copy_macaddr(&request_buf->bssid,
&pSession->connectedProfile.bssid);
msg.type = WMA_GTK_OFFLOAD_GETINFO_REQ;
msg.reserved = 0;

View file

@ -4675,7 +4675,7 @@ int wma_gtk_offload_status_event(void *handle, uint8_t *event,
cdf_mem_copy(&resp->ullKeyReplayCounter, &status->replay_counter,
GTK_REPLAY_COUNTER_BYTES);
cdf_mem_copy(resp->bssId, bssid, IEEE80211_ADDR_LEN);
cdf_mem_copy(resp->bssid.bytes, bssid, IEEE80211_ADDR_LEN);
#ifdef IGTK_OFFLOAD
/* TODO: Is the refresh count same for GTK and IGTK? */
@ -4792,15 +4792,16 @@ CDF_STATUS wma_process_gtk_offload_req(tp_wma_handle wma,
WMA_LOGD("%s Enter", __func__);
/* Get the vdev id */
if (!wma_find_vdev_by_bssid(wma, params->bssId, &vdev_id)) {
WMA_LOGE("vdev handle is invalid for %pM", params->bssId);
if (!wma_find_vdev_by_bssid(wma, params->bssid.bytes, &vdev_id)) {
WMA_LOGE("vdev handle is invalid for %pM", params->bssid.bytes);
status = CDF_STATUS_E_INVAL;
goto out;
}
/* Validate vdev id */
if (vdev_id >= wma->max_bssid) {
WMA_LOGE("invalid vdev_id %d for %pM", vdev_id, params->bssId);
WMA_LOGE("invalid vdev_id %d for %pM", vdev_id,
params->bssid.bytes);
status = CDF_STATUS_E_INVAL;
goto out;
}
@ -4845,8 +4846,8 @@ CDF_STATUS wma_process_gtk_offload_getinfo_req(tp_wma_handle wma,
WMA_LOGD("%s Enter", __func__);
/* Get the vdev id */
if (!wma_find_vdev_by_bssid(wma, params->bssId, &vdev_id)) {
WMA_LOGE("vdev handle is invalid for %pM", params->bssId);
if (!wma_find_vdev_by_bssid(wma, params->bssid.bytes, &vdev_id)) {
WMA_LOGE("vdev handle is invalid for %pM", params->bssid.bytes);
status = CDF_STATUS_E_INVAL;
goto out;
}