Skip to content
Permalink
Browse files

Used an array to map rx antenna number for HT cap.

Signed-off-by: David Lin <dlin@marvell.com>
  • Loading branch information
yuhhaurlin committed Jun 19, 2018
1 parent 8683de8 commit 226036d9deea09b0f76d1d6725d7754515d5e1c9
Showing with 5 additions and 7 deletions.
  1. +4 −7 core.c
  2. +1 −0 core.h
11 core.c
@@ -417,6 +417,8 @@ static void mwl_set_ht_caps(struct mwl_priv *priv,
struct ieee80211_supported_band *band)
{
struct ieee80211_hw *hw;
const u8 ant_rx_no[ANTENNA_RX_MAX] = { 3, 1, 2, 3};
int i;

hw = priv->hw;

@@ -441,13 +443,8 @@ static void mwl_set_ht_caps(struct mwl_priv *priv,
band->ht_cap.ampdu_factor = IEEE80211_HT_MAX_AMPDU_64K;
band->ht_cap.ampdu_density = IEEE80211_HT_MPDU_DENSITY_4;

band->ht_cap.mcs.rx_mask[0] = 0xff;
if (priv->antenna_rx == ANTENNA_RX_2)
band->ht_cap.mcs.rx_mask[1] = 0xff;
if (priv->antenna_rx == ANTENNA_RX_4_AUTO) {
band->ht_cap.mcs.rx_mask[1] = 0xff;
band->ht_cap.mcs.rx_mask[2] = 0xff;
}
for (i = 0; i < ant_rx_no[priv->antenna_rx]; i++)
band->ht_cap.mcs.rx_mask[i] = 0xff;
band->ht_cap.mcs.rx_mask[4] = 0x01;

band->ht_cap.mcs.tx_params = IEEE80211_HT_MCS_TX_DEFINED;
1 core.h
@@ -34,6 +34,7 @@
#define ANTENNA_RX_1 1
#define ANTENNA_RX_2 2
#define ANTENNA_RX_3 3
#define ANTENNA_RX_MAX 4

/* band related constants */
#define BAND_24_CHANNEL_NUM 14

0 comments on commit 226036d

Please sign in to comment.
You can’t perform that action at this time.