2 * Copyright (c) 2010 Broadcom Corporation
4 * Permission to use, copy, modify, and/or distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
11 * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
13 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
14 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
23 #include <bcmendian.h>
24 #include <proto/802.11.h>
32 #include <wlc_channel.h>
33 #include <wlc_bsscfg.h>
34 #include <wlc_mac80211.h>
36 #include <wl_export.h>
40 #define WLC_STF_SS_STBC_RX(wlc) (WLCISNPHY(wlc->band) && \
41 NREV_GT(wlc->band->phyrev, 3) && NREV_LE(wlc->band->phyrev, 6))
43 static int8
wlc_stf_stbc_rx_get(wlc_info_t
* wlc
);
44 static bool wlc_stf_stbc_tx_set(wlc_info_t
* wlc
, int32 int_val
);
45 static int wlc_stf_txcore_set(wlc_info_t
* wlc
, uint8 Nsts
, uint8 val
);
46 static int wlc_stf_spatial_policy_set(wlc_info_t
* wlc
, int val
);
47 static void wlc_stf_stbc_rx_ht_update(wlc_info_t
* wlc
, int val
);
49 static void _wlc_stf_phy_txant_upd(wlc_info_t
* wlc
);
50 static uint16
_wlc_stf_phytxchain_sel(wlc_info_t
* wlc
, ratespec_t rspec
);
56 const uint8 txcore_default
[5] = {
57 (0), /* bitmap of the core enabled */
58 (0x01), /* For Nsts = 1, enable core 1 */
59 (0x03), /* For Nsts = 2, enable core 1 & 2 */
60 (0x07), /* For Nsts = 3, enable core 1, 2 & 3 */
61 (0x0f) /* For Nsts = 4, enable all cores */
64 static void wlc_stf_stbc_rx_ht_update(wlc_info_t
* wlc
, int val
)
66 ASSERT((val
== HT_CAP_RX_STBC_NO
)
67 || (val
== HT_CAP_RX_STBC_ONE_STREAM
));
69 /* MIMOPHYs rev3-6 cannot receive STBC with only one rx core active */
70 if (WLC_STF_SS_STBC_RX(wlc
)) {
71 if ((wlc
->stf
->rxstreams
== 1) && (val
!= HT_CAP_RX_STBC_NO
))
75 wlc
->ht_cap
.cap
&= ~HT_CAP_RX_STBC_MASK
;
76 wlc
->ht_cap
.cap
|= (val
<< HT_CAP_RX_STBC_SHIFT
);
79 wlc_update_beacon(wlc
);
80 wlc_update_probe_resp(wlc
, TRUE
);
84 /* every WLC_TEMPSENSE_PERIOD seconds temperature check to decide whether to turn on/off txchain */
85 void wlc_tempsense_upd(wlc_info_t
* wlc
)
87 wlc_phy_t
*pi
= wlc
->band
->pi
;
88 uint active_chains
, txchain
;
90 /* Check if the chip is too hot. Disable one Tx chain, if it is */
91 /* high 4 bits are for Rx chain, low 4 bits are for Tx chain */
92 active_chains
= wlc_phy_stf_chain_active_get(pi
);
93 txchain
= active_chains
& 0xf;
95 if (wlc
->stf
->txchain
== wlc
->stf
->hw_txchain
) {
96 if (txchain
&& (txchain
< wlc
->stf
->hw_txchain
)) {
97 /* turn off 1 tx chain */
98 wlc_stf_txchain_set(wlc
, txchain
, TRUE
);
100 } else if (wlc
->stf
->txchain
< wlc
->stf
->hw_txchain
) {
101 if (txchain
== wlc
->stf
->hw_txchain
) {
102 /* turn back on txchain */
103 wlc_stf_txchain_set(wlc
, txchain
, TRUE
);
109 wlc_stf_ss_algo_channel_get(wlc_info_t
* wlc
, uint16
* ss_algo_channel
,
113 uint8 siso_mcs_id
, cdd_mcs_id
, stbc_mcs_id
;
115 /* Clear previous settings */
116 *ss_algo_channel
= 0;
119 *ss_algo_channel
= (uint16
) - 1;
123 wlc_phy_txpower_get_current(wlc
->band
->pi
, &power
,
124 CHSPEC_CHANNEL(chanspec
));
126 siso_mcs_id
= (CHSPEC_IS40(chanspec
)) ?
127 WL_TX_POWER_MCS40_SISO_FIRST
: WL_TX_POWER_MCS20_SISO_FIRST
;
128 cdd_mcs_id
= (CHSPEC_IS40(chanspec
)) ?
129 WL_TX_POWER_MCS40_CDD_FIRST
: WL_TX_POWER_MCS20_CDD_FIRST
;
130 stbc_mcs_id
= (CHSPEC_IS40(chanspec
)) ?
131 WL_TX_POWER_MCS40_STBC_FIRST
: WL_TX_POWER_MCS20_STBC_FIRST
;
133 /* criteria to choose stf mode */
135 /* the "+3dbm (12 0.25db units)" is to account for the fact that with CDD, tx occurs
138 if (power
.target
[siso_mcs_id
] > (power
.target
[cdd_mcs_id
] + 12))
139 setbit(ss_algo_channel
, PHY_TXC1_MODE_SISO
);
141 setbit(ss_algo_channel
, PHY_TXC1_MODE_CDD
);
143 /* STBC is ORed into to algo channel as STBC requires per-packet SCB capability check
144 * so cannot be default mode of operation. One of SISO, CDD have to be set
146 if (power
.target
[siso_mcs_id
] <= (power
.target
[stbc_mcs_id
] + 12))
147 setbit(ss_algo_channel
, PHY_TXC1_MODE_STBC
);
150 static int8
wlc_stf_stbc_rx_get(wlc_info_t
* wlc
)
152 return (wlc
->ht_cap
.cap
& HT_CAP_RX_STBC_MASK
) >> HT_CAP_RX_STBC_SHIFT
;
155 static bool wlc_stf_stbc_tx_set(wlc_info_t
* wlc
, int32 int_val
)
157 if ((int_val
!= AUTO
) && (int_val
!= OFF
) && (int_val
!= ON
)) {
161 if ((int_val
== ON
) && (wlc
->stf
->txstreams
== 1))
164 if ((int_val
== OFF
) || (wlc
->stf
->txstreams
== 1)
165 || !WLC_STBC_CAP_PHY(wlc
))
166 wlc
->ht_cap
.cap
&= ~HT_CAP_TX_STBC
;
168 wlc
->ht_cap
.cap
|= HT_CAP_TX_STBC
;
170 wlc
->bandstate
[BAND_2G_INDEX
]->band_stf_stbc_tx
= (int8
) int_val
;
171 wlc
->bandstate
[BAND_5G_INDEX
]->band_stf_stbc_tx
= (int8
) int_val
;
176 bool wlc_stf_stbc_rx_set(wlc_info_t
* wlc
, int32 int_val
)
178 if ((int_val
!= HT_CAP_RX_STBC_NO
)
179 && (int_val
!= HT_CAP_RX_STBC_ONE_STREAM
)) {
183 if (WLC_STF_SS_STBC_RX(wlc
)) {
184 if ((int_val
!= HT_CAP_RX_STBC_NO
)
185 && (wlc
->stf
->rxstreams
== 1))
189 wlc_stf_stbc_rx_ht_update(wlc
, int_val
);
193 static int wlc_stf_txcore_set(wlc_info_t
* wlc
, uint8 Nsts
, uint8 core_mask
)
195 WL_TRACE(("wl%d: %s: Nsts %d core_mask %x\n",
196 wlc
->pub
->unit
, __func__
, Nsts
, core_mask
));
198 ASSERT((Nsts
> 0) && (Nsts
<= MAX_STREAMS_SUPPORTED
));
200 if (WLC_BITSCNT(core_mask
) > wlc
->stf
->txstreams
) {
204 if ((WLC_BITSCNT(core_mask
) == wlc
->stf
->txstreams
) &&
205 ((core_mask
& ~wlc
->stf
->txchain
)
206 || !(core_mask
& wlc
->stf
->txchain
))) {
207 core_mask
= wlc
->stf
->txchain
;
210 ASSERT(!core_mask
|| Nsts
<= WLC_BITSCNT(core_mask
));
212 wlc
->stf
->txcore
[Nsts
] = core_mask
;
213 /* Nsts = 1..4, txcore index = 1..4 */
215 /* Needs to update beacon and ucode generated response
216 * frames when 1 stream core map changed
218 wlc
->stf
->phytxant
= core_mask
<< PHY_TXC_ANT_SHIFT
;
219 wlc_bmac_txant_set(wlc
->hw
, wlc
->stf
->phytxant
);
221 wlc_suspend_mac_and_wait(wlc
);
222 wlc_beacon_phytxctl_txant_upd(wlc
, wlc
->bcn_rspec
);
230 static int wlc_stf_spatial_policy_set(wlc_info_t
* wlc
, int val
)
235 WL_TRACE(("wl%d: %s: val %x\n", wlc
->pub
->unit
, __func__
, val
));
237 wlc
->stf
->spatial_policy
= (int8
) val
;
238 for (i
= 1; i
<= MAX_STREAMS_SUPPORTED
; i
++) {
239 core_mask
= (val
== MAX_SPATIAL_EXPANSION
) ?
240 wlc
->stf
->txchain
: txcore_default
[i
];
241 wlc_stf_txcore_set(wlc
, (uint8
) i
, core_mask
);
246 int wlc_stf_txchain_set(wlc_info_t
* wlc
, int32 int_val
, bool force
)
248 uint8 txchain
= (uint8
) int_val
;
252 if (wlc
->stf
->txchain
== txchain
)
255 if ((txchain
& ~wlc
->stf
->hw_txchain
)
256 || !(txchain
& wlc
->stf
->hw_txchain
))
259 /* if nrate override is configured to be non-SISO STF mode, reject reducing txchain to 1 */
260 txstreams
= (uint8
) WLC_BITSCNT(txchain
);
261 if (txstreams
> MAX_STREAMS_SUPPORTED
)
264 if (txstreams
== 1) {
265 for (i
= 0; i
< NBANDS(wlc
); i
++)
266 if ((RSPEC_STF(wlc
->bandstate
[i
]->rspec_override
) !=
268 || (RSPEC_STF(wlc
->bandstate
[i
]->mrspec_override
) !=
269 PHY_TXC1_MODE_SISO
)) {
273 /* over-write the override rspec */
274 if (RSPEC_STF(wlc
->bandstate
[i
]->rspec_override
)
275 != PHY_TXC1_MODE_SISO
) {
276 wlc
->bandstate
[i
]->rspec_override
= 0;
277 WL_ERROR(("%s(): temp sense override non-SISO" " rspec_override.\n", __func__
));
280 (wlc
->bandstate
[i
]->mrspec_override
) !=
281 PHY_TXC1_MODE_SISO
) {
282 wlc
->bandstate
[i
]->mrspec_override
= 0;
283 WL_ERROR(("%s(): temp sense override non-SISO" " mrspec_override.\n", __func__
));
288 wlc
->stf
->txchain
= txchain
;
289 wlc
->stf
->txstreams
= txstreams
;
290 wlc_stf_stbc_tx_set(wlc
, wlc
->band
->band_stf_stbc_tx
);
291 wlc_stf_ss_update(wlc
, wlc
->bandstate
[BAND_2G_INDEX
]);
292 wlc_stf_ss_update(wlc
, wlc
->bandstate
[BAND_5G_INDEX
]);
294 (wlc
->stf
->txstreams
== 1) ? ANT_TX_FORCE_0
: ANT_TX_DEF
;
295 _wlc_stf_phy_txant_upd(wlc
);
297 wlc_phy_stf_chain_set(wlc
->band
->pi
, wlc
->stf
->txchain
,
300 for (i
= 1; i
<= MAX_STREAMS_SUPPORTED
; i
++)
301 wlc_stf_txcore_set(wlc
, (uint8
) i
, txcore_default
[i
]);
306 int wlc_stf_rxchain_set(wlc_info_t
* wlc
, int32 int_val
)
309 uint8 rxchain
= (uint8
) int_val
;
311 uint8 old_rxchain
, old_rxchain_cnt
;
313 if (wlc
->stf
->rxchain
== rxchain
)
316 if ((rxchain
& ~wlc
->stf
->hw_rxchain
)
317 || !(rxchain
& wlc
->stf
->hw_rxchain
))
320 rxchain_cnt
= (uint8
) WLC_BITSCNT(rxchain
);
321 if (WLC_STF_SS_STBC_RX(wlc
)) {
322 if ((rxchain_cnt
== 1)
323 && (wlc_stf_stbc_rx_get(wlc
) != HT_CAP_RX_STBC_NO
))
327 if (APSTA_ENAB(wlc
->pub
) && (wlc
->pub
->associated
))
328 return BCME_ASSOCIATED
;
330 old_rxchain
= wlc
->stf
->rxchain
;
331 old_rxchain_cnt
= wlc
->stf
->rxstreams
;
333 wlc
->stf
->rxchain
= rxchain
;
334 wlc
->stf
->rxstreams
= rxchain_cnt
;
336 if (rxchain_cnt
!= old_rxchain_cnt
) {
338 (rxchain_cnt
== 1) ? HT_CAP_MIMO_PS_ON
: HT_CAP_MIMO_PS_OFF
;
339 wlc
->mimops_PM
= mimops_mode
;
340 if (AP_ENAB(wlc
->pub
)) {
341 wlc_phy_stf_chain_set(wlc
->band
->pi
, wlc
->stf
->txchain
,
343 wlc_ht_mimops_cap_update(wlc
, mimops_mode
);
344 if (wlc
->pub
->associated
)
345 wlc_mimops_action_ht_send(wlc
, wlc
->cfg
,
349 if (wlc
->pub
->associated
) {
350 if (mimops_mode
== HT_CAP_MIMO_PS_OFF
) {
351 /* if mimops is off, turn on the Rx chain first */
352 wlc_phy_stf_chain_set(wlc
->band
->pi
,
355 wlc_ht_mimops_cap_update(wlc
, mimops_mode
);
358 wlc_phy_stf_chain_set(wlc
->band
->pi
, wlc
->stf
->txchain
,
360 wlc_ht_mimops_cap_update(wlc
, mimops_mode
);
362 } else if (old_rxchain
!= rxchain
)
363 wlc_phy_stf_chain_set(wlc
->band
->pi
, wlc
->stf
->txchain
,
369 /* update wlc->stf->ss_opmode which represents the operational stf_ss mode we're using */
370 int wlc_stf_ss_update(wlc_info_t
* wlc
, wlcband_t
* band
)
376 prev_stf_ss
= wlc
->stf
->ss_opmode
;
378 /* NOTE: opmode can only be SISO or CDD as STBC is decided on a per-packet basis */
379 if (WLC_STBC_CAP_PHY(wlc
) &&
380 wlc
->stf
->ss_algosel_auto
381 && (wlc
->stf
->ss_algo_channel
!= (uint16
) - 1)) {
382 ASSERT(isset(&wlc
->stf
->ss_algo_channel
, PHY_TXC1_MODE_CDD
)
383 || isset(&wlc
->stf
->ss_algo_channel
,
384 PHY_TXC1_MODE_SISO
));
385 upd_stf_ss
= (wlc
->stf
->no_cddstbc
|| (wlc
->stf
->txstreams
== 1)
386 || isset(&wlc
->stf
->ss_algo_channel
,
387 PHY_TXC1_MODE_SISO
)) ? PHY_TXC1_MODE_SISO
390 if (wlc
->band
!= band
)
392 upd_stf_ss
= (wlc
->stf
->no_cddstbc
393 || (wlc
->stf
->txstreams
==
394 1)) ? PHY_TXC1_MODE_SISO
: band
->
397 if (prev_stf_ss
!= upd_stf_ss
) {
398 wlc
->stf
->ss_opmode
= upd_stf_ss
;
399 wlc_bmac_band_stf_ss_set(wlc
->hw
, upd_stf_ss
);
405 int BCMATTACHFN(wlc_stf_attach
) (wlc_info_t
* wlc
) {
406 wlc
->bandstate
[BAND_2G_INDEX
]->band_stf_ss_mode
= PHY_TXC1_MODE_SISO
;
407 wlc
->bandstate
[BAND_5G_INDEX
]->band_stf_ss_mode
= PHY_TXC1_MODE_CDD
;
409 if (WLCISNPHY(wlc
->band
) &&
410 (wlc_phy_txpower_hw_ctrl_get(wlc
->band
->pi
) != PHY_TPC_HW_ON
))
411 wlc
->bandstate
[BAND_2G_INDEX
]->band_stf_ss_mode
=
413 wlc_stf_ss_update(wlc
, wlc
->bandstate
[BAND_2G_INDEX
]);
414 wlc_stf_ss_update(wlc
, wlc
->bandstate
[BAND_5G_INDEX
]);
416 wlc_stf_stbc_rx_ht_update(wlc
, HT_CAP_RX_STBC_NO
);
417 wlc
->bandstate
[BAND_2G_INDEX
]->band_stf_stbc_tx
= OFF
;
418 wlc
->bandstate
[BAND_5G_INDEX
]->band_stf_stbc_tx
= OFF
;
420 if (WLC_STBC_CAP_PHY(wlc
)) {
421 wlc
->stf
->ss_algosel_auto
= TRUE
;
422 wlc
->stf
->ss_algo_channel
= (uint16
) - 1; /* Init the default value */
427 void BCMATTACHFN(wlc_stf_detach
) (wlc_info_t
* wlc
) {
430 int wlc_stf_ant_txant_validate(wlc_info_t
* wlc
, int8 val
)
432 int bcmerror
= BCME_OK
;
434 /* when there is only 1 tx_streams, don't allow to change the txant */
435 if (WLCISNPHY(wlc
->band
) && (wlc
->stf
->txstreams
== 1))
436 return ((val
== wlc
->stf
->txant
) ? bcmerror
: BCME_RANGE
);
443 val
= ANT_TX_FORCE_0
;
446 val
= ANT_TX_FORCE_1
;
449 val
= ANT_TX_LAST_RX
;
452 bcmerror
= BCME_RANGE
;
456 if (bcmerror
== BCME_OK
)
457 wlc
->stf
->txant
= (int8
) val
;
464 * Centralized txant update function. call it whenever wlc->stf->txant and/or wlc->stf->txchain
467 * Antennas are controlled by ucode indirectly, which drives PHY or GPIO to
468 * achieve various tx/rx antenna selection schemes
470 * legacy phy, bit 6 and bit 7 means antenna 0 and 1 respectively, bit6+bit7 means auto(last rx)
471 * for NREV<3, bit 6 and bit 7 means antenna 0 and 1 respectively, bit6+bit7 means last rx and
472 * do tx-antenna selection for SISO transmissions
473 * for NREV=3, bit 6 and bit _8_ means antenna 0 and 1 respectively, bit6+bit7 means last rx and
474 * do tx-antenna selection for SISO transmissions
475 * for NREV>=7, bit 6 and bit 7 mean antenna 0 and 1 respectively, nit6+bit7 means both cores active
477 static void _wlc_stf_phy_txant_upd(wlc_info_t
* wlc
)
481 txant
= (int8
) wlc
->stf
->txant
;
482 ASSERT(txant
== ANT_TX_FORCE_0
|| txant
== ANT_TX_FORCE_1
483 || txant
== ANT_TX_LAST_RX
);
485 if (WLC_PHY_11N_CAP(wlc
->band
)) {
486 if (txant
== ANT_TX_FORCE_0
) {
487 wlc
->stf
->phytxant
= PHY_TXC_ANT_0
;
488 } else if (txant
== ANT_TX_FORCE_1
) {
489 wlc
->stf
->phytxant
= PHY_TXC_ANT_1
;
491 if (WLCISNPHY(wlc
->band
) &&
492 NREV_GE(wlc
->band
->phyrev
, 3)
493 && NREV_LT(wlc
->band
->phyrev
, 7)) {
494 wlc
->stf
->phytxant
= PHY_TXC_ANT_2
;
497 if (WLCISLCNPHY(wlc
->band
) || WLCISSSLPNPHY(wlc
->band
))
498 wlc
->stf
->phytxant
= PHY_TXC_LCNPHY_ANT_LAST
;
500 /* keep this assert to catch out of sync wlc->stf->txcore */
501 ASSERT(wlc
->stf
->txchain
> 0);
503 wlc
->stf
->txchain
<< PHY_TXC_ANT_SHIFT
;
507 if (txant
== ANT_TX_FORCE_0
)
508 wlc
->stf
->phytxant
= PHY_TXC_OLD_ANT_0
;
509 else if (txant
== ANT_TX_FORCE_1
)
510 wlc
->stf
->phytxant
= PHY_TXC_OLD_ANT_1
;
512 wlc
->stf
->phytxant
= PHY_TXC_OLD_ANT_LAST
;
515 wlc_bmac_txant_set(wlc
->hw
, wlc
->stf
->phytxant
);
518 void wlc_stf_phy_txant_upd(wlc_info_t
* wlc
)
520 _wlc_stf_phy_txant_upd(wlc
);
523 void BCMATTACHFN(wlc_stf_phy_chain_calc
) (wlc_info_t
* wlc
) {
524 /* get available rx/tx chains */
525 wlc
->stf
->hw_txchain
= (uint8
) getintvar(wlc
->pub
->vars
, "txchain");
526 wlc
->stf
->hw_rxchain
= (uint8
) getintvar(wlc
->pub
->vars
, "rxchain");
528 /* these parameter are intended to be used for all PHY types */
529 if (wlc
->stf
->hw_txchain
== 0 || wlc
->stf
->hw_txchain
== 0xf) {
530 if (WLCISNPHY(wlc
->band
)) {
531 wlc
->stf
->hw_txchain
= TXCHAIN_DEF_NPHY
;
533 wlc
->stf
->hw_txchain
= TXCHAIN_DEF
;
537 wlc
->stf
->txchain
= wlc
->stf
->hw_txchain
;
538 wlc
->stf
->txstreams
= (uint8
) WLC_BITSCNT(wlc
->stf
->hw_txchain
);
540 if (wlc
->stf
->hw_rxchain
== 0 || wlc
->stf
->hw_rxchain
== 0xf) {
541 if (WLCISNPHY(wlc
->band
)) {
542 wlc
->stf
->hw_rxchain
= RXCHAIN_DEF_NPHY
;
544 wlc
->stf
->hw_rxchain
= RXCHAIN_DEF
;
548 wlc
->stf
->rxchain
= wlc
->stf
->hw_rxchain
;
549 wlc
->stf
->rxstreams
= (uint8
) WLC_BITSCNT(wlc
->stf
->hw_rxchain
);
551 /* initialize the txcore table */
552 bcopy(txcore_default
, wlc
->stf
->txcore
, sizeof(wlc
->stf
->txcore
));
554 /* default spatial_policy */
555 wlc
->stf
->spatial_policy
= MIN_SPATIAL_EXPANSION
;
556 wlc_stf_spatial_policy_set(wlc
, MIN_SPATIAL_EXPANSION
);
559 static uint16
_wlc_stf_phytxchain_sel(wlc_info_t
* wlc
, ratespec_t rspec
)
561 uint16 phytxant
= wlc
->stf
->phytxant
;
563 if (RSPEC_STF(rspec
) != PHY_TXC1_MODE_SISO
) {
564 ASSERT(wlc
->stf
->txstreams
> 1);
565 phytxant
= wlc
->stf
->txchain
<< PHY_TXC_ANT_SHIFT
;
566 } else if (wlc
->stf
->txant
== ANT_TX_DEF
)
567 phytxant
= wlc
->stf
->txchain
<< PHY_TXC_ANT_SHIFT
;
568 phytxant
&= PHY_TXC_ANT_MASK
;
572 uint16
wlc_stf_phytxchain_sel(wlc_info_t
* wlc
, ratespec_t rspec
)
574 return _wlc_stf_phytxchain_sel(wlc
, rspec
);
577 uint16
wlc_stf_d11hdrs_phyctl_txant(wlc_info_t
* wlc
, ratespec_t rspec
)
579 uint16 phytxant
= wlc
->stf
->phytxant
;
580 uint16 mask
= PHY_TXC_ANT_MASK
;
582 /* for non-siso rates or default setting, use the available chains */
583 if (WLCISNPHY(wlc
->band
)) {
584 ASSERT(wlc
->stf
->txchain
!= 0);
585 phytxant
= _wlc_stf_phytxchain_sel(wlc
, rspec
);
586 mask
= PHY_TXC_HTANT_MASK
;
588 phytxant
|= phytxant
& mask
;