Loading qdf/inc/qdf_nbuf.h +5 −1 Original line number Diff line number Diff line /* * Copyright (c) 2014-2018 The Linux Foundation. All rights reserved. * Copyright (c) 2014-2019 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the Loading Loading @@ -155,6 +155,8 @@ * @sgi: Rx frame short guard interval * @ldpc: ldpc enabled * @beamformed: Is frame beamformed. * @tx_status: Status of Tx frame * @add_rtap_ext: Bool to add extension to radiotap header */ struct mon_rx_status { uint64_t tsft; Loading @@ -179,6 +181,8 @@ struct mon_rx_status { uint8_t sgi; uint8_t ldpc; uint8_t beamformed; uint8_t tx_status; bool add_rtap_ext; }; /* DHCP Related Mask */ Loading qdf/linux/src/qdf_nbuf.c +32 −3 Original line number Diff line number Diff line /* * Copyright (c) 2014-2018 The Linux Foundation. All rights reserved. * Copyright (c) 2014-2019 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the Loading Loading @@ -3417,13 +3417,23 @@ static unsigned int qdf_nbuf_update_radiotap_vht_flags( #define NORMALIZED_TO_NOISE_FLOOR (-96) #define IEEE80211_RADIOTAP_TX_STATUS 0 /* This is Radio Tap Header Extension Length. * 4 Bytes for Extended it_present bit map + * 4 bytes padding for alignment */ #define RADIOTAP_HEADER_EXT_LEN (2 * sizeof(uint32_t)) /* This is the length for radiotap, combined length * (Mandatory part struct ieee80211_radiotap_header + RADIOTAP_HEADER_LEN) * (Mandatory part struct ieee80211_radiotap_header + * RADIOTAP_HEADER_LEN + RADIOTAP_HEADER_EXT_LEN) * cannot be more than available headroom_sz. * Max size current radiotap we are populating is less than 100 bytes, * increase this when we add more radiotap elements. */ #define RADIOTAP_HEADER_LEN (sizeof(struct ieee80211_radiotap_header) + 100) #define RADIOTAP_HEADER_LEN (sizeof(struct ieee80211_radiotap_header) + \ RADIOTAP_HEADER_EXT_LEN + 100) /** * qdf_nbuf_update_radiotap() - Update radiotap header from rx_status Loading @@ -3441,6 +3451,13 @@ unsigned int qdf_nbuf_update_radiotap(struct mon_rx_status *rx_status, (struct ieee80211_radiotap_header *)rtap_buf; uint32_t rtap_hdr_len = sizeof(struct ieee80211_radiotap_header); uint32_t rtap_len = rtap_hdr_len; uint32_t *rtap_ext = NULL; /* Adding Extended Header space */ if (rx_status->add_rtap_ext) { rtap_hdr_len += RADIOTAP_HEADER_EXT_LEN; rtap_len = rtap_hdr_len; } /* IEEE80211_RADIOTAP_TSFT __le64 microseconds*/ rthdr->it_present = cpu_to_le32(1 << IEEE80211_RADIOTAP_TSFT); Loading Loading @@ -3510,6 +3527,18 @@ unsigned int qdf_nbuf_update_radiotap(struct mon_rx_status *rx_status, rtap_buf, rtap_len); } /* Add Extension to Radiotap Header & corresponding data */ if (rx_status->add_rtap_ext) { rthdr->it_present |= cpu_to_le32(1 << IEEE80211_RADIOTAP_EXT); rtap_ext = (uint32_t *)&rthdr->it_present; rtap_ext++; *rtap_ext = cpu_to_le32(1 << IEEE80211_RADIOTAP_TX_STATUS); rtap_buf[rtap_len] = rx_status->tx_status; rtap_len += 1; } rthdr->it_len = cpu_to_le16(rtap_len); if (headroom_sz < rtap_len) { Loading wmi/src/wmi_unified_tlv.c +95 −0 Original line number Diff line number Diff line Loading @@ -15181,6 +15181,99 @@ static QDF_STATUS send_thermal_mitigation_param_cmd_tlv( } #endif /** * send_addba_send_cmd_tlv() - send addba send command to fw * @wmi_handle: wmi handle * @param: pointer to delba send params * @macaddr: peer mac address * * Send WMI_ADDBA_SEND_CMDID command to firmware * Return: QDF_STATUS_SUCCESS on success. QDF_STATUS_E** on error */ static QDF_STATUS send_addba_send_cmd_tlv(wmi_unified_t wmi_handle, uint8_t macaddr[QDF_MAC_ADDR_SIZE], struct addba_send_params *param) { wmi_addba_send_cmd_fixed_param *cmd; wmi_buf_t buf; uint16_t len; QDF_STATUS ret; len = sizeof(*cmd); buf = wmi_buf_alloc(wmi_handle, len); if (!buf) return QDF_STATUS_E_NOMEM; cmd = (wmi_addba_send_cmd_fixed_param *)wmi_buf_data(buf); WMITLV_SET_HDR(&cmd->tlv_header, WMITLV_TAG_STRUC_wmi_addba_send_cmd_fixed_param, WMITLV_GET_STRUCT_TLVLEN(wmi_addba_send_cmd_fixed_param)); cmd->vdev_id = param->vdev_id; WMI_CHAR_ARRAY_TO_MAC_ADDR(macaddr, &cmd->peer_macaddr); cmd->tid = param->tidno; cmd->buffersize = param->buffersize; ret = wmi_unified_cmd_send(wmi_handle, buf, len, WMI_ADDBA_SEND_CMDID); if (QDF_IS_STATUS_ERROR(ret)) { WMI_LOGE("%s: Failed to send cmd to fw, ret=%d", __func__, ret); wmi_buf_free(buf); return QDF_STATUS_E_FAILURE; } return QDF_STATUS_SUCCESS; } /** * send_delba_send_cmd_tlv() - send delba send command to fw * @wmi_handle: wmi handle * @param: pointer to delba send params * @macaddr: peer mac address * * Send WMI_DELBA_SEND_CMDID command to firmware * Return: QDF_STATUS_SUCCESS on success. QDF_STATUS_E** on error */ static QDF_STATUS send_delba_send_cmd_tlv(wmi_unified_t wmi_handle, uint8_t macaddr[QDF_MAC_ADDR_SIZE], struct delba_send_params *param) { wmi_delba_send_cmd_fixed_param *cmd; wmi_buf_t buf; uint16_t len; QDF_STATUS ret; len = sizeof(*cmd); buf = wmi_buf_alloc(wmi_handle, len); if (!buf) return QDF_STATUS_E_NOMEM; cmd = (wmi_delba_send_cmd_fixed_param *)wmi_buf_data(buf); WMITLV_SET_HDR(&cmd->tlv_header, WMITLV_TAG_STRUC_wmi_delba_send_cmd_fixed_param, WMITLV_GET_STRUCT_TLVLEN(wmi_delba_send_cmd_fixed_param)); cmd->vdev_id = param->vdev_id; WMI_CHAR_ARRAY_TO_MAC_ADDR(macaddr, &cmd->peer_macaddr); cmd->tid = param->tidno; cmd->initiator = param->initiator; cmd->reasoncode = param->reasoncode; ret = wmi_unified_cmd_send(wmi_handle, buf, len, WMI_DELBA_SEND_CMDID); if (QDF_IS_STATUS_ERROR(ret)) { WMI_LOGE("%s: Failed to send cmd to fw, ret=%d", __func__, ret); wmi_buf_free(buf); return QDF_STATUS_E_FAILURE; } return QDF_STATUS_SUCCESS; } struct wmi_ops tlv_ops = { .send_vdev_create_cmd = send_vdev_create_cmd_tlv, .send_vdev_delete_cmd = send_vdev_delete_cmd_tlv, Loading Loading @@ -15488,6 +15581,8 @@ struct wmi_ops tlv_ops = { .send_thermal_mitigation_param_cmd = send_thermal_mitigation_param_cmd_tlv, #endif .send_addba_send_cmd = send_addba_send_cmd_tlv, .send_delba_send_cmd = send_delba_send_cmd_tlv, }; #ifdef WMI_TLV_AND_NON_TLV_SUPPORT Loading Loading
qdf/inc/qdf_nbuf.h +5 −1 Original line number Diff line number Diff line /* * Copyright (c) 2014-2018 The Linux Foundation. All rights reserved. * Copyright (c) 2014-2019 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the Loading Loading @@ -155,6 +155,8 @@ * @sgi: Rx frame short guard interval * @ldpc: ldpc enabled * @beamformed: Is frame beamformed. * @tx_status: Status of Tx frame * @add_rtap_ext: Bool to add extension to radiotap header */ struct mon_rx_status { uint64_t tsft; Loading @@ -179,6 +181,8 @@ struct mon_rx_status { uint8_t sgi; uint8_t ldpc; uint8_t beamformed; uint8_t tx_status; bool add_rtap_ext; }; /* DHCP Related Mask */ Loading
qdf/linux/src/qdf_nbuf.c +32 −3 Original line number Diff line number Diff line /* * Copyright (c) 2014-2018 The Linux Foundation. All rights reserved. * Copyright (c) 2014-2019 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the Loading Loading @@ -3417,13 +3417,23 @@ static unsigned int qdf_nbuf_update_radiotap_vht_flags( #define NORMALIZED_TO_NOISE_FLOOR (-96) #define IEEE80211_RADIOTAP_TX_STATUS 0 /* This is Radio Tap Header Extension Length. * 4 Bytes for Extended it_present bit map + * 4 bytes padding for alignment */ #define RADIOTAP_HEADER_EXT_LEN (2 * sizeof(uint32_t)) /* This is the length for radiotap, combined length * (Mandatory part struct ieee80211_radiotap_header + RADIOTAP_HEADER_LEN) * (Mandatory part struct ieee80211_radiotap_header + * RADIOTAP_HEADER_LEN + RADIOTAP_HEADER_EXT_LEN) * cannot be more than available headroom_sz. * Max size current radiotap we are populating is less than 100 bytes, * increase this when we add more radiotap elements. */ #define RADIOTAP_HEADER_LEN (sizeof(struct ieee80211_radiotap_header) + 100) #define RADIOTAP_HEADER_LEN (sizeof(struct ieee80211_radiotap_header) + \ RADIOTAP_HEADER_EXT_LEN + 100) /** * qdf_nbuf_update_radiotap() - Update radiotap header from rx_status Loading @@ -3441,6 +3451,13 @@ unsigned int qdf_nbuf_update_radiotap(struct mon_rx_status *rx_status, (struct ieee80211_radiotap_header *)rtap_buf; uint32_t rtap_hdr_len = sizeof(struct ieee80211_radiotap_header); uint32_t rtap_len = rtap_hdr_len; uint32_t *rtap_ext = NULL; /* Adding Extended Header space */ if (rx_status->add_rtap_ext) { rtap_hdr_len += RADIOTAP_HEADER_EXT_LEN; rtap_len = rtap_hdr_len; } /* IEEE80211_RADIOTAP_TSFT __le64 microseconds*/ rthdr->it_present = cpu_to_le32(1 << IEEE80211_RADIOTAP_TSFT); Loading Loading @@ -3510,6 +3527,18 @@ unsigned int qdf_nbuf_update_radiotap(struct mon_rx_status *rx_status, rtap_buf, rtap_len); } /* Add Extension to Radiotap Header & corresponding data */ if (rx_status->add_rtap_ext) { rthdr->it_present |= cpu_to_le32(1 << IEEE80211_RADIOTAP_EXT); rtap_ext = (uint32_t *)&rthdr->it_present; rtap_ext++; *rtap_ext = cpu_to_le32(1 << IEEE80211_RADIOTAP_TX_STATUS); rtap_buf[rtap_len] = rx_status->tx_status; rtap_len += 1; } rthdr->it_len = cpu_to_le16(rtap_len); if (headroom_sz < rtap_len) { Loading
wmi/src/wmi_unified_tlv.c +95 −0 Original line number Diff line number Diff line Loading @@ -15181,6 +15181,99 @@ static QDF_STATUS send_thermal_mitigation_param_cmd_tlv( } #endif /** * send_addba_send_cmd_tlv() - send addba send command to fw * @wmi_handle: wmi handle * @param: pointer to delba send params * @macaddr: peer mac address * * Send WMI_ADDBA_SEND_CMDID command to firmware * Return: QDF_STATUS_SUCCESS on success. QDF_STATUS_E** on error */ static QDF_STATUS send_addba_send_cmd_tlv(wmi_unified_t wmi_handle, uint8_t macaddr[QDF_MAC_ADDR_SIZE], struct addba_send_params *param) { wmi_addba_send_cmd_fixed_param *cmd; wmi_buf_t buf; uint16_t len; QDF_STATUS ret; len = sizeof(*cmd); buf = wmi_buf_alloc(wmi_handle, len); if (!buf) return QDF_STATUS_E_NOMEM; cmd = (wmi_addba_send_cmd_fixed_param *)wmi_buf_data(buf); WMITLV_SET_HDR(&cmd->tlv_header, WMITLV_TAG_STRUC_wmi_addba_send_cmd_fixed_param, WMITLV_GET_STRUCT_TLVLEN(wmi_addba_send_cmd_fixed_param)); cmd->vdev_id = param->vdev_id; WMI_CHAR_ARRAY_TO_MAC_ADDR(macaddr, &cmd->peer_macaddr); cmd->tid = param->tidno; cmd->buffersize = param->buffersize; ret = wmi_unified_cmd_send(wmi_handle, buf, len, WMI_ADDBA_SEND_CMDID); if (QDF_IS_STATUS_ERROR(ret)) { WMI_LOGE("%s: Failed to send cmd to fw, ret=%d", __func__, ret); wmi_buf_free(buf); return QDF_STATUS_E_FAILURE; } return QDF_STATUS_SUCCESS; } /** * send_delba_send_cmd_tlv() - send delba send command to fw * @wmi_handle: wmi handle * @param: pointer to delba send params * @macaddr: peer mac address * * Send WMI_DELBA_SEND_CMDID command to firmware * Return: QDF_STATUS_SUCCESS on success. QDF_STATUS_E** on error */ static QDF_STATUS send_delba_send_cmd_tlv(wmi_unified_t wmi_handle, uint8_t macaddr[QDF_MAC_ADDR_SIZE], struct delba_send_params *param) { wmi_delba_send_cmd_fixed_param *cmd; wmi_buf_t buf; uint16_t len; QDF_STATUS ret; len = sizeof(*cmd); buf = wmi_buf_alloc(wmi_handle, len); if (!buf) return QDF_STATUS_E_NOMEM; cmd = (wmi_delba_send_cmd_fixed_param *)wmi_buf_data(buf); WMITLV_SET_HDR(&cmd->tlv_header, WMITLV_TAG_STRUC_wmi_delba_send_cmd_fixed_param, WMITLV_GET_STRUCT_TLVLEN(wmi_delba_send_cmd_fixed_param)); cmd->vdev_id = param->vdev_id; WMI_CHAR_ARRAY_TO_MAC_ADDR(macaddr, &cmd->peer_macaddr); cmd->tid = param->tidno; cmd->initiator = param->initiator; cmd->reasoncode = param->reasoncode; ret = wmi_unified_cmd_send(wmi_handle, buf, len, WMI_DELBA_SEND_CMDID); if (QDF_IS_STATUS_ERROR(ret)) { WMI_LOGE("%s: Failed to send cmd to fw, ret=%d", __func__, ret); wmi_buf_free(buf); return QDF_STATUS_E_FAILURE; } return QDF_STATUS_SUCCESS; } struct wmi_ops tlv_ops = { .send_vdev_create_cmd = send_vdev_create_cmd_tlv, .send_vdev_delete_cmd = send_vdev_delete_cmd_tlv, Loading Loading @@ -15488,6 +15581,8 @@ struct wmi_ops tlv_ops = { .send_thermal_mitigation_param_cmd = send_thermal_mitigation_param_cmd_tlv, #endif .send_addba_send_cmd = send_addba_send_cmd_tlv, .send_delba_send_cmd = send_delba_send_cmd_tlv, }; #ifdef WMI_TLV_AND_NON_TLV_SUPPORT Loading