diff options
-rw-r--r-- | drivers/net/wireless/ti/wl12xx/main.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/ti/wl18xx/main.c | 63 | ||||
-rw-r--r-- | drivers/net/wireless/ti/wlcore/wlcore.h | 7 |
3 files changed, 42 insertions, 34 deletions
diff --git a/drivers/net/wireless/ti/wl12xx/main.c b/drivers/net/wireless/ti/wl12xx/main.c index 7974ed55dd5b..0d2fdca2aa32 100644 --- a/drivers/net/wireless/ti/wl12xx/main.c +++ b/drivers/net/wireless/ti/wl12xx/main.c | |||
@@ -1449,10 +1449,8 @@ static int __devinit wl12xx_probe(struct platform_device *pdev) | |||
1449 | wl->hw_min_ht_rate = WL12XX_CONF_HW_RXTX_RATE_MCS0; | 1449 | wl->hw_min_ht_rate = WL12XX_CONF_HW_RXTX_RATE_MCS0; |
1450 | wl->fw_status_priv_len = 0; | 1450 | wl->fw_status_priv_len = 0; |
1451 | wl->stats.fw_stats_len = sizeof(struct wl12xx_acx_statistics); | 1451 | wl->stats.fw_stats_len = sizeof(struct wl12xx_acx_statistics); |
1452 | memcpy(&wl->ht_cap[IEEE80211_BAND_2GHZ], &wl12xx_ht_cap, | 1452 | wlcore_set_ht_cap(wl, IEEE80211_BAND_2GHZ, &wl12xx_ht_cap); |
1453 | sizeof(wl12xx_ht_cap)); | 1453 | wlcore_set_ht_cap(wl, IEEE80211_BAND_5GHZ, &wl12xx_ht_cap); |
1454 | memcpy(&wl->ht_cap[IEEE80211_BAND_5GHZ], &wl12xx_ht_cap, | ||
1455 | sizeof(wl12xx_ht_cap)); | ||
1456 | wl12xx_conf_init(wl); | 1454 | wl12xx_conf_init(wl); |
1457 | 1455 | ||
1458 | if (!fref_param) { | 1456 | if (!fref_param) { |
diff --git a/drivers/net/wireless/ti/wl18xx/main.c b/drivers/net/wireless/ti/wl18xx/main.c index 365063b6f7c3..485aeae2f777 100644 --- a/drivers/net/wireless/ti/wl18xx/main.c +++ b/drivers/net/wireless/ti/wl18xx/main.c | |||
@@ -43,7 +43,7 @@ | |||
43 | 43 | ||
44 | #define WL18XX_RX_CHECKSUM_MASK 0x40 | 44 | #define WL18XX_RX_CHECKSUM_MASK 0x40 |
45 | 45 | ||
46 | static char *ht_mode_param = "wide"; | 46 | static char *ht_mode_param = "default"; |
47 | static char *board_type_param = "hdk"; | 47 | static char *board_type_param = "hdk"; |
48 | static bool checksum_param = false; | 48 | static bool checksum_param = false; |
49 | static bool enable_11a_param = true; | 49 | static bool enable_11a_param = true; |
@@ -1286,34 +1286,6 @@ static int __devinit wl18xx_probe(struct platform_device *pdev) | |||
1286 | if (num_rx_desc_param != -1) | 1286 | if (num_rx_desc_param != -1) |
1287 | wl->num_rx_desc = num_rx_desc_param; | 1287 | wl->num_rx_desc = num_rx_desc_param; |
1288 | 1288 | ||
1289 | if (!strcmp(ht_mode_param, "wide")) { | ||
1290 | memcpy(&wl->ht_cap[IEEE80211_BAND_2GHZ], | ||
1291 | &wl18xx_siso40_ht_cap, | ||
1292 | sizeof(wl18xx_siso40_ht_cap)); | ||
1293 | memcpy(&wl->ht_cap[IEEE80211_BAND_5GHZ], | ||
1294 | &wl18xx_siso40_ht_cap, | ||
1295 | sizeof(wl18xx_siso40_ht_cap)); | ||
1296 | } else if (!strcmp(ht_mode_param, "mimo")) { | ||
1297 | memcpy(&wl->ht_cap[IEEE80211_BAND_2GHZ], | ||
1298 | &wl18xx_mimo_ht_cap_2ghz, | ||
1299 | sizeof(wl18xx_mimo_ht_cap_2ghz)); | ||
1300 | /* we don't support MIMO in 5Ghz */ | ||
1301 | memcpy(&wl->ht_cap[IEEE80211_BAND_5GHZ], | ||
1302 | &wl18xx_siso20_ht_cap, | ||
1303 | sizeof(wl18xx_siso20_ht_cap)); | ||
1304 | } else if (!strcmp(ht_mode_param, "siso20")) { | ||
1305 | memcpy(&wl->ht_cap[IEEE80211_BAND_2GHZ], | ||
1306 | &wl18xx_siso20_ht_cap, | ||
1307 | sizeof(wl18xx_siso20_ht_cap)); | ||
1308 | memcpy(&wl->ht_cap[IEEE80211_BAND_5GHZ], | ||
1309 | &wl18xx_siso20_ht_cap, | ||
1310 | sizeof(wl18xx_siso20_ht_cap)); | ||
1311 | } else { | ||
1312 | wl1271_error("invalid ht_mode '%s'", ht_mode_param); | ||
1313 | ret = -EINVAL; | ||
1314 | goto out_free; | ||
1315 | } | ||
1316 | |||
1317 | ret = wl18xx_conf_init(wl, &pdev->dev); | 1289 | ret = wl18xx_conf_init(wl, &pdev->dev); |
1318 | if (ret < 0) | 1290 | if (ret < 0) |
1319 | goto out_free; | 1291 | goto out_free; |
@@ -1359,6 +1331,37 @@ static int __devinit wl18xx_probe(struct platform_device *pdev) | |||
1359 | if (dc2dc_param != -1) | 1331 | if (dc2dc_param != -1) |
1360 | priv->conf.phy.external_pa_dc2dc = dc2dc_param; | 1332 | priv->conf.phy.external_pa_dc2dc = dc2dc_param; |
1361 | 1333 | ||
1334 | if (!strcmp(ht_mode_param, "default")) { | ||
1335 | /* | ||
1336 | * Only support mimo with multiple antennas. Fall back to | ||
1337 | * siso20. | ||
1338 | */ | ||
1339 | if (priv->conf.phy.number_of_assembled_ant2_4 >= 2) | ||
1340 | wlcore_set_ht_cap(wl, IEEE80211_BAND_2GHZ, | ||
1341 | &wl18xx_mimo_ht_cap_2ghz); | ||
1342 | else | ||
1343 | wlcore_set_ht_cap(wl, IEEE80211_BAND_2GHZ, | ||
1344 | &wl18xx_siso20_ht_cap); | ||
1345 | |||
1346 | /* 5Ghz is always wide */ | ||
1347 | wlcore_set_ht_cap(wl, IEEE80211_BAND_5GHZ, | ||
1348 | &wl18xx_siso40_ht_cap); | ||
1349 | } else if (!strcmp(ht_mode_param, "wide")) { | ||
1350 | wlcore_set_ht_cap(wl, IEEE80211_BAND_2GHZ, | ||
1351 | &wl18xx_siso40_ht_cap); | ||
1352 | wlcore_set_ht_cap(wl, IEEE80211_BAND_5GHZ, | ||
1353 | &wl18xx_siso40_ht_cap); | ||
1354 | } else if (!strcmp(ht_mode_param, "siso20")) { | ||
1355 | wlcore_set_ht_cap(wl, IEEE80211_BAND_2GHZ, | ||
1356 | &wl18xx_siso20_ht_cap); | ||
1357 | wlcore_set_ht_cap(wl, IEEE80211_BAND_5GHZ, | ||
1358 | &wl18xx_siso20_ht_cap); | ||
1359 | } else { | ||
1360 | wl1271_error("invalid ht_mode '%s'", ht_mode_param); | ||
1361 | ret = -EINVAL; | ||
1362 | goto out_free; | ||
1363 | } | ||
1364 | |||
1362 | if (!checksum_param) { | 1365 | if (!checksum_param) { |
1363 | wl18xx_ops.set_rx_csum = NULL; | 1366 | wl18xx_ops.set_rx_csum = NULL; |
1364 | wl18xx_ops.init_vif = NULL; | 1367 | wl18xx_ops.init_vif = NULL; |
@@ -1403,7 +1406,7 @@ static void __exit wl18xx_exit(void) | |||
1403 | module_exit(wl18xx_exit); | 1406 | module_exit(wl18xx_exit); |
1404 | 1407 | ||
1405 | module_param_named(ht_mode, ht_mode_param, charp, S_IRUSR); | 1408 | module_param_named(ht_mode, ht_mode_param, charp, S_IRUSR); |
1406 | MODULE_PARM_DESC(ht_mode, "Force HT mode: wide (default), mimo or siso20"); | 1409 | MODULE_PARM_DESC(ht_mode, "Force HT mode: wide or siso20"); |
1407 | 1410 | ||
1408 | module_param_named(board_type, board_type_param, charp, S_IRUSR); | 1411 | module_param_named(board_type, board_type_param, charp, S_IRUSR); |
1409 | MODULE_PARM_DESC(board_type, "Board type: fpga, hdk (default), evb, com8 or " | 1412 | MODULE_PARM_DESC(board_type, "Board type: fpga, hdk (default), evb, com8 or " |
diff --git a/drivers/net/wireless/ti/wlcore/wlcore.h b/drivers/net/wireless/ti/wlcore/wlcore.h index eae8edcc5fc7..205d8ad2b761 100644 --- a/drivers/net/wireless/ti/wlcore/wlcore.h +++ b/drivers/net/wireless/ti/wlcore/wlcore.h | |||
@@ -401,6 +401,13 @@ int wlcore_set_key(struct wl1271 *wl, enum set_key_cmd cmd, | |||
401 | struct ieee80211_sta *sta, | 401 | struct ieee80211_sta *sta, |
402 | struct ieee80211_key_conf *key_conf); | 402 | struct ieee80211_key_conf *key_conf); |
403 | 403 | ||
404 | static inline void | ||
405 | wlcore_set_ht_cap(struct wl1271 *wl, enum ieee80211_band band, | ||
406 | struct ieee80211_sta_ht_cap *ht_cap) | ||
407 | { | ||
408 | memcpy(&wl->ht_cap[band], ht_cap, sizeof(*ht_cap)); | ||
409 | } | ||
410 | |||
404 | /* Firmware image load chunk size */ | 411 | /* Firmware image load chunk size */ |
405 | #define CHUNK_SIZE 16384 | 412 | #define CHUNK_SIZE 16384 |
406 | 413 | ||