From 87a225354701d95e49b748efbd810baed27eea04 Mon Sep 17 00:00:00 2001 From: Oleksij Rempel Date: Wed, 8 May 2013 10:57:51 +0200 Subject: [PATCH] simplify STBC handling Current STBC handler was waiting for peer caps to make decision. Better way will be to make right decision on the host and tell firmware what it can use. This patch changes behaviour of firmware. Up now host should send ATH_RC_TX_STBC_FLAG to enable STBC. Signed-off-by: Oleksij Rempel --- target_firmware/wlan/ratectrl_11n_ln.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/target_firmware/wlan/ratectrl_11n_ln.c b/target_firmware/wlan/ratectrl_11n_ln.c index de86550..788822c 100755 --- a/target_firmware/wlan/ratectrl_11n_ln.c +++ b/target_firmware/wlan/ratectrl_11n_ln.c @@ -438,8 +438,7 @@ rcSibUpdate_11n(struct ath_softc_tgt *sc, struct ath_node_target *pSib, ((capflag & ATH_RC_DS_FLAG) ? WLAN_RC_DS_FLAG : 0) | ((capflag & ATH_RC_HT40_SGI_FLAG) ? WLAN_RC_HT40_SGI_FLAG : 0) | ((capflag & ATH_RC_HT_FLAG) ? WLAN_RC_HT_FLAG : 0) | - ((capflag & ATH_RC_CW40_FLAG) ? WLAN_RC_40_FLAG : 0) | - ((capflag & ATH_RC_TX_STBC_FLAG) ? WLAN_RC_STBC_FLAG : 0), + ((capflag & ATH_RC_CW40_FLAG) ? WLAN_RC_40_FLAG : 0), keepState, pRateSet); } @@ -1220,18 +1219,8 @@ ath_rate_newassoc_11n(struct ath_softc_tgt *sc, struct ath_node_target *an, int ((capflag & ATH_RC_WEP_TKIP_FLAG) ? WLAN_RC_WEP_TKIP_FLAG : 0); #ifdef MAGPIE_MERLIN - /* Rx STBC is a 2-bit mask. Needs to convert from ath definition to wlan definition. */ - - oan->htcap |= (((capflag & ATH_RC_RX_STBC_FLAG) >> ATH_RC_RX_STBC_FLAG_S) - << WLAN_RC_STBC_FLAG_S); - - /* If only one chain is enabled, do not do stbc. */ - if (sc->sc_txstbcsupport) { - oan->stbc = (capflag & ATH_RC_RX_STBC_FLAG) >> ATH_RC_RX_STBC_FLAG_S; - } else { - oan->stbc = 0; - } - + /* Only MERLIN can send STBC */ + oan->stbc = (capflag & ATH_RC_TX_STBC_FLAG) ? 1 : 0; #endif rcSibUpdate_11n(sc, an, oan->htcap, 0, rs); } -- 2.25.1