diff options
Diffstat (limited to 'drivers/net/wireless/mwifiex/cfg80211.c')
| -rw-r--r-- | drivers/net/wireless/mwifiex/cfg80211.c | 61 |
1 files changed, 46 insertions, 15 deletions
diff --git a/drivers/net/wireless/mwifiex/cfg80211.c b/drivers/net/wireless/mwifiex/cfg80211.c index b99ae2677d78..98009e2194c5 100644 --- a/drivers/net/wireless/mwifiex/cfg80211.c +++ b/drivers/net/wireless/mwifiex/cfg80211.c | |||
| @@ -1150,9 +1150,9 @@ mwifiex_cfg80211_scan(struct wiphy *wiphy, struct net_device *dev, | |||
| 1150 | * | 1150 | * |
| 1151 | * The following default values are set - | 1151 | * The following default values are set - |
| 1152 | * - HT Supported = True | 1152 | * - HT Supported = True |
| 1153 | * - Maximum AMPDU length factor = 0x3 | 1153 | * - Maximum AMPDU length factor = IEEE80211_HT_MAX_AMPDU_64K |
| 1154 | * - Minimum AMPDU spacing = 0x6 | 1154 | * - Minimum AMPDU spacing = IEEE80211_HT_MPDU_DENSITY_NONE |
| 1155 | * - HT Capabilities map = IEEE80211_HT_CAP_SUP_WIDTH_20_40 (0x0002) | 1155 | * - HT Capabilities supported by firmware |
| 1156 | * - MCS information, Rx mask = 0xff | 1156 | * - MCS information, Rx mask = 0xff |
| 1157 | * - MCD information, Tx parameters = IEEE80211_HT_MCS_TX_DEFINED (0x01) | 1157 | * - MCD information, Tx parameters = IEEE80211_HT_MCS_TX_DEFINED (0x01) |
| 1158 | */ | 1158 | */ |
| @@ -1166,13 +1166,41 @@ mwifiex_setup_ht_caps(struct ieee80211_sta_ht_cap *ht_info, | |||
| 1166 | struct mwifiex_adapter *adapter = priv->adapter; | 1166 | struct mwifiex_adapter *adapter = priv->adapter; |
| 1167 | 1167 | ||
| 1168 | ht_info->ht_supported = true; | 1168 | ht_info->ht_supported = true; |
| 1169 | ht_info->ampdu_factor = 0x3; | 1169 | ht_info->ampdu_factor = IEEE80211_HT_MAX_AMPDU_64K; |
| 1170 | ht_info->ampdu_density = 0x6; | 1170 | ht_info->ampdu_density = IEEE80211_HT_MPDU_DENSITY_NONE; |
| 1171 | 1171 | ||
| 1172 | memset(&ht_info->mcs, 0, sizeof(ht_info->mcs)); | 1172 | memset(&ht_info->mcs, 0, sizeof(ht_info->mcs)); |
| 1173 | ht_info->cap = IEEE80211_HT_CAP_SUP_WIDTH_20_40; | ||
| 1174 | 1173 | ||
| 1175 | rx_mcs_supp = GET_RXMCSSUPP(priv->adapter->hw_dev_mcs_support); | 1174 | /* Fill HT capability information */ |
| 1175 | if (ISSUPP_CHANWIDTH40(adapter->hw_dot_11n_dev_cap)) | ||
| 1176 | ht_info->cap |= IEEE80211_HT_CAP_SUP_WIDTH_20_40; | ||
| 1177 | else | ||
| 1178 | ht_info->cap &= ~IEEE80211_HT_CAP_SUP_WIDTH_20_40; | ||
| 1179 | |||
| 1180 | if (ISSUPP_SHORTGI20(adapter->hw_dot_11n_dev_cap)) | ||
| 1181 | ht_info->cap |= IEEE80211_HT_CAP_SGI_20; | ||
| 1182 | else | ||
| 1183 | ht_info->cap &= ~IEEE80211_HT_CAP_SGI_20; | ||
| 1184 | |||
| 1185 | if (ISSUPP_SHORTGI40(adapter->hw_dot_11n_dev_cap)) | ||
| 1186 | ht_info->cap |= IEEE80211_HT_CAP_SGI_40; | ||
| 1187 | else | ||
| 1188 | ht_info->cap &= ~IEEE80211_HT_CAP_SGI_40; | ||
| 1189 | |||
| 1190 | if (ISSUPP_RXSTBC(adapter->hw_dot_11n_dev_cap)) | ||
| 1191 | ht_info->cap |= 1 << IEEE80211_HT_CAP_RX_STBC_SHIFT; | ||
| 1192 | else | ||
| 1193 | ht_info->cap &= ~(3 << IEEE80211_HT_CAP_RX_STBC_SHIFT); | ||
| 1194 | |||
| 1195 | if (ISSUPP_TXSTBC(adapter->hw_dot_11n_dev_cap)) | ||
| 1196 | ht_info->cap |= IEEE80211_HT_CAP_TX_STBC; | ||
| 1197 | else | ||
| 1198 | ht_info->cap &= ~IEEE80211_HT_CAP_TX_STBC; | ||
| 1199 | |||
| 1200 | ht_info->cap &= ~IEEE80211_HT_CAP_MAX_AMSDU; | ||
| 1201 | ht_info->cap |= IEEE80211_HT_CAP_SM_PS; | ||
| 1202 | |||
| 1203 | rx_mcs_supp = GET_RXMCSSUPP(adapter->hw_dev_mcs_support); | ||
| 1176 | /* Set MCS for 1x1 */ | 1204 | /* Set MCS for 1x1 */ |
| 1177 | memset(mcs, 0xff, rx_mcs_supp); | 1205 | memset(mcs, 0xff, rx_mcs_supp); |
| 1178 | /* Clear all the other values */ | 1206 | /* Clear all the other values */ |
| @@ -1235,20 +1263,23 @@ int mwifiex_register_cfg80211(struct net_device *dev, u8 *mac, | |||
| 1235 | wdev->wiphy->max_scan_ssids = 10; | 1263 | wdev->wiphy->max_scan_ssids = 10; |
| 1236 | wdev->wiphy->interface_modes = | 1264 | wdev->wiphy->interface_modes = |
| 1237 | BIT(NL80211_IFTYPE_STATION) | BIT(NL80211_IFTYPE_ADHOC); | 1265 | BIT(NL80211_IFTYPE_STATION) | BIT(NL80211_IFTYPE_ADHOC); |
| 1266 | |||
| 1238 | wdev->wiphy->bands[IEEE80211_BAND_2GHZ] = &mwifiex_band_2ghz; | 1267 | wdev->wiphy->bands[IEEE80211_BAND_2GHZ] = &mwifiex_band_2ghz; |
| 1239 | wdev->wiphy->bands[IEEE80211_BAND_5GHZ] = &mwifiex_band_5ghz; | 1268 | mwifiex_setup_ht_caps( |
| 1269 | &wdev->wiphy->bands[IEEE80211_BAND_2GHZ]->ht_cap, priv); | ||
| 1270 | |||
| 1271 | if (priv->adapter->config_bands & BAND_A) { | ||
| 1272 | wdev->wiphy->bands[IEEE80211_BAND_5GHZ] = &mwifiex_band_5ghz; | ||
| 1273 | mwifiex_setup_ht_caps( | ||
| 1274 | &wdev->wiphy->bands[IEEE80211_BAND_5GHZ]->ht_cap, priv); | ||
| 1275 | } else { | ||
| 1276 | wdev->wiphy->bands[IEEE80211_BAND_5GHZ] = NULL; | ||
| 1277 | } | ||
| 1240 | 1278 | ||
| 1241 | /* Initialize cipher suits */ | 1279 | /* Initialize cipher suits */ |
| 1242 | wdev->wiphy->cipher_suites = mwifiex_cipher_suites; | 1280 | wdev->wiphy->cipher_suites = mwifiex_cipher_suites; |
| 1243 | wdev->wiphy->n_cipher_suites = ARRAY_SIZE(mwifiex_cipher_suites); | 1281 | wdev->wiphy->n_cipher_suites = ARRAY_SIZE(mwifiex_cipher_suites); |
| 1244 | 1282 | ||
| 1245 | /* Initialize parameters for 2GHz band */ | ||
| 1246 | |||
| 1247 | mwifiex_setup_ht_caps(&wdev->wiphy->bands[IEEE80211_BAND_2GHZ]->ht_cap, | ||
| 1248 | priv); | ||
| 1249 | mwifiex_setup_ht_caps(&wdev->wiphy->bands[IEEE80211_BAND_5GHZ]->ht_cap, | ||
| 1250 | priv); | ||
| 1251 | |||
| 1252 | memcpy(wdev->wiphy->perm_addr, mac, 6); | 1283 | memcpy(wdev->wiphy->perm_addr, mac, 6); |
| 1253 | wdev->wiphy->signal_type = CFG80211_SIGNAL_TYPE_MBM; | 1284 | wdev->wiphy->signal_type = CFG80211_SIGNAL_TYPE_MBM; |
| 1254 | 1285 | ||
