[PATCH 6/6] Use self_sta_index and self_dpu_desc_index for MGMT frames

Eugene Krasnikov k.eugene.e at gmail.com
Fri Jun 14 04:49:23 EDT 2013


For management frames set self_sta_index and self_dpu_desc_index
in BD that were received from WCN36XX_HAL_ADD_STA_SELF_RSP

Signed-off-by: Eugene Krasnikov <k.eugene.e at gmail.com>
---
 smd.c     | 4 ++--
 txrx.c    | 7 +++++--
 wcn36xx.h | 3 +++
 3 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/smd.c b/smd.c
index 85e0714..22b33e3 100644
--- a/smd.c
+++ b/smd.c
@@ -355,8 +355,8 @@ static int wcn36xx_smd_add_sta_self_rsp(struct wcn36xx *wcn,
 	wcn36xx_dbg(WCN36XX_DBG_HAL, "hal add sta self status %d "
 		    "self_sta_index %d dpu_index %d",
 		    rsp->status, rsp->self_sta_index, rsp->dpu_index);
-	wcn->current_vif->sta_index = rsp->self_sta_index;
-	wcn->current_vif->dpu_desc_index = rsp->dpu_index;
+	wcn->current_vif->self_sta_index = rsp->self_sta_index;
+	wcn->current_vif->self_dpu_desc_index = rsp->dpu_index;
 
 	return 0;
 }
diff --git a/txrx.c b/txrx.c
index 505329b..ee82a6a 100644
--- a/txrx.c
+++ b/txrx.c
@@ -118,9 +118,12 @@ void wcn36xx_fill_tx_bd(struct wcn36xx *wcn, struct wcn36xx_tx_bd *bd,
 	if (ieee80211_is_data(hdr->frame_control)) {
 		bd->dpu_sign = wcn->current_vif->ucast_dpu_signature;
 		bd->queue_id = 0;
+		bd->sta_index = wcn->current_vif->sta_index;
+		bd->dpu_desc_idx = wcn->current_vif->dpu_desc_index;
+	} else {
+		bd->sta_index = wcn->current_vif->self_sta_index;
+		bd->dpu_desc_idx = wcn->current_vif->self_dpu_desc_index;
 	}
-	bd->sta_index = wcn->current_vif->sta_index;
-	bd->dpu_desc_idx = wcn->current_vif->dpu_desc_index;
 
 	bd->dpu_ne = encrypt;
 	bd->tx_comp = tx_compl;
diff --git a/wcn36xx.h b/wcn36xx.h
index b691c00..efacd13 100644
--- a/wcn36xx.h
+++ b/wcn36xx.h
@@ -94,6 +94,9 @@ struct wcn36xx_vif {
 	u8 sta_index;
 	u8 dpu_desc_index;
 	u8 ucast_dpu_signature;
+	/* Returned from WCN36XX_HAL_ADD_STA_SELF_RSP */
+	u8 self_sta_index;
+	u8 self_dpu_desc_index;
 };
 struct wcn_sta {
 	u8 sta_id;
-- 
1.7.11.3




More information about the wcn36xx mailing list