mirror of https://gitee.com/openkylin/linux.git
wlcore: set wl->ht_cap per-band
Save the ht_cap IE per-band, so we can configure different params to BG and A bands (we currently don't support MIMO on A band) [Small fix for rx_highest - Arik] Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
This commit is contained in:
parent
a121a5b8ab
commit
bfb92ca133
|
@ -1423,7 +1423,10 @@ static int __devinit wl12xx_probe(struct platform_device *pdev)
|
||||||
wl->hw_min_ht_rate = WL12XX_CONF_HW_RXTX_RATE_MCS0;
|
wl->hw_min_ht_rate = WL12XX_CONF_HW_RXTX_RATE_MCS0;
|
||||||
wl->fw_status_priv_len = 0;
|
wl->fw_status_priv_len = 0;
|
||||||
wl->stats.fw_stats_len = sizeof(struct wl12xx_acx_statistics);
|
wl->stats.fw_stats_len = sizeof(struct wl12xx_acx_statistics);
|
||||||
memcpy(&wl->ht_cap, &wl12xx_ht_cap, sizeof(wl12xx_ht_cap));
|
memcpy(&wl->ht_cap[IEEE80211_BAND_2GHZ], &wl12xx_ht_cap,
|
||||||
|
sizeof(wl12xx_ht_cap));
|
||||||
|
memcpy(&wl->ht_cap[IEEE80211_BAND_5GHZ], &wl12xx_ht_cap,
|
||||||
|
sizeof(wl12xx_ht_cap));
|
||||||
wl12xx_conf_init(wl);
|
wl12xx_conf_init(wl);
|
||||||
|
|
||||||
if (!fref_param) {
|
if (!fref_param) {
|
||||||
|
|
|
@ -596,7 +596,7 @@ static int wl18xx_identify_chip(struct wl1271 *wl)
|
||||||
WLCORE_QUIRK_TX_BLOCKSIZE_ALIGN;
|
WLCORE_QUIRK_TX_BLOCKSIZE_ALIGN;
|
||||||
|
|
||||||
/* PG 1.0 has some problems with MCS_13, so disable it */
|
/* PG 1.0 has some problems with MCS_13, so disable it */
|
||||||
wl->ht_cap.mcs.rx_mask[1] &= ~BIT(5);
|
wl->ht_cap[IEEE80211_BAND_2GHZ].mcs.rx_mask[1] &= ~BIT(5);
|
||||||
|
|
||||||
/* TODO: need to blocksize alignment for RX/TX separately? */
|
/* TODO: need to blocksize alignment for RX/TX separately? */
|
||||||
break;
|
break;
|
||||||
|
@ -1086,7 +1086,7 @@ static struct ieee80211_sta_ht_cap wl18xx_siso20_ht_cap = {
|
||||||
};
|
};
|
||||||
|
|
||||||
/* HT cap appropriate for MIMO rates in 20mhz channel */
|
/* HT cap appropriate for MIMO rates in 20mhz channel */
|
||||||
static struct ieee80211_sta_ht_cap wl18xx_mimo_ht_cap = {
|
static struct ieee80211_sta_ht_cap wl18xx_mimo_ht_cap_2ghz = {
|
||||||
.cap = IEEE80211_HT_CAP_SGI_20,
|
.cap = IEEE80211_HT_CAP_SGI_20,
|
||||||
.ht_supported = true,
|
.ht_supported = true,
|
||||||
.ampdu_factor = IEEE80211_HT_MAX_AMPDU_16K,
|
.ampdu_factor = IEEE80211_HT_MAX_AMPDU_16K,
|
||||||
|
@ -1098,6 +1098,18 @@ static struct ieee80211_sta_ht_cap wl18xx_mimo_ht_cap = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static struct ieee80211_sta_ht_cap wl18xx_mimo_ht_cap_5ghz = {
|
||||||
|
.cap = IEEE80211_HT_CAP_SGI_20,
|
||||||
|
.ht_supported = true,
|
||||||
|
.ampdu_factor = IEEE80211_HT_MAX_AMPDU_16K,
|
||||||
|
.ampdu_density = IEEE80211_HT_MPDU_DENSITY_16,
|
||||||
|
.mcs = {
|
||||||
|
.rx_mask = { 0xff, 0, 0, 0, 0, 0, 0, 0, 0, 0, },
|
||||||
|
.rx_highest = cpu_to_le16(72),
|
||||||
|
.tx_params = IEEE80211_HT_MCS_TX_DEFINED,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
static int __devinit wl18xx_probe(struct platform_device *pdev)
|
static int __devinit wl18xx_probe(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct wl1271 *wl;
|
struct wl1271 *wl;
|
||||||
|
@ -1127,13 +1139,25 @@ static int __devinit wl18xx_probe(struct platform_device *pdev)
|
||||||
wl->static_data_priv_len = sizeof(struct wl18xx_static_data_priv);
|
wl->static_data_priv_len = sizeof(struct wl18xx_static_data_priv);
|
||||||
|
|
||||||
if (!strcmp(ht_mode_param, "wide")) {
|
if (!strcmp(ht_mode_param, "wide")) {
|
||||||
memcpy(&wl->ht_cap, &wl18xx_siso40_ht_cap,
|
memcpy(&wl->ht_cap[IEEE80211_BAND_2GHZ],
|
||||||
|
&wl18xx_siso40_ht_cap,
|
||||||
|
sizeof(wl18xx_siso40_ht_cap));
|
||||||
|
memcpy(&wl->ht_cap[IEEE80211_BAND_5GHZ],
|
||||||
|
&wl18xx_siso40_ht_cap,
|
||||||
sizeof(wl18xx_siso40_ht_cap));
|
sizeof(wl18xx_siso40_ht_cap));
|
||||||
} else if (!strcmp(ht_mode_param, "mimo")) {
|
} else if (!strcmp(ht_mode_param, "mimo")) {
|
||||||
memcpy(&wl->ht_cap, &wl18xx_mimo_ht_cap,
|
memcpy(&wl->ht_cap[IEEE80211_BAND_2GHZ],
|
||||||
sizeof(wl18xx_mimo_ht_cap));
|
&wl18xx_mimo_ht_cap_2ghz,
|
||||||
|
sizeof(wl18xx_mimo_ht_cap_2ghz));
|
||||||
|
memcpy(&wl->ht_cap[IEEE80211_BAND_5GHZ],
|
||||||
|
&wl18xx_mimo_ht_cap_5ghz,
|
||||||
|
sizeof(wl18xx_mimo_ht_cap_5ghz));
|
||||||
} else if (!strcmp(ht_mode_param, "siso20")) {
|
} else if (!strcmp(ht_mode_param, "siso20")) {
|
||||||
memcpy(&wl->ht_cap, &wl18xx_siso20_ht_cap,
|
memcpy(&wl->ht_cap[IEEE80211_BAND_2GHZ],
|
||||||
|
&wl18xx_siso20_ht_cap,
|
||||||
|
sizeof(wl18xx_siso20_ht_cap));
|
||||||
|
memcpy(&wl->ht_cap[IEEE80211_BAND_5GHZ],
|
||||||
|
&wl18xx_siso20_ht_cap,
|
||||||
sizeof(wl18xx_siso20_ht_cap));
|
sizeof(wl18xx_siso20_ht_cap));
|
||||||
} else {
|
} else {
|
||||||
wl1271_error("invalid ht_mode '%s'", ht_mode_param);
|
wl1271_error("invalid ht_mode '%s'", ht_mode_param);
|
||||||
|
|
|
@ -5031,12 +5031,14 @@ static int wl1271_init_ieee80211(struct wl1271 *wl)
|
||||||
*/
|
*/
|
||||||
memcpy(&wl->bands[IEEE80211_BAND_2GHZ], &wl1271_band_2ghz,
|
memcpy(&wl->bands[IEEE80211_BAND_2GHZ], &wl1271_band_2ghz,
|
||||||
sizeof(wl1271_band_2ghz));
|
sizeof(wl1271_band_2ghz));
|
||||||
memcpy(&wl->bands[IEEE80211_BAND_2GHZ].ht_cap, &wl->ht_cap,
|
memcpy(&wl->bands[IEEE80211_BAND_2GHZ].ht_cap,
|
||||||
sizeof(wl->ht_cap));
|
&wl->ht_cap[IEEE80211_BAND_2GHZ],
|
||||||
|
sizeof(*wl->ht_cap));
|
||||||
memcpy(&wl->bands[IEEE80211_BAND_5GHZ], &wl1271_band_5ghz,
|
memcpy(&wl->bands[IEEE80211_BAND_5GHZ], &wl1271_band_5ghz,
|
||||||
sizeof(wl1271_band_5ghz));
|
sizeof(wl1271_band_5ghz));
|
||||||
memcpy(&wl->bands[IEEE80211_BAND_5GHZ].ht_cap, &wl->ht_cap,
|
memcpy(&wl->bands[IEEE80211_BAND_5GHZ].ht_cap,
|
||||||
sizeof(wl->ht_cap));
|
&wl->ht_cap[IEEE80211_BAND_5GHZ],
|
||||||
|
sizeof(*wl->ht_cap));
|
||||||
|
|
||||||
wl->hw->wiphy->bands[IEEE80211_BAND_2GHZ] =
|
wl->hw->wiphy->bands[IEEE80211_BAND_2GHZ] =
|
||||||
&wl->bands[IEEE80211_BAND_2GHZ];
|
&wl->bands[IEEE80211_BAND_2GHZ];
|
||||||
|
|
|
@ -368,7 +368,7 @@ struct wl1271 {
|
||||||
u8 hw_min_ht_rate;
|
u8 hw_min_ht_rate;
|
||||||
|
|
||||||
/* HW HT (11n) capabilities */
|
/* HW HT (11n) capabilities */
|
||||||
struct ieee80211_sta_ht_cap ht_cap;
|
struct ieee80211_sta_ht_cap ht_cap[IEEE80211_NUM_BANDS];
|
||||||
|
|
||||||
/* size of the private FW status data */
|
/* size of the private FW status data */
|
||||||
size_t fw_status_priv_len;
|
size_t fw_status_priv_len;
|
||||||
|
|
Loading…
Reference in New Issue