diff --git a/components/p2p/core/src/wlan_p2p_off_chan_tx.c b/components/p2p/core/src/wlan_p2p_off_chan_tx.c index 7dbb2f8c4ffb..e4ac36e90c32 100644 --- a/components/p2p/core/src/wlan_p2p_off_chan_tx.c +++ b/components/p2p/core/src/wlan_p2p_off_chan_tx.c @@ -577,6 +577,11 @@ static QDF_STATUS p2p_populate_mac_header( psoc = tx_ctx->p2p_soc_obj->soc; wh = (struct wlan_frame_hdr *)tx_ctx->buf; + /* + * Remove the WEP bit if already set, p2p_populate_rmf_field will set it + * if required. + */ + wh->i_fc[1] &= ~IEEE80211_FC1_WEP; mac_addr = wh->i_addr1; pdev_id = wlan_get_pdev_id_from_vdev_id(psoc, tx_ctx->vdev_id, WLAN_P2P_ID); @@ -1512,6 +1517,7 @@ static QDF_STATUS p2p_populate_rmf_field(struct tx_action_context *tx_ctx, uint8_t *frame; uint32_t frame_len; struct p2p_soc_priv_obj *p2p_soc_obj; + uint8_t action_category; p2p_soc_obj = tx_ctx->p2p_soc_obj; @@ -1526,8 +1532,14 @@ static QDF_STATUS p2p_populate_rmf_field(struct tx_action_context *tx_ctx, wh = (struct wlan_frame_hdr *)(*ppbuf); action_hdr = (struct action_frm_hdr *)(*ppbuf + sizeof(*wh)); - if (!is_rmf_mgmt_action_frame(action_hdr->action_category)) { - p2p_debug("non rmf act frame 0x%x cat %x", + /* + * For Action frame which are not handled, the resp is sent back to the + * source without change, except that MSB of the Category set to 1, so + * to get the actual action category we need to ignore the MSB. + */ + action_category = action_hdr->action_category & 0x7f; + if (!is_rmf_mgmt_action_frame(action_category)) { + p2p_debug("non rmf act frame 0x%x category %x", tx_ctx->frame_info.sub_type, action_hdr->action_category); return QDF_STATUS_SUCCESS;