[PATCH 1/3] Use WCN36XX_BD_RATE_CTRL for 5G band
Eugene Krasnikov
k.eugene.e at gmail.com
Tue Jun 18 08:33:52 EDT 2013
For MGMT frames on 5G band use WCN36XX_BD_RATE_CTRL rate.
The same must be done in future for P2P interface.
Signed-off-by: Eugene Krasnikov <k.eugene.e at gmail.com>
---
main.c | 1 +
txrx.c | 10 +++++++---
wcn36xx.h | 1 +
3 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/main.c b/main.c
index b6bc6e9..a52209e 100644
--- a/main.c
+++ b/main.c
@@ -142,6 +142,7 @@ static int wcn36xx_config(struct ieee80211_hw *hw, u32 changed)
if (changed & IEEE80211_CONF_CHANGE_CHANNEL) {
wcn->ch = hw->conf.chandef.chan->hw_value;
wcn->current_channel = hw->conf.chandef.chan;
+ wcn->band = hw->conf.chandef.chan->band;
wcn36xx_dbg(WCN36XX_DBG_MAC, "wcn36xx_config channel switch=%d", wcn->ch);
wcn36xx_smd_switch_channel(wcn, wcn->ch);
}
diff --git a/txrx.c b/txrx.c
index ee82a6a..9c3a4d1 100644
--- a/txrx.c
+++ b/txrx.c
@@ -97,8 +97,10 @@ void wcn36xx_fill_tx_bd(struct wcn36xx *wcn, struct wcn36xx_tx_bd *bd,
bd->queue_id = WCN36XX_TX_B_WQ_ID;
/* default rate for broadcast */
- bd->bd_rate = 0;
-
+ if (ieee80211_is_mgmt(hdr->frame_control))
+ bd->bd_rate = (wcn->band == IEEE80211_BAND_5GHZ) ?
+ WCN36XX_BD_RATE_CTRL :
+ WCN36XX_BD_RATE_MGMT;
/* No ack needed not unicast */
bd->ack_policy = 1;
} else {
@@ -108,7 +110,9 @@ void wcn36xx_fill_tx_bd(struct wcn36xx *wcn, struct wcn36xx_tx_bd *bd,
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;
+ bd->bd_rate = (wcn->band == IEEE80211_BAND_5GHZ) ?
+ WCN36XX_BD_RATE_CTRL :
+ WCN36XX_BD_RATE_MGMT;
else if (ieee80211_is_ctl(hdr->frame_control))
bd->bd_rate = WCN36XX_BD_RATE_CTRL;
else
diff --git a/wcn36xx.h b/wcn36xx.h
index efacd13..a81ef84 100644
--- a/wcn36xx.h
+++ b/wcn36xx.h
@@ -110,6 +110,7 @@ struct wcn36xx {
struct mac_address addresses[2];
int ch;
struct ieee80211_channel *current_channel;
+ enum ieee80211_band band;
struct wcn36xx_hal_mac_ssid ssid;
enum nl80211_iftype iftype;
u16 aid;
--
1.7.11.3
More information about the wcn36xx
mailing list