From: Oleksij Rempel Date: Wed, 8 May 2013 08:57:51 +0000 (+0200) Subject: simplify STBC handling X-Git-Tag: 1.4.0~13^2~2 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=87a225354701d95e49b748efbd810baed27eea04;p=open-ath9k-htc-firmware.git 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 --- 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); }