aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/realtek/rtlwifi/base.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/realtek/rtlwifi/base.c')
-rw-r--r--drivers/net/wireless/realtek/rtlwifi/base.c44
1 files changed, 22 insertions, 22 deletions
diff --git a/drivers/net/wireless/realtek/rtlwifi/base.c b/drivers/net/wireless/realtek/rtlwifi/base.c
index 0517a4f2d3f2..c74eb139bfa1 100644
--- a/drivers/net/wireless/realtek/rtlwifi/base.c
+++ b/drivers/net/wireless/realtek/rtlwifi/base.c
@@ -131,7 +131,7 @@ static struct ieee80211_rate rtl_ratetable_5g[] = {
131}; 131};
132 132
133static const struct ieee80211_supported_band rtl_band_2ghz = { 133static const struct ieee80211_supported_band rtl_band_2ghz = {
134 .band = IEEE80211_BAND_2GHZ, 134 .band = NL80211_BAND_2GHZ,
135 135
136 .channels = rtl_channeltable_2g, 136 .channels = rtl_channeltable_2g,
137 .n_channels = ARRAY_SIZE(rtl_channeltable_2g), 137 .n_channels = ARRAY_SIZE(rtl_channeltable_2g),
@@ -143,7 +143,7 @@ static const struct ieee80211_supported_band rtl_band_2ghz = {
143}; 143};
144 144
145static struct ieee80211_supported_band rtl_band_5ghz = { 145static struct ieee80211_supported_band rtl_band_5ghz = {
146 .band = IEEE80211_BAND_5GHZ, 146 .band = NL80211_BAND_5GHZ,
147 147
148 .channels = rtl_channeltable_5g, 148 .channels = rtl_channeltable_5g,
149 .n_channels = ARRAY_SIZE(rtl_channeltable_5g), 149 .n_channels = ARRAY_SIZE(rtl_channeltable_5g),
@@ -197,7 +197,7 @@ static void _rtl_init_hw_ht_capab(struct ieee80211_hw *hw,
197 197
198 ht_cap->mcs.tx_params = IEEE80211_HT_MCS_TX_DEFINED; 198 ht_cap->mcs.tx_params = IEEE80211_HT_MCS_TX_DEFINED;
199 199
200 /*hw->wiphy->bands[IEEE80211_BAND_2GHZ] 200 /*hw->wiphy->bands[NL80211_BAND_2GHZ]
201 *base on ant_num 201 *base on ant_num
202 *rx_mask: RX mask 202 *rx_mask: RX mask
203 *if rx_ant = 1 rx_mask[0]= 0xff;==>MCS0-MCS7 203 *if rx_ant = 1 rx_mask[0]= 0xff;==>MCS0-MCS7
@@ -328,26 +328,26 @@ static void _rtl_init_mac80211(struct ieee80211_hw *hw)
328 rtlhal->bandset == BAND_ON_BOTH) { 328 rtlhal->bandset == BAND_ON_BOTH) {
329 /* 1: 2.4 G bands */ 329 /* 1: 2.4 G bands */
330 /* <1> use mac->bands as mem for hw->wiphy->bands */ 330 /* <1> use mac->bands as mem for hw->wiphy->bands */
331 sband = &(rtlmac->bands[IEEE80211_BAND_2GHZ]); 331 sband = &(rtlmac->bands[NL80211_BAND_2GHZ]);
332 332
333 /* <2> set hw->wiphy->bands[IEEE80211_BAND_2GHZ] 333 /* <2> set hw->wiphy->bands[NL80211_BAND_2GHZ]
334 * to default value(1T1R) */ 334 * to default value(1T1R) */
335 memcpy(&(rtlmac->bands[IEEE80211_BAND_2GHZ]), &rtl_band_2ghz, 335 memcpy(&(rtlmac->bands[NL80211_BAND_2GHZ]), &rtl_band_2ghz,
336 sizeof(struct ieee80211_supported_band)); 336 sizeof(struct ieee80211_supported_band));
337 337
338 /* <3> init ht cap base on ant_num */ 338 /* <3> init ht cap base on ant_num */
339 _rtl_init_hw_ht_capab(hw, &sband->ht_cap); 339 _rtl_init_hw_ht_capab(hw, &sband->ht_cap);
340 340
341 /* <4> set mac->sband to wiphy->sband */ 341 /* <4> set mac->sband to wiphy->sband */
342 hw->wiphy->bands[IEEE80211_BAND_2GHZ] = sband; 342 hw->wiphy->bands[NL80211_BAND_2GHZ] = sband;
343 343
344 /* 2: 5 G bands */ 344 /* 2: 5 G bands */
345 /* <1> use mac->bands as mem for hw->wiphy->bands */ 345 /* <1> use mac->bands as mem for hw->wiphy->bands */
346 sband = &(rtlmac->bands[IEEE80211_BAND_5GHZ]); 346 sband = &(rtlmac->bands[NL80211_BAND_5GHZ]);
347 347
348 /* <2> set hw->wiphy->bands[IEEE80211_BAND_5GHZ] 348 /* <2> set hw->wiphy->bands[NL80211_BAND_5GHZ]
349 * to default value(1T1R) */ 349 * to default value(1T1R) */
350 memcpy(&(rtlmac->bands[IEEE80211_BAND_5GHZ]), &rtl_band_5ghz, 350 memcpy(&(rtlmac->bands[NL80211_BAND_5GHZ]), &rtl_band_5ghz,
351 sizeof(struct ieee80211_supported_band)); 351 sizeof(struct ieee80211_supported_band));
352 352
353 /* <3> init ht cap base on ant_num */ 353 /* <3> init ht cap base on ant_num */
@@ -355,15 +355,15 @@ static void _rtl_init_mac80211(struct ieee80211_hw *hw)
355 355
356 _rtl_init_hw_vht_capab(hw, &sband->vht_cap); 356 _rtl_init_hw_vht_capab(hw, &sband->vht_cap);
357 /* <4> set mac->sband to wiphy->sband */ 357 /* <4> set mac->sband to wiphy->sband */
358 hw->wiphy->bands[IEEE80211_BAND_5GHZ] = sband; 358 hw->wiphy->bands[NL80211_BAND_5GHZ] = sband;
359 } else { 359 } else {
360 if (rtlhal->current_bandtype == BAND_ON_2_4G) { 360 if (rtlhal->current_bandtype == BAND_ON_2_4G) {
361 /* <1> use mac->bands as mem for hw->wiphy->bands */ 361 /* <1> use mac->bands as mem for hw->wiphy->bands */
362 sband = &(rtlmac->bands[IEEE80211_BAND_2GHZ]); 362 sband = &(rtlmac->bands[NL80211_BAND_2GHZ]);
363 363
364 /* <2> set hw->wiphy->bands[IEEE80211_BAND_2GHZ] 364 /* <2> set hw->wiphy->bands[NL80211_BAND_2GHZ]
365 * to default value(1T1R) */ 365 * to default value(1T1R) */
366 memcpy(&(rtlmac->bands[IEEE80211_BAND_2GHZ]), 366 memcpy(&(rtlmac->bands[NL80211_BAND_2GHZ]),
367 &rtl_band_2ghz, 367 &rtl_band_2ghz,
368 sizeof(struct ieee80211_supported_band)); 368 sizeof(struct ieee80211_supported_band));
369 369
@@ -371,14 +371,14 @@ static void _rtl_init_mac80211(struct ieee80211_hw *hw)
371 _rtl_init_hw_ht_capab(hw, &sband->ht_cap); 371 _rtl_init_hw_ht_capab(hw, &sband->ht_cap);
372 372
373 /* <4> set mac->sband to wiphy->sband */ 373 /* <4> set mac->sband to wiphy->sband */
374 hw->wiphy->bands[IEEE80211_BAND_2GHZ] = sband; 374 hw->wiphy->bands[NL80211_BAND_2GHZ] = sband;
375 } else if (rtlhal->current_bandtype == BAND_ON_5G) { 375 } else if (rtlhal->current_bandtype == BAND_ON_5G) {
376 /* <1> use mac->bands as mem for hw->wiphy->bands */ 376 /* <1> use mac->bands as mem for hw->wiphy->bands */
377 sband = &(rtlmac->bands[IEEE80211_BAND_5GHZ]); 377 sband = &(rtlmac->bands[NL80211_BAND_5GHZ]);
378 378
379 /* <2> set hw->wiphy->bands[IEEE80211_BAND_5GHZ] 379 /* <2> set hw->wiphy->bands[NL80211_BAND_5GHZ]
380 * to default value(1T1R) */ 380 * to default value(1T1R) */
381 memcpy(&(rtlmac->bands[IEEE80211_BAND_5GHZ]), 381 memcpy(&(rtlmac->bands[NL80211_BAND_5GHZ]),
382 &rtl_band_5ghz, 382 &rtl_band_5ghz,
383 sizeof(struct ieee80211_supported_band)); 383 sizeof(struct ieee80211_supported_band));
384 384
@@ -387,7 +387,7 @@ static void _rtl_init_mac80211(struct ieee80211_hw *hw)
387 387
388 _rtl_init_hw_vht_capab(hw, &sband->vht_cap); 388 _rtl_init_hw_vht_capab(hw, &sband->vht_cap);
389 /* <4> set mac->sband to wiphy->sband */ 389 /* <4> set mac->sband to wiphy->sband */
390 hw->wiphy->bands[IEEE80211_BAND_5GHZ] = sband; 390 hw->wiphy->bands[NL80211_BAND_5GHZ] = sband;
391 } else { 391 } else {
392 RT_TRACE(rtlpriv, COMP_INIT, DBG_EMERG, "Err BAND %d\n", 392 RT_TRACE(rtlpriv, COMP_INIT, DBG_EMERG, "Err BAND %d\n",
393 rtlhal->current_bandtype); 393 rtlhal->current_bandtype);
@@ -861,7 +861,7 @@ static u8 _rtl_get_highest_n_rate(struct ieee80211_hw *hw,
861 861
862/* mac80211's rate_idx is like this: 862/* mac80211's rate_idx is like this:
863 * 863 *
864 * 2.4G band:rx_status->band == IEEE80211_BAND_2GHZ 864 * 2.4G band:rx_status->band == NL80211_BAND_2GHZ
865 * 865 *
866 * B/G rate: 866 * B/G rate:
867 * (rx_status->flag & RX_FLAG_HT) = 0, 867 * (rx_status->flag & RX_FLAG_HT) = 0,
@@ -871,7 +871,7 @@ static u8 _rtl_get_highest_n_rate(struct ieee80211_hw *hw,
871 * (rx_status->flag & RX_FLAG_HT) = 1, 871 * (rx_status->flag & RX_FLAG_HT) = 1,
872 * DESC_RATEMCS0-->DESC_RATEMCS15 ==> idx is 0-->15 872 * DESC_RATEMCS0-->DESC_RATEMCS15 ==> idx is 0-->15
873 * 873 *
874 * 5G band:rx_status->band == IEEE80211_BAND_5GHZ 874 * 5G band:rx_status->band == NL80211_BAND_5GHZ
875 * A rate: 875 * A rate:
876 * (rx_status->flag & RX_FLAG_HT) = 0, 876 * (rx_status->flag & RX_FLAG_HT) = 0,
877 * DESC_RATE6M-->DESC_RATE54M ==> idx is 0-->7, 877 * DESC_RATE6M-->DESC_RATE54M ==> idx is 0-->7,
@@ -958,7 +958,7 @@ int rtlwifi_rate_mapping(struct ieee80211_hw *hw, bool isht, bool isvht,
958 return rate_idx; 958 return rate_idx;
959 } 959 }
960 if (false == isht) { 960 if (false == isht) {
961 if (IEEE80211_BAND_2GHZ == hw->conf.chandef.chan->band) { 961 if (NL80211_BAND_2GHZ == hw->conf.chandef.chan->band) {
962 switch (desc_rate) { 962 switch (desc_rate) {
963 case DESC_RATE1M: 963 case DESC_RATE1M:
964 rate_idx = 0; 964 rate_idx = 0;