Skip to content

Commit

Permalink
remove IEEE80211_NUM_BANDS and IEEE80211_BAND_2GHZ
Browse files Browse the repository at this point in the history
  • Loading branch information
Icenowy committed Jun 13, 2016
1 parent bb04dcd commit 364ee3b
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion esp_ctrl.c
Original file line number Diff line number Diff line change
Expand Up @@ -749,7 +749,7 @@ int sip_send_set_sta(struct esp_pub *epub, u8 ifidx, u8 set,
sta->ht_cap.ampdu_density;
} else {
if (sta->
supp_rates[IEEE80211_BAND_2GHZ] & (~(u32)
supp_rates[NL80211_BAND_2GHZ] & (~(u32)
CONF_HW_BIT_RATE_11B_MASK))
{
setstacmd->phymode = ESP_IEEE80211_T_OFDM;
Expand Down
32 changes: 16 additions & 16 deletions esp_mac80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -1596,30 +1596,30 @@ static void esp_pub_init_mac80211(struct esp_pub *epub)

atomic_set(&epub->wl.off, 1);

epub->wl.sbands[IEEE80211_BAND_2GHZ].band = IEEE80211_BAND_2GHZ;
epub->wl.sbands[IEEE80211_BAND_2GHZ].channels = esp_channels_2ghz;
epub->wl.sbands[IEEE80211_BAND_2GHZ].bitrates = esp_rates_2ghz;
epub->wl.sbands[IEEE80211_BAND_2GHZ].n_channels =
epub->wl.sbands[NL80211_BAND_2GHZ].band = NL80211_BAND_2GHZ;
epub->wl.sbands[NL80211_BAND_2GHZ].channels = esp_channels_2ghz;
epub->wl.sbands[NL80211_BAND_2GHZ].bitrates = esp_rates_2ghz;
epub->wl.sbands[NL80211_BAND_2GHZ].n_channels =
ARRAY_SIZE(esp_channels_2ghz);
epub->wl.sbands[IEEE80211_BAND_2GHZ].n_bitrates =
epub->wl.sbands[NL80211_BAND_2GHZ].n_bitrates =
ARRAY_SIZE(esp_rates_2ghz);
/*add to support 11n */
epub->wl.sbands[IEEE80211_BAND_2GHZ].ht_cap.ht_supported = true;
epub->wl.sbands[IEEE80211_BAND_2GHZ].ht_cap.cap = 0x116C; //IEEE80211_HT_CAP_RX_STBC; //IEEE80211_HT_CAP_SGI_20;
epub->wl.sbands[IEEE80211_BAND_2GHZ].ht_cap.ampdu_factor =
epub->wl.sbands[NL80211_BAND_2GHZ].ht_cap.ht_supported = true;
epub->wl.sbands[NL80211_BAND_2GHZ].ht_cap.cap = 0x116C; //IEEE80211_HT_CAP_RX_STBC; //IEEE80211_HT_CAP_SGI_20;
epub->wl.sbands[NL80211_BAND_2GHZ].ht_cap.ampdu_factor =
IEEE80211_HT_MAX_AMPDU_16K;
epub->wl.sbands[IEEE80211_BAND_2GHZ].ht_cap.ampdu_density =
epub->wl.sbands[NL80211_BAND_2GHZ].ht_cap.ampdu_density =
IEEE80211_HT_MPDU_DENSITY_NONE;
memset(&epub->wl.sbands[IEEE80211_BAND_2GHZ].ht_cap.mcs, 0,
sizeof(epub->wl.sbands[IEEE80211_BAND_2GHZ].ht_cap.mcs));
epub->wl.sbands[IEEE80211_BAND_2GHZ].ht_cap.mcs.rx_mask[0] = 0xff;
//epub->wl.sbands[IEEE80211_BAND_2GHZ].ht_cap.mcs.rx_highest = 7;
//epub->wl.sbands[IEEE80211_BAND_2GHZ].ht_cap.mcs.tx_params = IEEE80211_HT_MCS_TX_DEFINED;
memset(&epub->wl.sbands[NL80211_BAND_2GHZ].ht_cap.mcs, 0,
sizeof(epub->wl.sbands[NL80211_BAND_2GHZ].ht_cap.mcs));
epub->wl.sbands[NL80211_BAND_2GHZ].ht_cap.mcs.rx_mask[0] = 0xff;
//epub->wl.sbands[NL80211_BAND_2GHZ].ht_cap.mcs.rx_highest = 7;
//epub->wl.sbands[NL80211_BAND_2GHZ].ht_cap.mcs.tx_params = IEEE80211_HT_MCS_TX_DEFINED;

/* BAND_5GHZ TBD */

hw->wiphy->bands[IEEE80211_BAND_2GHZ] =
&epub->wl.sbands[IEEE80211_BAND_2GHZ];
hw->wiphy->bands[NL80211_BAND_2GHZ] =
&epub->wl.sbands[NL80211_BAND_2GHZ];
/* BAND_5GHZ TBD */

/*no fragment */
Expand Down
2 changes: 1 addition & 1 deletion esp_pub.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ typedef struct esp_wl {
atomic_t tkip_key_set;

/* so far only 2G band */
struct ieee80211_supported_band sbands[IEEE80211_NUM_BANDS];
struct ieee80211_supported_band sbands[NUM_NL80211_BANDS];

unsigned long flags;
atomic_t off;
Expand Down
2 changes: 1 addition & 1 deletion esp_sip.c
Original file line number Diff line number Diff line change
Expand Up @@ -1637,7 +1637,7 @@ static int sip_parse_mac_rx_info(struct esp_sip *sip,
}

rx_status->antenna = 0; /* one antenna for now */
rx_status->band = IEEE80211_BAND_2GHZ;
rx_status->band = NL80211_BAND_2GHZ;
rx_status->flag = RX_FLAG_DECRYPTED | RX_FLAG_MMIC_STRIPPED;
if (mac_ctrl->sig_mode) {
rx_status->flag |= RX_FLAG_HT;
Expand Down

0 comments on commit 364ee3b

Please sign in to comment.