Skip to content

Commit

Permalink
drivers: qcacld-3.0: Merge tag 'LA.UM.8.3.r1-08100-sdm845.0' into can…
Browse files Browse the repository at this point in the history
…ting-4.9-q

* tag 'LA.UM.8.3.r1-08100-sdm845.0' of https://source.codeaurora.org/quic/la/platform/vendor/qcom-opensource/wlan/qcacld-3.0: (48 commits)
  Release 5.2.03.27C
  qcacld-3.0: Fix LL Timeout over Debugfs
  Release 5.2.03.27B
  qcacld-3.0: Ageout connected BSS in beacon table mode
  Release 5.2.03.27A
  qcacld-3.0: Add support for WPA3 SuiteB roaming
  qcacld-3.0: Update beacon rpt error code
  Release 5.2.03.27
  qcacld-3.0: Send disconnect reason code as 0 for beacon miss
  Release 5.2.03.27
  qcacld-3.0: Abort only host scans on roam start
  qcacld-3.0: Handle tx_power_level under radio stat
  Release 5.2.03.26Z
  qcacld-3.0: Fix stack corruption in beacon request table mode
  qcacld-3.0: Add null check for frequency list in rrm scan done callback
  Release 5.2.03.26Y
  qcacld-3.0: Add a log to print nan separate vdev capa of host and fw
  Release 5.2.03.26X
  qcacld-3.0: Consider Only dot11mode profiles if configured
  Release 5.2.03.26W
  ...

Change-Id: Icd0f270966180f2ddc1f0fd4046339342aaa51fb
Signed-off-by: Khusika Dhamar Gusti <mail@khusika.com>
  • Loading branch information
Khusika Dhamar Gusti committed Jul 6, 2020
2 parents 0bae00f + 18b6dc5 commit 2f8b89d
Show file tree
Hide file tree
Showing 34 changed files with 1,069 additions and 590 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,6 @@ pkt_capture_update_tx_status(
struct pkt_capture_tx_hdr_elem_t *pktcapture_hdr)
{
struct mon_channel *ch_info = &pdev->mon_ch_info;
uint16_t channel_flags = 0;

tx_status->tsft = (u_int64_t)(pktcapture_hdr->timestamp);
tx_status->chan_freq = ch_info->ch_freq;
Expand All @@ -229,15 +228,10 @@ pkt_capture_update_tx_status(
pkt_capture_tx_get_phy_info(pktcapture_hdr, tx_status);

if (pktcapture_hdr->preamble == 0)
channel_flags |= IEEE80211_CHAN_OFDM;
tx_status->ofdm_flag = 1;
else if (pktcapture_hdr->preamble == 1)
channel_flags |= IEEE80211_CHAN_CCK;
tx_status->cck_flag = 1;

channel_flags |=
(WLAN_REG_CHAN_TO_BAND(ch_info->ch_num) == BAND_2G ?
IEEE80211_CHAN_2GHZ : IEEE80211_CHAN_5GHZ);

tx_status->chan_flags = channel_flags;
/* RSSI is filled with TPC which will be normalized
* during radiotap updation, so add 96 here
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,6 @@ pkt_capture_process_mgmt_tx_data(struct wlan_objmgr_pdev *pdev,
{
struct mon_rx_status txrx_status = {0};
struct wlan_objmgr_psoc *psoc;
uint16_t channel_flags = 0;
struct ieee80211_frame *wh;
uint8_t type, sub_type;

Expand Down Expand Up @@ -311,13 +310,12 @@ pkt_capture_process_mgmt_tx_data(struct wlan_objmgr_pdev *pdev,
txrx_status.nr_ant = 1;
txrx_status.rtap_flags |=
((txrx_status.rate == 6 /* Mbps */) ? BIT(1) : 0);
channel_flags |=
((txrx_status.rate == 6 /* Mbps */) ?
IEEE80211_CHAN_OFDM : IEEE80211_CHAN_CCK);
channel_flags |=
(WLAN_REG_CHAN_TO_BAND(txrx_status.chan_num) == BAND_2G ?
IEEE80211_CHAN_2GHZ : IEEE80211_CHAN_5GHZ);
txrx_status.chan_flags = channel_flags;

if (txrx_status.rate == 6)
txrx_status.ofdm_flag = 1;
else
txrx_status.cck_flag = 1;

txrx_status.rate = ((txrx_status.rate == 6 /* Mbps */) ? 0x0c : 0x02);
txrx_status.tx_status = status;
txrx_status.tx_retry_cnt = params->tx_retry_cnt;
Expand Down Expand Up @@ -432,7 +430,6 @@ pkt_capture_mgmt_rx_data_cb(struct wlan_objmgr_psoc *psoc,
enum mgmt_frame_type frm_type)
{
struct mon_rx_status txrx_status = {0};
uint16_t channel_flags = 0;
struct ieee80211_frame *wh;
uint8_t type, sub_type;
qdf_nbuf_t nbuf;
Expand Down Expand Up @@ -483,13 +480,12 @@ pkt_capture_mgmt_rx_data_cb(struct wlan_objmgr_psoc *psoc,
txrx_status.nr_ant = 1;
txrx_status.rtap_flags |=
((txrx_status.rate == 6 /* Mbps */) ? BIT(1) : 0);
channel_flags |=
((txrx_status.rate == 6 /* Mbps */) ?
IEEE80211_CHAN_OFDM : IEEE80211_CHAN_CCK);
channel_flags |=
(WLAN_REG_CHAN_TO_BAND(txrx_status.chan_num) == BAND_2G ?
IEEE80211_CHAN_2GHZ : IEEE80211_CHAN_5GHZ);
txrx_status.chan_flags = channel_flags;

if (txrx_status.rate == 6)
txrx_status.ofdm_flag = 1;
else
txrx_status.cck_flag = 1;

txrx_status.rate = ((txrx_status.rate == 6 /* Mbps */) ? 0x0c : 0x02);
txrx_status.add_rtap_ext = true;

Expand Down
12 changes: 5 additions & 7 deletions drivers/staging/qcacld-3.0/core/dp/htt/htt_monitor_rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -465,21 +465,19 @@ void htt_rx_mon_get_rx_status(htt_pdev_handle pdev,
struct htt_host_rx_desc_base *rx_desc,
struct mon_rx_status *rx_status)
{
uint16_t channel_flags = 0;
struct mon_channel *ch_info = &pdev->mon_ch_info;

rx_status->tsft = (u_int64_t)TSF_TIMESTAMP(rx_desc);
rx_status->chan_freq = ch_info->ch_freq;
rx_status->chan_num = ch_info->ch_num;
htt_mon_rx_get_phy_info(rx_desc, rx_status);
rx_status->rtap_flags |= htt_mon_rx_get_rtap_flags(rx_desc);
channel_flags |= rx_desc->ppdu_start.l_sig_rate_select ?
IEEE80211_CHAN_CCK : IEEE80211_CHAN_OFDM;
channel_flags |=
(cds_chan_to_band(ch_info->ch_num) == CDS_BAND_2GHZ ?
IEEE80211_CHAN_2GHZ : IEEE80211_CHAN_5GHZ);

rx_status->chan_flags = channel_flags;
if (rx_desc->ppdu_start.l_sig_rate_select)
rx_status->cck_flag = 1;
else
rx_status->ofdm_flag = 1;

rx_status->ant_signal_db = rx_desc->ppdu_start.rssi_comb;
rx_status->rssi_comb = rx_desc->ppdu_start.rssi_comb;
}
Expand Down
20 changes: 20 additions & 0 deletions drivers/staging/qcacld-3.0/core/dp/txrx/ol_txrx.c
Original file line number Diff line number Diff line change
Expand Up @@ -3687,6 +3687,22 @@ static inline void ol_txrx_peer_free_tids(ol_txrx_peer_handle peer)
}
}

/**
* ol_txrx_peer_drop_pending_frames() - drop pending frames in the RX queue
* @peer: peer handle
*
* Drop pending packets pertaining to the peer from the RX thread queue.
*
* Return: None
*/
static void ol_txrx_peer_drop_pending_frames(struct ol_txrx_peer_t *peer)
{
p_cds_sched_context sched_ctx = get_cds_sched_ctxt();

if (sched_ctx)
cds_drop_rxpkt_by_staid(sched_ctx, peer->local_id);
}

/**
* ol_txrx_peer_release_ref() - release peer reference
* @peer: peer handle
Expand Down Expand Up @@ -3789,6 +3805,10 @@ int ol_txrx_peer_release_ref(ol_txrx_peer_handle peer,
&peer->mac_addr.raw, peer, 0,
qdf_atomic_read(&peer->ref_cnt));
peer_id = peer->local_id;

/* Drop all pending frames in the rx thread queue */
ol_txrx_peer_drop_pending_frames(peer);

/* remove the reference to the peer from the hash table */
ol_txrx_peer_find_hash_remove(pdev, peer);

Expand Down
1 change: 0 additions & 1 deletion drivers/staging/qcacld-3.0/core/hdd/inc/wlan_hdd_assoc.h
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,6 @@ QDF_STATUS hdd_roam_register_sta(struct hdd_adapter *adapter,
bool hdd_save_peer(struct hdd_station_ctx *sta_ctx, uint8_t sta_id,
struct qdf_mac_addr *peer_mac_addr);
void hdd_delete_peer(struct hdd_station_ctx *sta_ctx, uint8_t sta_id);
QDF_STATUS hdd_roam_deregister_sta(struct hdd_adapter *adapter, uint8_t sta_id);

#ifdef WLAN_FEATURE_ROAM_OFFLOAD
QDF_STATUS
Expand Down
73 changes: 5 additions & 68 deletions drivers/staging/qcacld-3.0/core/hdd/src/wlan_hdd_assoc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1635,28 +1635,6 @@ static void hdd_clear_roam_profile_ie(struct hdd_adapter *adapter)
hdd_exit();
}

/**
* hdd_roam_deregister_sta() - deregister station
* @adapter: pointer to adapter
* @staId: station identifier
*
* Return: QDF_STATUS enumeration
*/
QDF_STATUS hdd_roam_deregister_sta(struct hdd_adapter *adapter, uint8_t staid)
{
QDF_STATUS qdf_status;

qdf_status = cdp_clear_peer(cds_get_context(QDF_MODULE_ID_SOC),
(struct cdp_pdev *)cds_get_context(QDF_MODULE_ID_TXRX),
staid);
if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
hdd_err("cdp_clear_peer() failed for staid %d. Status(%d) [0x%08X]",
staid, qdf_status, qdf_status);
}

return qdf_status;
}

/**
* hdd_print_bss_info() - print bss info
* @hdd_sta_ctx: pointer to hdd station context
Expand Down Expand Up @@ -1711,7 +1689,6 @@ static QDF_STATUS hdd_dis_connect_handler(struct hdd_adapter *adapter,
eCsrRoamResult roamResult)
{
QDF_STATUS status = QDF_STATUS_SUCCESS;
QDF_STATUS vstatus;
struct net_device *dev = adapter->dev;
struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
Expand Down Expand Up @@ -1838,41 +1815,7 @@ static QDF_STATUS hdd_dis_connect_handler(struct hdd_adapter *adapter,
adapter->session_id,
SCAN_EVENT_TYPE_MAX, true);
}
if (eCSR_ROAM_IBSS_LEAVE == roamStatus) {
uint8_t i;

sta_id = sta_ctx->broadcast_staid;
vstatus = hdd_roam_deregister_sta(adapter, sta_id);
if (QDF_IS_STATUS_ERROR(vstatus))
status = QDF_STATUS_E_FAILURE;

if (sta_id < HDD_MAX_ADAPTERS)
hdd_ctx->sta_to_adapter[sta_id] = NULL;
else
hdd_debug("invalid sta id %d", sta_id);
/* Clear all the peer sta register with TL. */
for (i = 0; i < MAX_PEERS; i++) {
if (HDD_WLAN_INVALID_STA_ID ==
sta_ctx->conn_info.staId[i])
continue;
sta_id = sta_ctx->conn_info.staId[i];
hdd_debug("Deregister StaID %d", sta_id);
vstatus = hdd_roam_deregister_sta(adapter, sta_id);
if (QDF_IS_STATUS_ERROR(vstatus))
status = QDF_STATUS_E_FAILURE;
/* set the staid and peer mac as 0, all other
* reset are done in hdd_connRemoveConnectInfo.
*/
sta_ctx->conn_info.staId[i] =
HDD_WLAN_INVALID_STA_ID;
qdf_mem_zero(&sta_ctx->conn_info.peerMacAddress[i],
sizeof(struct qdf_mac_addr));
if (sta_id < HDD_MAX_ADAPTERS)
hdd_ctx->sta_to_adapter[sta_id] = NULL;
else
hdd_debug("invalid sta_id %d", sta_id);
}
} else {
if (roamStatus != eCSR_ROAM_IBSS_LEAVE) {
sta_id = sta_ctx->conn_info.staId[0];
/* clear scan cache for Link Lost */
if (eCSR_ROAM_RESULT_DEAUTH_IND == roamResult ||
Expand Down Expand Up @@ -3725,7 +3668,7 @@ bool hdd_save_peer(struct hdd_station_ctx *sta_ctx, uint8_t sta_id,
{
int idx;

for (idx = 0; idx < SIR_MAX_NUM_STA_IN_IBSS; idx++) {
for (idx = 0; idx < MAX_PEERS; idx++) {
if (HDD_WLAN_INVALID_STA_ID == sta_ctx->conn_info.staId[idx]) {
hdd_debug("adding peer: %pM, sta_id: %d, at idx: %d",
peer_mac_addr, sta_id, idx);
Expand All @@ -3750,7 +3693,7 @@ void hdd_delete_peer(struct hdd_station_ctx *sta_ctx, uint8_t sta_id)
{
int i;

for (i = 0; i < SIR_MAX_NUM_STA_IN_IBSS; i++) {
for (i = 0; i < MAX_PEERS; i++) {
if (sta_id == sta_ctx->conn_info.staId[i]) {
sta_ctx->conn_info.staId[i] = HDD_WLAN_INVALID_STA_ID;
return;
Expand All @@ -3763,7 +3706,7 @@ bool hdd_any_valid_peer_present(struct hdd_adapter *adapter)
struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
int idx;

for (idx = 0; idx < SIR_MAX_NUM_STA_IN_IBSS; idx++)
for (idx = 0; idx < MAX_PEERS; idx++)
if (HDD_WLAN_INVALID_STA_ID != sta_ctx->conn_info.staId[idx])
return true;

Expand Down Expand Up @@ -4042,8 +3985,6 @@ roam_roam_connect_status_update_handler(struct hdd_adapter *adapter,
MAC_ADDR_ARRAY(sta_ctx->conn_info.bssId.bytes),
roam_info->staId);

hdd_roam_deregister_sta(adapter, roam_info->staId);

if (roam_info->staId < HDD_MAX_ADAPTERS)
hdd_ctx->sta_to_adapter[roam_info->staId] = NULL;
else
Expand Down Expand Up @@ -4157,6 +4098,7 @@ hdd_roam_tdls_status_update_handler(struct hdd_adapter *adapter,
{
return QDF_STATUS_SUCCESS;
}

#endif

#ifdef WLAN_FEATURE_11W
Expand Down Expand Up @@ -4716,7 +4658,6 @@ hdd_sme_roam_callback(void *pContext, struct csr_roam_info *roam_info,
QDF_STATUS qdf_ret_status = QDF_STATUS_SUCCESS;
struct hdd_adapter *adapter = (struct hdd_adapter *) pContext;
struct hdd_station_ctx *sta_ctx = NULL;
QDF_STATUS status = QDF_STATUS_SUCCESS;
struct cfg80211_bss *bss_status;
struct hdd_context *hdd_ctx;

Expand Down Expand Up @@ -4770,10 +4711,6 @@ hdd_sme_roam_callback(void *pContext, struct csr_roam_info *roam_info,
wlan_hdd_netif_queue_control(adapter,
WLAN_STOP_ALL_NETIF_QUEUE,
WLAN_CONTROL_PATH);
status = hdd_roam_deregister_sta(adapter,
sta_ctx->conn_info.staId[0]);
if (!QDF_IS_STATUS_SUCCESS(status))
qdf_ret_status = QDF_STATUS_E_FAILURE;
sta_ctx->ft_carrier_on = true;
sta_ctx->hdd_reassoc_scenario = true;
hdd_debug("hdd_reassoc_scenario set to: %d, due to eCSR_ROAM_FT_START, session: %d",
Expand Down
6 changes: 6 additions & 0 deletions drivers/staging/qcacld-3.0/core/hdd/src/wlan_hdd_cfg80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -21813,6 +21813,12 @@ wlan_hdd_get_cfg80211_disconnect_reason(struct hdd_adapter *adapter,
if (reason >= eSIR_MAC_REASON_PROP_START) {
adapter->last_disconnect_reason =
wlan_hdd_sir_mac_to_qca_reason(reason);
/*
* Applications expect reason code as 0 for beacon miss failure
* due to backward compatibility. So send ieee80211_reason as 0.
*/
if (reason == eSIR_MAC_BEACON_MISSED)
ieee80211_reason = 0;
} else {
ieee80211_reason = (enum ieee80211_reasoncode)reason;
adapter->last_disconnect_reason =
Expand Down
10 changes: 8 additions & 2 deletions drivers/staging/qcacld-3.0/core/hdd/src/wlan_hdd_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -10613,6 +10613,7 @@ static int hdd_open_interfaces(struct hdd_context *hdd_ctx, bool rtnl_held)
struct hdd_adapter *adapter;
enum QDF_GLOBAL_MODE curr_mode;
int ret;
bool nan_iface_support;

curr_mode = hdd_get_conparam();
/* open monitor mode adapter if con_mode is monitor mode */
Expand Down Expand Up @@ -10656,8 +10657,13 @@ static int hdd_open_interfaces(struct hdd_context *hdd_ctx, bool rtnl_held)
if (ret)
goto err_close_adapters;

if (hdd_ctx->nan_seperate_vdev_supported &&
wlan_hdd_nan_separate_iface_supported(hdd_ctx)) {
nan_iface_support = wlan_hdd_nan_separate_iface_supported(hdd_ctx);
if (!hdd_ctx->nan_seperate_vdev_supported || !nan_iface_support)
hdd_debug("NAN separate vdev%s supported by host,%s supported by firmware",
nan_iface_support ? "" : " not",
hdd_ctx->nan_seperate_vdev_supported ? "" : " not");

if (hdd_ctx->nan_seperate_vdev_supported && nan_iface_support) {
adapter = hdd_open_adapter(hdd_ctx, QDF_NAN_DISC_MODE, "wifi-aware%d",
wlan_hdd_get_intf_addr(hdd_ctx,
QDF_NAN_DISC_MODE),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,6 @@ void hdd_ndi_drv_ndi_delete_rsp_handler(uint8_t vdev_id)
sta_id = sta_ctx->broadcast_staid;
if (sta_id < HDD_MAX_ADAPTERS) {
hdd_ctx->sta_to_adapter[sta_id] = NULL;
hdd_roam_deregister_sta(adapter, sta_id);
hdd_delete_peer(sta_ctx, sta_id);
sta_ctx->broadcast_staid = HDD_WLAN_INVALID_STA_ID;
}
Expand Down Expand Up @@ -944,7 +943,6 @@ void hdd_ndp_peer_departed_handler(uint8_t vdev_id, uint16_t sta_id,
return;
}

hdd_roam_deregister_sta(adapter, sta_id);
hdd_delete_peer(sta_ctx, sta_id);
hdd_ctx->sta_to_adapter[sta_id] = NULL;

Expand Down
15 changes: 1 addition & 14 deletions drivers/staging/qcacld-3.0/core/hdd/src/wlan_hdd_softap_tx_rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -983,7 +983,6 @@ QDF_STATUS hdd_softap_rx_packet_cbk(void *context, qdf_nbuf_t rx_buf)
QDF_STATUS hdd_softap_deregister_sta(struct hdd_adapter *adapter,
uint8_t sta_id)
{
QDF_STATUS qdf_status = QDF_STATUS_SUCCESS;
struct hdd_context *hdd_ctx;
tSmeConfigParams *sme_config;

Expand All @@ -1004,18 +1003,6 @@ QDF_STATUS hdd_softap_deregister_sta(struct hdd_adapter *adapter,
return QDF_STATUS_E_INVAL;
}

/* Clear station in TL and then update HDD data
* structures. This helps to block RX frames from other
* station to this station.
*/
qdf_status = cdp_clear_peer(cds_get_context(QDF_MODULE_ID_SOC),
(struct cdp_pdev *)cds_get_context(QDF_MODULE_ID_TXRX),
sta_id);
if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
hdd_debug("cdp_clear_peer failed for staID %d, Status=%d [0x%08X]",
sta_id, qdf_status, qdf_status);
}

if (adapter->sta_info[sta_id].in_use) {
if (ucfg_ipa_is_enabled()) {
if (ucfg_ipa_wlan_evt(hdd_ctx->pdev, adapter->dev,
Expand Down Expand Up @@ -1047,7 +1034,7 @@ QDF_STATUS hdd_softap_deregister_sta(struct hdd_adapter *adapter,
sme_config->csrConfig.oce_feature_bitmap);
qdf_mem_free(sme_config);

return qdf_status;
return QDF_STATUS_SUCCESS;
}

QDF_STATUS hdd_softap_register_sta(struct hdd_adapter *adapter,
Expand Down
Loading

0 comments on commit 2f8b89d

Please sign in to comment.