diff options
| author | Samuel Ahn <sahn@codeaurora.org> | 2016-09-30 22:48:09 +0530 |
|---|---|---|
| committer | qcabuildsw <qcabuildsw@localhost> | 2016-11-22 11:25:19 -0800 |
| commit | 107e24d8e7150d3133eba176df17e750f49ccf8b (patch) | |
| tree | 04e559527e3dcd71a872a8db87f4c65b7019434b | |
| parent | 0362bf34f79a89001901b03570cfd273e2baac71 (diff) | |
qcacld-3.0: Add support for VSA frames in OCB mode
Propagation from qcacld-2.0 to qcacld-3.0
When VSA frames are received with the device in OCB mode and a broadcast
destination MAC address, the frame will be propagated up to the kernel
instead of being dropped.
Change-Id: Iace313633792192803619bfdd94c83e8d9544983
CRs-Fixed: 945269
| -rw-r--r-- | core/hdd/src/wlan_hdd_p2p.c | 35 | ||||
| -rw-r--r-- | core/mac/src/pe/lim/lim_process_action_frame.c | 16 |
2 files changed, 43 insertions, 8 deletions
diff --git a/core/hdd/src/wlan_hdd_p2p.c b/core/hdd/src/wlan_hdd_p2p.c index 8d44039ed073..a998389bc555 100644 --- a/core/hdd/src/wlan_hdd_p2p.c +++ b/core/hdd/src/wlan_hdd_p2p.c @@ -2300,9 +2300,10 @@ void __hdd_indicate_mgmt_frame(hdd_adapter_t *pAdapter, QDF_STATUS status; hdd_remain_on_chan_ctx_t *pRemainChanCtx = NULL; hdd_context_t *pHddCtx; + uint8_t broadcast = 0; hdd_info("Frame Type = %d Frame Length = %d", - frameType, nFrameLength); + frameType, nFrameLength); if (NULL == pAdapter) { hdd_err("pAdapter is NULL"); @@ -2326,7 +2327,7 @@ void __hdd_indicate_mgmt_frame(hdd_adapter_t *pAdapter, /* Get pAdapter from Destination mac address of the frame */ if ((type == SIR_MAC_MGMT_FRAME) && (subType != SIR_MAC_MGMT_PROBE_REQ)) { pAdapter = - hdd_get_adapter_by_macaddr(WLAN_HDD_GET_CTX(pAdapter), + hdd_get_adapter_by_macaddr(pHddCtx, &pbFrames [WLAN_HDD_80211_FRM_DA_OFFSET]); if (NULL == pAdapter) { @@ -2341,7 +2342,23 @@ void __hdd_indicate_mgmt_frame(hdd_adapter_t *pAdapter, [WLAN_HDD_80211_FRM_DA_OFFSET])); hdd_alert("Frame Type = %d Frame Length = %d subType = %d", frameType, nFrameLength, subType); + /* We will receive broadcast management frames + * in OCB mode */ + pAdapter = hdd_get_adapter(pHddCtx, QDF_OCB_MODE); + if (NULL == pAdapter || !qdf_is_macaddr_broadcast( + (struct qdf_mac_addr *)&pbFrames + [WLAN_HDD_80211_FRM_DA_OFFSET])) { + /* + * Under assumtion that we don't + *receive any action + * frame with BCST as destination, + * we are dropping action frame + */ return; + } + + broadcast = 1; + } } @@ -2366,7 +2383,8 @@ void __hdd_indicate_mgmt_frame(hdd_adapter_t *pAdapter, cfgState = WLAN_HDD_GET_CFG_STATE_PTR(pAdapter); - if ((type == SIR_MAC_MGMT_FRAME) && (subType == SIR_MAC_MGMT_ACTION)) { + if ((type == SIR_MAC_MGMT_FRAME) && + (subType == SIR_MAC_MGMT_ACTION) && !broadcast) { if (pbFrames[WLAN_HDD_PUBLIC_ACTION_FRAME_OFFSET] == WLAN_HDD_PUBLIC_ACTION_FRAME) { /* Public action frame */ @@ -2533,15 +2551,18 @@ void __hdd_indicate_mgmt_frame(hdd_adapter_t *pAdapter, pAdapter->sessionId, pAdapter->dev->ifindex); #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 18, 0)) - cfg80211_rx_mgmt(pAdapter->dev->ieee80211_ptr, freq, 0, pbFrames, + cfg80211_rx_mgmt(pAdapter->dev->ieee80211_ptr, + freq, rxRssi * 100, pbFrames, nFrameLength, NL80211_RXMGMT_FLAG_ANSWERED); #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 12, 0)) - cfg80211_rx_mgmt(pAdapter->dev->ieee80211_ptr, freq, 0, pbFrames, + cfg80211_rx_mgmt(pAdapter->dev->ieee80211_ptr, + freq, rxRssi * 100, pbFrames, nFrameLength, NL80211_RXMGMT_FLAG_ANSWERED, GFP_ATOMIC); #else - cfg80211_rx_mgmt(pAdapter->dev->ieee80211_ptr, freq, 0, - pbFrames, nFrameLength, GFP_ATOMIC); + cfg80211_rx_mgmt(pAdapter->dev->ieee80211_ptr, freq, + rxRssi * 100, + pbFrames, nFrameLength, GFP_ATOMIC); #endif /* LINUX_VERSION_CODE */ } diff --git a/core/mac/src/pe/lim/lim_process_action_frame.c b/core/mac/src/pe/lim/lim_process_action_frame.c index d25e61e2c4f1..3164e0e7ae5b 100644 --- a/core/mac/src/pe/lim/lim_process_action_frame.c +++ b/core/mac/src/pe/lim/lim_process_action_frame.c @@ -2019,7 +2019,7 @@ void lim_process_action_frame(tpAniSirGlobal mac_ctx, sizeof(tSirMacMgmtHdr), session->smeSessionId, WMA_GET_RX_CH(rx_pkt_info), - session, 0); + session, WMA_GET_RX_RSSI_RAW(rx_pkt_info)); } else { lim_log(mac_ctx, LOG1, FL("Unhandled public action frame (Vendor specific). OUI %x %x %x %x"), @@ -2027,6 +2027,20 @@ void lim_process_action_frame(tpAniSirGlobal mac_ctx, pub_action->Oui[2], pub_action->Oui[3]); } break; + /* Handle vendor specific action */ + case SIR_MAC_ACTION_VENDOR_SPECIFIC_CATEGORY: + { + tpSirMacMgmtHdr header; + uint32_t frame_len; + + header = WMA_GET_RX_MAC_HEADER(rx_pkt_info); + frame_len = WMA_GET_RX_PAYLOAD_LEN(rx_pkt_info); + lim_send_sme_mgmt_frame_ind(mac_ctx, header->fc.subType, + (uint8_t *)header, frame_len + sizeof(tSirMacMgmtHdr), 0, + WMA_GET_RX_CH(rx_pkt_info), NULL, + WMA_GET_RX_RSSI_RAW(rx_pkt_info)); + break; + } case SIR_MAC_ACTION_2040_BSS_COEXISTENCE: mac_hdr = NULL; |
