diff options
author | Eliad Peller <eliad@wizery.com> | 2012-05-15 10:09:00 -0400 |
---|---|---|
committer | Luciano Coelho <coelho@ti.com> | 2012-06-05 10:16:09 -0400 |
commit | bfb92ca1332ce0073cfba5d8a7caee214ed3a787 (patch) | |
tree | 85c920ed543732e9b9c2c0277079e3a0dbd0143c /drivers | |
parent | a121a5b8aba4294b1557e1099c4eaa7c6578d7ce (diff) |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/ti/wl12xx/main.c | 5 | ||||
-rw-r--r-- | drivers/net/wireless/ti/wl18xx/main.c | 36 | ||||
-rw-r--r-- | drivers/net/wireless/ti/wlcore/main.c | 10 | ||||
-rw-r--r-- | drivers/net/wireless/ti/wlcore/wlcore.h | 2 |
4 files changed, 41 insertions, 12 deletions
diff --git a/drivers/net/wireless/ti/wl12xx/main.c b/drivers/net/wireless/ti/wl12xx/main.c index e400d1987e6c..774a1b71e84e 100644 --- a/drivers/net/wireless/ti/wl12xx/main.c +++ b/drivers/net/wireless/ti/wl12xx/main.c | |||
@@ -1423,7 +1423,10 @@ static int __devinit wl12xx_probe(struct platform_device *pdev) | |||
1423 | wl->hw_min_ht_rate = WL12XX_CONF_HW_RXTX_RATE_MCS0; | 1423 | wl->hw_min_ht_rate = WL12XX_CONF_HW_RXTX_RATE_MCS0; |
1424 | wl->fw_status_priv_len = 0; | 1424 | wl->fw_status_priv_len = 0; |
1425 | wl->stats.fw_stats_len = sizeof(struct wl12xx_acx_statistics); | 1425 | wl->stats.fw_stats_len = sizeof(struct wl12xx_acx_statistics); |
1426 | memcpy(&wl->ht_cap, &wl12xx_ht_cap, sizeof(wl12xx_ht_cap)); | 1426 | memcpy(&wl->ht_cap[IEEE80211_BAND_2GHZ], &wl12xx_ht_cap, |
1427 | sizeof(wl12xx_ht_cap)); | ||
1428 | memcpy(&wl->ht_cap[IEEE80211_BAND_5GHZ], &wl12xx_ht_cap, | ||
1429 | sizeof(wl12xx_ht_cap)); | ||
1427 | wl12xx_conf_init(wl); | 1430 | wl12xx_conf_init(wl); |
1428 | 1431 | ||
1429 | if (!fref_param) { | 1432 | if (!fref_param) { |
diff --git a/drivers/net/wireless/ti/wl18xx/main.c b/drivers/net/wireless/ti/wl18xx/main.c index 5a6c4cc9577e..6cd61186d06c 100644 --- a/drivers/net/wireless/ti/wl18xx/main.c +++ b/drivers/net/wireless/ti/wl18xx/main.c | |||
@@ -596,7 +596,7 @@ static int wl18xx_identify_chip(struct wl1271 *wl) | |||
596 | WLCORE_QUIRK_TX_BLOCKSIZE_ALIGN; | 596 | WLCORE_QUIRK_TX_BLOCKSIZE_ALIGN; |
597 | 597 | ||
598 | /* PG 1.0 has some problems with MCS_13, so disable it */ | 598 | /* PG 1.0 has some problems with MCS_13, so disable it */ |
599 | wl->ht_cap.mcs.rx_mask[1] &= ~BIT(5); | 599 | wl->ht_cap[IEEE80211_BAND_2GHZ].mcs.rx_mask[1] &= ~BIT(5); |
600 | 600 | ||
601 | /* TODO: need to blocksize alignment for RX/TX separately? */ | 601 | /* TODO: need to blocksize alignment for RX/TX separately? */ |
602 | break; | 602 | break; |
@@ -1086,7 +1086,7 @@ static struct ieee80211_sta_ht_cap wl18xx_siso20_ht_cap = { | |||
1086 | }; | 1086 | }; |
1087 | 1087 | ||
1088 | /* HT cap appropriate for MIMO rates in 20mhz channel */ | 1088 | /* HT cap appropriate for MIMO rates in 20mhz channel */ |
1089 | static struct ieee80211_sta_ht_cap wl18xx_mimo_ht_cap = { | 1089 | static struct ieee80211_sta_ht_cap wl18xx_mimo_ht_cap_2ghz = { |
1090 | .cap = IEEE80211_HT_CAP_SGI_20, | 1090 | .cap = IEEE80211_HT_CAP_SGI_20, |
1091 | .ht_supported = true, | 1091 | .ht_supported = true, |
1092 | .ampdu_factor = IEEE80211_HT_MAX_AMPDU_16K, | 1092 | .ampdu_factor = IEEE80211_HT_MAX_AMPDU_16K, |
@@ -1098,6 +1098,18 @@ static struct ieee80211_sta_ht_cap wl18xx_mimo_ht_cap = { | |||
1098 | }, | 1098 | }, |
1099 | }; | 1099 | }; |
1100 | 1100 | ||
1101 | static struct ieee80211_sta_ht_cap wl18xx_mimo_ht_cap_5ghz = { | ||
1102 | .cap = IEEE80211_HT_CAP_SGI_20, | ||
1103 | .ht_supported = true, | ||
1104 | .ampdu_factor = IEEE80211_HT_MAX_AMPDU_16K, | ||
1105 | .ampdu_density = IEEE80211_HT_MPDU_DENSITY_16, | ||
1106 | .mcs = { | ||
1107 | .rx_mask = { 0xff, 0, 0, 0, 0, 0, 0, 0, 0, 0, }, | ||
1108 | .rx_highest = cpu_to_le16(72), | ||
1109 | .tx_params = IEEE80211_HT_MCS_TX_DEFINED, | ||
1110 | }, | ||
1111 | }; | ||
1112 | |||
1101 | static int __devinit wl18xx_probe(struct platform_device *pdev) | 1113 | static int __devinit wl18xx_probe(struct platform_device *pdev) |
1102 | { | 1114 | { |
1103 | struct wl1271 *wl; | 1115 | struct wl1271 *wl; |
@@ -1127,13 +1139,25 @@ static int __devinit wl18xx_probe(struct platform_device *pdev) | |||
1127 | wl->static_data_priv_len = sizeof(struct wl18xx_static_data_priv); | 1139 | wl->static_data_priv_len = sizeof(struct wl18xx_static_data_priv); |
1128 | 1140 | ||
1129 | if (!strcmp(ht_mode_param, "wide")) { | 1141 | if (!strcmp(ht_mode_param, "wide")) { |
1130 | memcpy(&wl->ht_cap, &wl18xx_siso40_ht_cap, | 1142 | memcpy(&wl->ht_cap[IEEE80211_BAND_2GHZ], |
1143 | &wl18xx_siso40_ht_cap, | ||
1144 | sizeof(wl18xx_siso40_ht_cap)); | ||
1145 | memcpy(&wl->ht_cap[IEEE80211_BAND_5GHZ], | ||
1146 | &wl18xx_siso40_ht_cap, | ||
1131 | sizeof(wl18xx_siso40_ht_cap)); | 1147 | sizeof(wl18xx_siso40_ht_cap)); |
1132 | } else if (!strcmp(ht_mode_param, "mimo")) { | 1148 | } else if (!strcmp(ht_mode_param, "mimo")) { |
1133 | memcpy(&wl->ht_cap, &wl18xx_mimo_ht_cap, | 1149 | memcpy(&wl->ht_cap[IEEE80211_BAND_2GHZ], |
1134 | sizeof(wl18xx_mimo_ht_cap)); | 1150 | &wl18xx_mimo_ht_cap_2ghz, |
1151 | sizeof(wl18xx_mimo_ht_cap_2ghz)); | ||
1152 | memcpy(&wl->ht_cap[IEEE80211_BAND_5GHZ], | ||
1153 | &wl18xx_mimo_ht_cap_5ghz, | ||
1154 | sizeof(wl18xx_mimo_ht_cap_5ghz)); | ||
1135 | } else if (!strcmp(ht_mode_param, "siso20")) { | 1155 | } else if (!strcmp(ht_mode_param, "siso20")) { |
1136 | memcpy(&wl->ht_cap, &wl18xx_siso20_ht_cap, | 1156 | memcpy(&wl->ht_cap[IEEE80211_BAND_2GHZ], |
1157 | &wl18xx_siso20_ht_cap, | ||
1158 | sizeof(wl18xx_siso20_ht_cap)); | ||
1159 | memcpy(&wl->ht_cap[IEEE80211_BAND_5GHZ], | ||
1160 | &wl18xx_siso20_ht_cap, | ||
1137 | sizeof(wl18xx_siso20_ht_cap)); | 1161 | sizeof(wl18xx_siso20_ht_cap)); |
1138 | } else { | 1162 | } else { |
1139 | wl1271_error("invalid ht_mode '%s'", ht_mode_param); | 1163 | wl1271_error("invalid ht_mode '%s'", ht_mode_param); |
diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c index 1974be0ccd58..c08df334b9d5 100644 --- a/drivers/net/wireless/ti/wlcore/main.c +++ b/drivers/net/wireless/ti/wlcore/main.c | |||
@@ -5031,12 +5031,14 @@ static int wl1271_init_ieee80211(struct wl1271 *wl) | |||
5031 | */ | 5031 | */ |
5032 | memcpy(&wl->bands[IEEE80211_BAND_2GHZ], &wl1271_band_2ghz, | 5032 | memcpy(&wl->bands[IEEE80211_BAND_2GHZ], &wl1271_band_2ghz, |
5033 | sizeof(wl1271_band_2ghz)); | 5033 | sizeof(wl1271_band_2ghz)); |
5034 | memcpy(&wl->bands[IEEE80211_BAND_2GHZ].ht_cap, &wl->ht_cap, | 5034 | memcpy(&wl->bands[IEEE80211_BAND_2GHZ].ht_cap, |
5035 | sizeof(wl->ht_cap)); | 5035 | &wl->ht_cap[IEEE80211_BAND_2GHZ], |
5036 | sizeof(*wl->ht_cap)); | ||
5036 | memcpy(&wl->bands[IEEE80211_BAND_5GHZ], &wl1271_band_5ghz, | 5037 | memcpy(&wl->bands[IEEE80211_BAND_5GHZ], &wl1271_band_5ghz, |
5037 | sizeof(wl1271_band_5ghz)); | 5038 | sizeof(wl1271_band_5ghz)); |
5038 | memcpy(&wl->bands[IEEE80211_BAND_5GHZ].ht_cap, &wl->ht_cap, | 5039 | memcpy(&wl->bands[IEEE80211_BAND_5GHZ].ht_cap, |
5039 | sizeof(wl->ht_cap)); | 5040 | &wl->ht_cap[IEEE80211_BAND_5GHZ], |
5041 | sizeof(*wl->ht_cap)); | ||
5040 | 5042 | ||
5041 | wl->hw->wiphy->bands[IEEE80211_BAND_2GHZ] = | 5043 | wl->hw->wiphy->bands[IEEE80211_BAND_2GHZ] = |
5042 | &wl->bands[IEEE80211_BAND_2GHZ]; | 5044 | &wl->bands[IEEE80211_BAND_2GHZ]; |
diff --git a/drivers/net/wireless/ti/wlcore/wlcore.h b/drivers/net/wireless/ti/wlcore/wlcore.h index 19678738a069..37a80f4bf5bb 100644 --- a/drivers/net/wireless/ti/wlcore/wlcore.h +++ b/drivers/net/wireless/ti/wlcore/wlcore.h | |||
@@ -368,7 +368,7 @@ struct wl1271 { | |||
368 | u8 hw_min_ht_rate; | 368 | u8 hw_min_ht_rate; |
369 | 369 | ||
370 | /* HW HT (11n) capabilities */ | 370 | /* HW HT (11n) capabilities */ |
371 | struct ieee80211_sta_ht_cap ht_cap; | 371 | struct ieee80211_sta_ht_cap ht_cap[IEEE80211_NUM_BANDS]; |
372 | 372 | ||
373 | /* size of the private FW status data */ | 373 | /* size of the private FW status data */ |
374 | size_t fw_status_priv_len; | 374 | size_t fw_status_priv_len; |