From: Oleksij Rempel <linux@rempel-privat.de>
To: Adrian Chadd <adrian@freebsd.org>
Cc: Felix Fietkau <nbd@openwrt.org>,
ath9k-devel@lists.ath9k.org, linux-wireless@vger.kernel.org
Subject: Re: [ath9k-devel] [PATCH 1/2] ath9k_htc: add STBC TX support
Date: Sat, 04 May 2013 20:29:43 +0200 [thread overview]
Message-ID: <51855397.1020802@rempel-privat.de> (raw)
In-Reply-To: <CAJ-Vmok_kAfoO0DEwGCsmiqeokEnURNoaLU-860X1EgENGMogQ@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1534 bytes --]
Am 04.05.2013 19:50, schrieb Adrian Chadd:
> I've just reviewed it myself:
>
> * oan->stbc is enabled only if the hardware itself supports STBC; so
> it's an extra sanity check in case the firmware is told to enable STBC
> in the WMI capflag field.
all STBC parts are not compiled for AR9271. Currently firmware will do
sanity check on htc_7010.fw and always return 1, and wont do any check
on htc_9271.fw (this part is just not compiled).
> * is oan->htinfo used anywhere that may involve STBC?
hmm...oan->htinfo?
> * .. we should check whether ath9k_htc ever set the STBC flags on
> AR9271, or we'd end up confusing the hardware.
no, never. there are legion guardians ;) last on is on preparing tx
descriptor.
> * .. I don't think that is important though, as we weren't _doing_ STBC, right?
correct, currently STBC is not working on linux ath9k_htc
> * Why are the ATH_RC_* flags used in newassoc_11n? This comes from the
> WMI WMI_RC_STATE_CHANGE_CMDID capflag field; where are _those_
> defined?
they are in target_firmware/wlan/if_athrate.h
and well, there are a bit more problems thin them.
See attachment :) Attached patch can go on top of my merge request for
firmware. So, i will probably need to make Patch_v5 for ath9k_htc... since.
Felix,
> In addition to that, using the WLAN_RC_* flags is wrong, you need to use
> the ATH_RC_* flags,...
After some firmware cleaning i will need to use WLAN_RC_* flags :)
WLAN_RC_* have same values like ATH_RC_*...
> Grr, so many things to tidy up.
--
Regards,
Oleksij
[-- Attachment #2: tmp_2.diff --]
[-- Type: text/x-patch, Size: 2393 bytes --]
diff --git a/target_firmware/wlan/ratectrl11n.h b/target_firmware/wlan/ratectrl11n.h
index 64d0197..00fd156 100755
--- a/target_firmware/wlan/ratectrl11n.h
+++ b/target_firmware/wlan/ratectrl11n.h
@@ -156,20 +156,6 @@ typedef struct {
} RATE_TABLE_11N;
/*
- * Update the SIB's rate control information
- *
- * This should be called when the supported rates change
- * (e.g. SME operation, wireless mode change)
- *
- * It will determine which rates are valid for use.
- */
-void rcSibUpdate_11n(struct ath_softc_tgt *,
- struct ath_node_target *,
- A_UINT32 capflag,
- A_BOOL keepState,
- struct ieee80211_rate *rs);
-
-/*
* Determines and returns the new Tx rate index.
*/
void rcRateFind_11n(struct ath_softc_tgt *sc,
diff --git a/target_firmware/wlan/ratectrl_11n_ln.c b/target_firmware/wlan/ratectrl_11n_ln.c
index 52c1fc7..e64b254 100755
--- a/target_firmware/wlan/ratectrl_11n_ln.c
+++ b/target_firmware/wlan/ratectrl_11n_ln.c
@@ -429,19 +429,7 @@ rcSibUpdate_ht(struct ath_softc_tgt *sc, struct ath_node_target *an,
rcSortValidRates(pRateTable, pRc);
}
-void
-rcSibUpdate_11n(struct ath_softc_tgt *sc, struct ath_node_target *pSib,
- A_UINT32 capflag, A_BOOL keepState, struct ieee80211_rate *pRateSet)
-{
- rcSibUpdate_ht(sc,
- 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),
- keepState,
- pRateSet);
-}
+
/*
* Return the median of three numbers
@@ -1212,17 +1200,11 @@ ath_rate_newassoc_11n(struct ath_softc_tgt *sc, struct ath_node_target *an, int
if (isnew) {
struct atheros_node *oan = ATH_NODE_ATHEROS(an);
- oan->htcap = ((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_WEP_TKIP_FLAG) ? WLAN_RC_WEP_TKIP_FLAG : 0);
-
#ifdef MAGPIE_MERLIN
/* Only MERLIN can send STBC */
oan->stbc = (capflag & ATH_RC_RX_STBC_FLAG) ? 1 : 0;
#endif
- rcSibUpdate_11n(sc, an, oan->htcap, 0, rs);
+ rcSibUpdate_ht(sc, an, capflag, 0, rs);
}
}
next prev parent reply other threads:[~2013-05-04 18:29 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-02 8:11 [PATCH 0/2] work sync Oleksij Rempel
2013-05-02 8:11 ` [PATCH 1/2] ath9k_htc: add STBC TX support Oleksij Rempel
2013-05-02 16:55 ` Adrian Chadd
2013-05-02 17:32 ` Oleksij Rempel
2013-05-02 18:01 ` [ath9k-devel] " Felix Fietkau
2013-05-02 20:15 ` Adrian Chadd
2013-05-04 6:50 ` Oleksij Rempel
2013-05-04 6:55 ` Oleksij Rempel
2013-05-04 10:02 ` Felix Fietkau
2013-05-04 11:08 ` Oleksij Rempel
2013-05-04 11:16 ` Felix Fietkau
2013-05-04 11:28 ` Oleksij Rempel
2013-05-04 14:49 ` Adrian Chadd
2013-05-04 17:50 ` Adrian Chadd
2013-05-04 18:29 ` Oleksij Rempel [this message]
2013-05-04 7:33 ` [PATCH v2] " Oleksij Rempel
2013-05-04 10:59 ` [PATCH] " Oleksij Rempel
2013-05-04 11:32 ` [PATCH v4] " Oleksij Rempel
2013-05-02 20:32 ` [ath9k-devel] [PATCH 1/2] " Oleksij Rempel
2013-05-02 8:11 ` [PATCH 2/2] ath9k: remove useless flag conversation Oleksij Rempel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51855397.1020802@rempel-privat.de \
--to=linux@rempel-privat.de \
--cc=adrian@freebsd.org \
--cc=ath9k-devel@lists.ath9k.org \
--cc=linux-wireless@vger.kernel.org \
--cc=nbd@openwrt.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).