shortGIrate = query_ra_short_GI(psta);
- if (pcur_network->configuration.DSConfig > 14) {
+ if (pcur_network->configuration.ds_config > 14) {
sta_band |= WIRELESS_INVALID;
} else {
if (tx_ra_bitmap & 0xffff000)
supportRateNum = rtw_get_rateset_len((u8 *)&pcur_network->supported_rates);
network_type = rtw_check_network_type((u8 *)&pcur_network->supported_rates,
supportRateNum,
- pcur_network->configuration.DSConfig
+ pcur_network->configuration.ds_config
);
if (is_supported_tx_cck(network_type)) {
network_type = WIRELESS_11B;
} else if (network_type == WIRELESS_INVALID) { /* error handling */
- if (pcur_network->configuration.DSConfig > 14)
+ if (pcur_network->configuration.ds_config > 14)
network_type = WIRELESS_INVALID;
else
network_type = WIRELESS_11B;
struct HT_info_element *pht_info = NULL;
u8 cbw40_enable = 0;
- bcn_interval = (u16)pnetwork->configuration.BeaconPeriod;
- cur_channel = pnetwork->configuration.DSConfig;
+ bcn_interval = (u16)pnetwork->configuration.beacon_period;
+ cur_channel = pnetwork->configuration.ds_config;
cur_bwmode = CHANNEL_WIDTH_20;
cur_ch_offset = HAL_PRIME_CHNL_OFFSET_DONT_CARE;
/* beacon interval */
p = rtw_get_beacon_interval_from_ie(ie);/* ie + 8; 8: TimeStamp, 2: Beacon Interval 2:Capability */
- /* pbss_network->configuration.BeaconPeriod = le16_to_cpu(*(unsigned short*)p); */
- pbss_network->configuration.BeaconPeriod = get_unaligned_le16(p);
+ /* pbss_network->configuration.beacon_period = le16_to_cpu(*(unsigned short*)p); */
+ pbss_network->configuration.beacon_period = get_unaligned_le16(p);
/* capability */
/* cap = *(unsigned short *)rtw_get_capability_from_ie(ie); */
/* channel */
channel = 0;
- pbss_network->configuration.Length = 0;
+ pbss_network->configuration.length = 0;
p = rtw_get_ie(
ie + _BEACON_IE_OFFSET_,
WLAN_EID_DS_PARAMS, &ie_len,
if (p && ie_len > 0)
channel = *(p + 2);
- pbss_network->configuration.DSConfig = channel;
+ pbss_network->configuration.ds_config = channel;
memset(supportRate, 0, NDIS_802_11_LENGTH_RATES_EX);
/* get supported rates */
/* rtw_restructure_ht_ie */
rtw_restructure_ht_ie(padapter, &pnetwork->network.ies[12], &psecnetwork->ies[0],
pnetwork->network.ie_length-12, &psecnetwork->ie_length,
- pnetwork->network.configuration.DSConfig);
+ pnetwork->network.configuration.ds_config);
}
}
/* copy pdev_network information to pmlmepriv->cur_network */
memcpy(&tgt_network->network, pnetwork, (get_wlan_bssid_ex_sz(pnetwork)));
- /* reset DSConfig */
- /* tgt_network->network.configuration.DSConfig = (u32)rtw_ch2freq(pnetwork->configuration.DSConfig); */
+ /* reset ds_config */
+ /* tgt_network->network.configuration.ds_config = (u32)rtw_ch2freq(pnetwork->configuration.ds_config); */
_clr_fwstate_(pmlmepriv, _FW_UNDER_LINKING);
ie += sz;
/* beacon interval : 2bytes */
- *(__le16 *)ie = cpu_to_le16((u16)pdev_network->configuration.BeaconPeriod);/* BCN_INTERVAL; */
+ *(__le16 *)ie = cpu_to_le16((u16)pdev_network->configuration.beacon_period);/* BCN_INTERVAL; */
sz += 2;
ie += 2;
}
/* DS parameter set */
- ie = rtw_set_ie(ie, WLAN_EID_DS_PARAMS, 1, (u8 *)&(pdev_network->configuration.DSConfig), &sz);
+ ie = rtw_set_ie(ie, WLAN_EID_DS_PARAMS, 1, (u8 *)&(pdev_network->configuration.ds_config), &sz);
/* IBSS Parameter Set */
- ie = rtw_set_ie(ie, WLAN_EID_IBSS_PARAMS, 2, (u8 *)&(pdev_network->configuration.ATIMWindow), &sz);
+ ie = rtw_set_ie(ie, WLAN_EID_IBSS_PARAMS, 2, (u8 *)&(pdev_network->configuration.atim_window), &sz);
if (rateLen > 8) {
ie = rtw_set_ie(ie, WLAN_EID_EXT_SUPP_RATES, (rateLen - 8), (pdev_network->supported_rates + 8), &sz);
d_cap = le16_to_cpu(tmpd);
return (src->ssid.SsidLength == dst->ssid.SsidLength) &&
- /* (src->configuration.DSConfig == dst->configuration.DSConfig) && */
+ /* (src->configuration.ds_config == dst->configuration.ds_config) && */
((!memcmp(src->mac_address, dst->mac_address, ETH_ALEN))) &&
((!memcmp(src->ssid.Ssid, dst->ssid.Ssid, src->ssid.SsidLength))) &&
((s_cap & WLAN_CAPABILITY_IBSS) ==
rtw_update_protection(padapter, (cur_network->network.ies) + sizeof(struct ndis_802_11_fix_ie),
(cur_network->network.ie_length));
- rtw_update_ht_cap(padapter, cur_network->network.ies, cur_network->network.ie_length, (u8) cur_network->network.configuration.DSConfig);
+ rtw_update_ht_cap(padapter, cur_network->network.ies, cur_network->network.ie_length, (u8) cur_network->network.configuration.ds_config);
}
/* Notes: the function could be > passive_level (the same context as Rx tasklet) */
memcpy(&pdev_network->ssid, &pregistrypriv->ssid, sizeof(struct ndis_802_11_ssid));
- pdev_network->configuration.Length = sizeof(struct ndis_802_11_conf);
- pdev_network->configuration.BeaconPeriod = 100;
- pdev_network->configuration.FHConfig.Length = 0;
- pdev_network->configuration.FHConfig.HopPattern = 0;
- pdev_network->configuration.FHConfig.HopSet = 0;
- pdev_network->configuration.FHConfig.DwellTime = 0;
+ pdev_network->configuration.length = sizeof(struct ndis_802_11_conf);
+ pdev_network->configuration.beacon_period = 100;
+ pdev_network->configuration.fh_config.Length = 0;
+ pdev_network->configuration.fh_config.HopPattern = 0;
+ pdev_network->configuration.fh_config.HopSet = 0;
+ pdev_network->configuration.fh_config.DwellTime = 0;
}
void rtw_update_registrypriv_dev_network(struct adapter *adapter)
break;
}
- pdev_network->configuration.DSConfig = (pregistrypriv->channel);
+ pdev_network->configuration.ds_config = (pregistrypriv->channel);
if (cur_network->network.infrastructure_mode == Ndis802_11IBSS)
- pdev_network->configuration.ATIMWindow = (0);
+ pdev_network->configuration.atim_window = (0);
pdev_network->infrastructure_mode = (cur_network->network.infrastructure_mode);
pframe = rtw_set_ie(pframe, WLAN_EID_SUPP_RATES, ((rate_len > 8) ? 8 : rate_len), cur_network->supported_rates, &pattrib->pktlen);
/* DS parameter set */
- pframe = rtw_set_ie(pframe, WLAN_EID_DS_PARAMS, 1, (unsigned char *)&(cur_network->configuration.DSConfig), &pattrib->pktlen);
+ pframe = rtw_set_ie(pframe, WLAN_EID_DS_PARAMS, 1, (unsigned char *)&(cur_network->configuration.ds_config), &pattrib->pktlen);
/* if ((pmlmeinfo->state&0x03) == WIFI_FW_ADHOC_STATE) */
{
pframe = rtw_set_ie(pframe, WLAN_EID_SUPP_RATES, ((rate_len > 8) ? 8 : rate_len), cur_network->supported_rates, &pattrib->pktlen);
/* DS parameter set */
- pframe = rtw_set_ie(pframe, WLAN_EID_DS_PARAMS, 1, (unsigned char *)&(cur_network->configuration.DSConfig), &pattrib->pktlen);
+ pframe = rtw_set_ie(pframe, WLAN_EID_DS_PARAMS, 1, (unsigned char *)&(cur_network->configuration.ds_config), &pattrib->pktlen);
if ((pmlmeinfo->state&0x03) == WIFI_FW_ADHOC_STATE) {
u8 erpinfo = 0;
p = rtw_get_ie(pbss_network->ies + _FIXED_IE_LENGTH_, WLAN_EID_HT_CAPABILITY, &len, pbss_network->ie_length - _FIXED_IE_LENGTH_);
if ((p == NULL) || (len == 0)) {/* non-HT */
- if (pbss_network->configuration.DSConfig <= 0)
+ if (pbss_network->configuration.ds_config <= 0)
continue;
- ICS[0][pbss_network->configuration.DSConfig] = 1;
+ ICS[0][pbss_network->configuration.ds_config] = 1;
if (ICS[0][0] == 0)
ICS[0][0] = 1;
if (bssid->ie_length < 12)
return _FAIL;
- /* Checking for DSConfig */
+ /* Checking for ds_config */
p = rtw_get_ie(bssid->ies + ie_offset, WLAN_EID_DS_PARAMS, &len, bssid->ie_length - ie_offset);
- bssid->configuration.DSConfig = 0;
- bssid->configuration.Length = 0;
+ bssid->configuration.ds_config = 0;
+ bssid->configuration.length = 0;
if (p) {
- bssid->configuration.DSConfig = *(p + 2);
+ bssid->configuration.ds_config = *(p + 2);
} else {
/* In 5G, some ap do not have DSSET IE */
/* checking HT info for channel */
if (p) {
struct HT_info_element *HT_info = (struct HT_info_element *)(p + 2);
- bssid->configuration.DSConfig = HT_info->primary_channel;
+ bssid->configuration.ds_config = HT_info->primary_channel;
} else { /* use current channel */
- bssid->configuration.DSConfig = rtw_get_oper_ch(padapter);
+ bssid->configuration.ds_config = rtw_get_oper_ch(padapter);
}
}
memcpy(&le32_tmp, rtw_get_beacon_interval_from_ie(bssid->ies), 2);
- bssid->configuration.BeaconPeriod = le32_to_cpu(le32_tmp);
+ bssid->configuration.beacon_period = le32_to_cpu(le32_tmp);
val16 = rtw_get_capability((struct wlan_bssid_ex *)bssid);
else
bssid->privacy = 0;
- bssid->configuration.ATIMWindow = 0;
+ bssid->configuration.atim_window = 0;
/* 20/40 BSS Coexistence check */
if ((pregistrypriv->wifi_spec == 1) && (false == pmlmeinfo->bwmode_updated)) {
}
/* mark bss info receiving from nearby channel as SignalQuality 101 */
- if (bssid->configuration.DSConfig != rtw_get_oper_ch(padapter))
+ if (bssid->configuration.ds_config != rtw_get_oper_ch(padapter))
bssid->phy_info.SignalQuality = 101;
return _SUCCESS;
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
struct wlan_bssid_ex *pnetwork = (struct wlan_bssid_ex *)(&(pmlmeinfo->network));
- pmlmeext->cur_channel = (u8)pnetwork->configuration.DSConfig;
+ pmlmeext->cur_channel = (u8)pnetwork->configuration.ds_config;
pmlmeinfo->bcn_interval = get_beacon_interval(pnetwork);
/* update wireless mode */
}
/* If channel is used by AP, set channel scan type to active */
- channel = bssid->configuration.DSConfig;
+ channel = bssid->configuration.ds_config;
chplan_new = pmlmeext->channel_set;
i = 0;
while ((i < MAX_CHANNEL_NUM) && (chplan_new[i].ChannelNum != 0)) {
memcpy(pnetwork->ies, ((struct wlan_bssid_ex *)pbuf)->ies, pnetwork->ie_length);
- pmlmeext->cur_channel = (u8)pnetwork->configuration.DSConfig;
+ pmlmeext->cur_channel = (u8)pnetwork->configuration.ds_config;
pmlmeinfo->bcn_interval = get_beacon_interval(pnetwork);
/* Check AP vendor to move rtw_joinbss_cmd() */
{
struct HT_info_element *pht_info = (struct HT_info_element *)(pIE->data);
- if (pnetwork->configuration.DSConfig <= 14) {
+ if (pnetwork->configuration.ds_config <= 14) {
if ((pregpriv->bw_mode & 0x0f) > CHANNEL_WIDTH_20)
cbw40_enable = 1;
}
pframe = rtw_set_ie(pframe, WLAN_EID_SUPP_RATES, ((rate_len > 8) ? 8 : rate_len), cur_network->supported_rates, &pktlen);
/* DS parameter set */
- pframe = rtw_set_ie(pframe, WLAN_EID_DS_PARAMS, 1, (unsigned char *)&(cur_network->configuration.DSConfig), &pktlen);
+ pframe = rtw_set_ie(pframe, WLAN_EID_DS_PARAMS, 1, (unsigned char *)&(cur_network->configuration.ds_config), &pktlen);
if ((pmlmeinfo->state&0x03) == WIFI_FW_ADHOC_STATE) {
u32 ATIMWindow;
ODI Handler will convert the channel number to freq. number.
*/
struct ndis_802_11_conf {
- u32 Length; /* Length of structure */
- u32 BeaconPeriod; /* units are Kusec */
- u32 ATIMWindow; /* units are Kusec */
- u32 DSConfig; /* Frequency, units are kHz */
- struct ndis_802_11_conf_fh FHConfig;
+ u32 length; /* Length of structure */
+ u32 beacon_period; /* units are Kusec */
+ u32 atim_window; /* units are Kusec */
+ u32 ds_config; /* Frequency, units are kHz */
+ struct ndis_802_11_conf_fh fh_config;
};
enum ndis_802_11_network_infrastructure {
/* spin_unlock_bh(&pwdev_priv->scan_req_lock); */
- channel = pnetwork->network.configuration.DSConfig;
+ channel = pnetwork->network.configuration.ds_config;
freq = rtw_ieee80211_channel_to_frequency(channel, NL80211_BAND_2GHZ);
notify_channel = ieee80211_get_channel(wiphy, freq);
if (!(pnetwork) || !(padapter->rtw_wdev))
return false;
- freq = rtw_ieee80211_channel_to_frequency(pnetwork->configuration.DSConfig, NL80211_BAND_2GHZ);
+ freq = rtw_ieee80211_channel_to_frequency(pnetwork->configuration.ds_config, NL80211_BAND_2GHZ);
notify_channel = ieee80211_get_channel(padapter->rtw_wdev->wiphy, freq);
bss = cfg80211_get_bss(padapter->rtw_wdev->wiphy, notify_channel,
struct wlan_network *cur_network = &(pmlmepriv->cur_network);
struct wireless_dev *pwdev = padapter->rtw_wdev;
struct wiphy *wiphy = pwdev->wiphy;
- int freq = (int)cur_network->network.configuration.DSConfig;
+ int freq = (int)cur_network->network.configuration.ds_config;
struct ieee80211_channel *chan;
if (pwdev->iftype != NL80211_IFTYPE_ADHOC)
struct wiphy *wiphy = pwdev->wiphy;
struct ieee80211_channel *notify_channel;
u32 freq;
- u16 channel = cur_network->network.configuration.DSConfig;
+ u16 channel = cur_network->network.configuration.ds_config;
struct cfg80211_roam_info roam_info = {};
freq = rtw_ieee80211_channel_to_frequency(channel, NL80211_BAND_2GHZ);
pnetwork = list_entry(plist, struct wlan_network, list);
/* report network only if the current channel set contains the channel to which this network belongs */
- if (rtw_ch_set_search_ch(padapter->mlmeextpriv.channel_set, pnetwork->network.configuration.DSConfig) >= 0
+ if (rtw_ch_set_search_ch(padapter->mlmeextpriv.channel_set, pnetwork->network.configuration.ds_config) >= 0
&& true == rtw_validate_ssid(&(pnetwork->network.ssid))
)
{
else
snprintf(iwe.u.name, IFNAMSIZ, "IEEE 802.11bg");
} else {
- if (pnetwork->network.configuration.DSConfig <= 14) {
+ if (pnetwork->network.configuration.ds_config <= 14) {
if (ht_cap)
snprintf(iwe.u.name, IFNAMSIZ, "IEEE 802.11gn");
else
start = iwe_stream_add_event(info, start, stop, &iwe, IW_EV_UINT_LEN);
}
- if (pnetwork->network.configuration.DSConfig < 1)
- pnetwork->network.configuration.DSConfig = 1;
+ if (pnetwork->network.configuration.ds_config < 1)
+ pnetwork->network.configuration.ds_config = 1;
/* Add frequency/channel */
iwe.cmd = SIOCGIWFREQ;
- iwe.u.freq.m = rtw_ch2freq(pnetwork->network.configuration.DSConfig) * 100000;
+ iwe.u.freq.m = rtw_ch2freq(pnetwork->network.configuration.ds_config) * 100000;
iwe.u.freq.e = 1;
- iwe.u.freq.i = pnetwork->network.configuration.DSConfig;
+ iwe.u.freq.i = pnetwork->network.configuration.ds_config;
start = iwe_stream_add_event(info, start, stop, &iwe, IW_EV_FREQ_LEN);
/* Add encryption capability */
else
snprintf(wrqu->name, IFNAMSIZ, "IEEE 802.11bg");
} else {
- if (pcur_bss->configuration.DSConfig <= 14) {
+ if (pcur_bss->configuration.ds_config <= 14) {
if (ht_cap)
snprintf(wrqu->name, IFNAMSIZ, "IEEE 802.11gn");
else
struct wlan_bssid_ex *pcur_bss = &pmlmepriv->cur_network.network;
if (check_fwstate(pmlmepriv, _FW_LINKED) == true) {
- /* wrqu->freq.m = ieee80211_wlan_frequencies[pcur_bss->configuration.DSConfig-1] * 100000; */
- wrqu->freq.m = rtw_ch2freq(pcur_bss->configuration.DSConfig) * 100000;
+ /* wrqu->freq.m = ieee80211_wlan_frequencies[pcur_bss->configuration.ds_config-1] * 100000; */
+ wrqu->freq.m = rtw_ch2freq(pcur_bss->configuration.ds_config) * 100000;
wrqu->freq.e = 1;
- wrqu->freq.i = pcur_bss->configuration.DSConfig;
+ wrqu->freq.i = pcur_bss->configuration.ds_config;
} else {
wrqu->freq.m = rtw_ch2freq(padapter->mlmeextpriv.cur_channel) * 100000;
pnetwork = list_entry(plist, struct wlan_network, list);
/* report network only if the current channel set contains the channel to which this network belongs */
- if (rtw_ch_set_search_ch(padapter->mlmeextpriv.channel_set, pnetwork->network.configuration.DSConfig) >= 0
+ if (rtw_ch_set_search_ch(padapter->mlmeextpriv.channel_set, pnetwork->network.configuration.ds_config) >= 0
&& true == rtw_validate_ssid(&(pnetwork->network.ssid))) {
ev = translate_scan(padapter, a, pnetwork, ev, stop);