[PATCH 1/1] Enable different bd_rates for different packet types
Olof Johansson
dev at skyshaper.net
Tue Jun 4 05:25:52 EDT 2013
After some feedback from Pontus and Eugene I changed hte code a little
bit for txrx.c. It should be a bit more clear now what happens..
hopefully:
diff --git a/txrx.c b/txrx.c
index c52cc22..637d61d 100644
--- a/txrx.c
+++ b/txrx.c
@@ -84,7 +84,7 @@ void wcn36xx_prepare_tx_bd(struct wcn36xx_tx_bd *bd,
u32 len, u32 header_len)
bd->pdu.mpdu_len = len;
}
void wcn36xx_fill_tx_bd(struct wcn36xx *wcn, struct wcn36xx_tx_bd *bd,
- u8 broadcast, u8 encrypt)
+ u8 broadcast, u8 encrypt, struct ieee80211_hdr *hdr)
{
bd->dpu_rf = WCN36XX_BMU_WQ_TX;
bd->pdu.tid = WCN36XX_TID;
@@ -103,8 +103,15 @@ void wcn36xx_fill_tx_bd(struct wcn36xx *wcn,
struct wcn36xx_tx_bd *bd,
} else {
bd->queue_id = WCN36XX_TX_U_WQ_ID;
/* default rate for unicast */
- bd->bd_rate = 2;
bd->ack_policy = 0;
+ if (ieee80211_is_data(hdr->frame_control))
+ bd->bd_rate = WCN36XX_BD_RATE_DATA;
+ else if (ieee80211_is_mgmt(hdr->frame_control))
+ bd->bd_rate = WCN36XX_BD_RATE_MGMT;
+ else if (ieee80211_is_ctl(hdr->frame_control))
+ bd->bd_rate = WCN36XX_BD_RATE_CTRL;
+ else
+ wcn36xx_warn("frame control type unknown");
}
bd->sta_index = wcn->current_vif->sta_index;
On Tue, Jun 4, 2013 at 11:06 AM, Eugene Krasnikov <k.eugene.e at gmail.com> wrote:
>> + if (!ieee80211_is_data(hdr->frame_control)) {
>
> Let's also check ieee80211_is_data_qos.
>
>> +#define WCN36XX_BD_RATE_DATA 0
>
> Since this define is not used anywhere what about having it as a comment?
>
> --
> Best regards,
> Eugene
More information about the wcn36xx
mailing list