shortGIrate = psta_ht->sgi;
}
- if (pcur_network->Configuration.DSConfig > 14) {
+ if (pcur_network->DSConfig > 14) {
/* 5G band */
if (tx_ra_bitmap & 0xffff000)
sta_band |= WIRELESS_11_5N | WIRELESS_11A;
tx_ra_bitmap |= rtw_get_bit_value_from_ieee_value23a(psta->bssrateset[i]&0x7f);
}
- if (pcur_network->Configuration.DSConfig > 14) {
+ if (pcur_network->DSConfig > 14) {
/* force to A mode. 5G doesn't support CCK rates */
network_type = WIRELESS_11A;
tx_ra_bitmap = 0x150; /* 6, 12, 24 Mbps */
struct wlan_bssid_ex *pnetwork_mlmeext = &pmlmeinfo->network;
struct HT_info_element *pht_info = NULL;
- bcn_interval = (u16)pnetwork->Configuration.BeaconPeriod;
- cur_channel = pnetwork->Configuration.DSConfig;
+ bcn_interval = (u16)pnetwork->BeaconPeriod;
+ cur_channel = pnetwork->DSConfig;
cur_bwmode = HT_CHANNEL_WIDTH_20;;
cur_ch_offset = HAL_PRIME_CHNL_OFFSET_DONT_CARE;
/* beacon interval */
/* ie + 8; 8: TimeStamp, 2: Beacon Interval 2:Capability */
pbeacon = rtw_get_beacon_interval23a_from_ie(ie);
- pbss_network->Configuration.BeaconPeriod = get_unaligned_le16(pbeacon);
+ pbss_network->BeaconPeriod = get_unaligned_le16(pbeacon);
/* capability */
cap = get_unaligned_le16(ie);
/* chnnel */
channel = 0;
- pbss_network->Configuration.Length = 0;
p = rtw_get_ie23a(ie + _BEACON_IE_OFFSET_, WLAN_EID_DS_PARAMS, &ie_len,
(pbss_network->IELength - _BEACON_IE_OFFSET_));
if (p && ie_len > 0)
channel = *(p + 2);
- pbss_network->Configuration.DSConfig = channel;
+ pbss_network->DSConfig = channel;
memset(supportRate, 0, NDIS_802_11_LENGTH_RATES_EX);
/* get supported rates */
/* beacon interval : 2bytes */
/* BCN_INTERVAL; */
- *(u16*)ie = cpu_to_le16((u16)pdev_network->Configuration.BeaconPeriod);
+ *(u16*)ie = cpu_to_le16(pdev_network->BeaconPeriod);
sz += 2;
ie += 2;
/* supported rates */
if (pregistrypriv->wireless_mode == WIRELESS_11ABGN) {
- if (pdev_network->Configuration.DSConfig > 14)
+ if (pdev_network->DSConfig > 14)
wireless_mode = WIRELESS_11A_5N;
else
wireless_mode = WIRELESS_11BG_24N;
/* DS parameter set */
ie = rtw_set_ie23a(ie, WLAN_EID_DS_PARAMS, 1,
- (u8 *)&pdev_network->Configuration.DSConfig, &sz);
+ (u8 *)&pdev_network->DSConfig, &sz);
/* IBSS Parameter Set */
ie = rtw_set_ie23a(ie, WLAN_EID_IBSS_PARAMS, 2,
- (u8 *)&pdev_network->Configuration.ATIMWindow, &sz);
+ (u8 *)&pdev_network->ATIMWindow, &sz);
if (rateLen > 8) {
ie = rtw_set_ie23a(ie, WLAN_EID_EXT_SUPP_RATES, (rateLen - 8),
d_cap = get_unaligned_le16(rtw_get_capability23a_from_ie(dst->IEs));
return ((src->Ssid.ssid_len == dst->Ssid.ssid_len) &&
- /* (src->Configuration.DSConfig == dst->Configuration.DSConfig) && */
+ /* (src->DSConfig == dst->DSConfig) && */
ether_addr_equal(src->MacAddress, dst->MacAddress) &&
((!memcmp(src->Ssid.ssid, dst->Ssid.ssid, src->Ssid.ssid_len))) &&
((s_cap & WLAN_CAPABILITY_IBSS) ==
DBG_8723A("%s %s(%pM, ch%u) ss_ori:%3u, sq_ori:%3u, rssi_ori:%3ld, "
"ss_smp:%3u, sq_smp:%3u, rssi_smp:%3ld\n",
__func__, src->Ssid.ssid, src->MacAddress,
- src->Configuration.DSConfig, ss_ori, sq_ori, rssi_ori,
+ src->DSConfig, ss_ori, sq_ori, rssi_ori,
ss_smp, sq_smp, rssi_smp
);
DBG_8723A("%s: candidate: %s("MAC_FMT", ch:%u)\n", __func__,
candidate->network.Ssid.ssid,
MAC_ARG(candidate->network.MacAddress),
- candidate->network.Configuration.DSConfig);
+ candidate->network.DSConfig);
}
/* check for situation of _FW_LINKED */
memcpy(&pdev_network->Ssid, &pregistrypriv->ssid,
sizeof(struct cfg80211_ssid));
- pdev_network->Configuration.Length=sizeof(struct ndis_802_11_config);
- pdev_network->Configuration.BeaconPeriod = 100;
+ pdev_network->BeaconPeriod = 100;
}
void rtw_update_registrypriv_dev_network23a(struct rtw_adapter* adapter)
pdev_network->Rssi = 0;
- pdev_network->Configuration.DSConfig = pregistrypriv->channel;
+ pdev_network->DSConfig = pregistrypriv->channel;
RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_,
- ("pregistrypriv->channel =%d, pdev_network->Configuration."
- "DSConfig = 0x%x\n", pregistrypriv->channel,
- pdev_network->Configuration.DSConfig));
+ ("pregistrypriv->channel =%d, pdev_network->DSConfig = 0x%x\n",
+ pregistrypriv->channel, pdev_network->DSConfig));
if (cur_network->network.ifmode == NL80211_IFTYPE_ADHOC)
- pdev_network->Configuration.ATIMWindow = 0;
+ pdev_network->ATIMWindow = 0;
pdev_network->ifmode = cur_network->network.ifmode;
/* DS parameter set */
pframe = rtw_set_ie23a(pframe, WLAN_EID_DS_PARAMS, 1, (unsigned char *)
- &cur_network->Configuration.DSConfig,
- &pattrib->pktlen);
+ &cur_network->DSConfig, &pattrib->pktlen);
/* if ((pmlmeinfo->state&0x03) == WIFI_FW_ADHOC_STATE) */
{
u8 erpinfo = 0;
u32 ATIMWindow;
/* IBSS Parameter Set... */
- /* ATIMWindow = cur->Configuration.ATIMWindow; */
+ /* ATIMWindow = cur->ATIMWindow; */
ATIMWindow = 0;
pframe = rtw_set_ie23a(pframe, WLAN_EID_IBSS_PARAMS, 2,
(unsigned char *)&ATIMWindow,
/* DS parameter set */
pframe = rtw_set_ie23a(pframe, WLAN_EID_DS_PARAMS, 1,
- (unsigned char *)
- &cur_network->Configuration.DSConfig,
+ (unsigned char *)&cur_network->DSConfig,
&pattrib->pktlen);
if ((pmlmeinfo->state & 0x03) == WIFI_FW_ADHOC_STATE) {
u8 erpinfo = 0;
u32 ATIMWindow;
/* IBSS Parameter Set... */
- /* ATIMWindow = cur->Configuration.ATIMWindow; */
+ /* ATIMWindow = cur->ATIMWindow; */
ATIMWindow = 0;
pframe = rtw_set_ie23a(pframe, WLAN_EID_IBSS_PARAMS, 2,
(unsigned char *)&ATIMWindow,
pbss_network->IEs + _FIXED_IE_LENGTH_,
pbss_network->IELength -_FIXED_IE_LENGTH_);
if (!p || !p[1]) { /* non-HT */
- if (pbss_network->Configuration.DSConfig <= 0 ||
- pbss_network->Configuration.DSConfig > 14)
+ if (pbss_network->DSConfig <= 0 ||
+ pbss_network->DSConfig > 14)
continue;
- ICS[0][pbss_network->Configuration.DSConfig] = 1;
+ ICS[0][pbss_network->DSConfig] = 1;
if (ICS[0][0] == 0)
ICS[0][0] = 1;
p = cfg80211_find_ie(WLAN_EID_DS_PARAMS, bssid->IEs + ie_offset,
bssid->IELength - ie_offset);
- bssid->Configuration.DSConfig = 0;
- bssid->Configuration.Length = 0;
+ bssid->DSConfig = 0;
if (p) {
- bssid->Configuration.DSConfig = p[2];
+ bssid->DSConfig = p[2];
} else {/* In 5G, some ap do not have DSSET IE */
/* checking HT info for channel */
p = cfg80211_find_ie(WLAN_EID_HT_OPERATION,
if (p) {
struct HT_info_element *HT_info =
(struct HT_info_element *)(p + 2);
- bssid->Configuration.DSConfig =
- HT_info->primary_channel;
- } else { /* use current channel */
- bssid->Configuration.DSConfig =
- rtw_get_oper_ch23a(padapter);
- }
+ bssid->DSConfig = HT_info->primary_channel;
+ } else /* use current channel */
+ bssid->DSConfig = rtw_get_oper_ch23a(padapter);
}
if (ieee80211_is_probe_req(mgmt->frame_control)) {
return _SUCCESS;
}
- memcpy(&bssid->Configuration.BeaconPeriod,
- rtw_get_beacon_interval23a_from_ie(bssid->IEs), 2);
- bssid->Configuration.BeaconPeriod =
- le32_to_cpu(bssid->Configuration.BeaconPeriod);
+ bssid->BeaconPeriod = get_unaligned_le16(
+ rtw_get_beacon_interval23a_from_ie(bssid->IEs));
if (capab_info & BIT(0)) {
bssid->ifmode = NL80211_IFTYPE_STATION;
else
bssid->Privacy = 0;
- bssid->Configuration.ATIMWindow = 0;
+ bssid->ATIMWindow = 0;
/* 20/40 BSS Coexistence check */
if (pregistrypriv->wifi_spec == 1 &&
/* mark bss info receving from nearby channel as SignalQuality 101 */
- if (bssid->Configuration.DSConfig != rtw_get_oper_ch23a(padapter))
+ if (bssid->DSConfig != rtw_get_oper_ch23a(padapter))
bssid->PhyInfo.SignalQuality = 101;
return _SUCCESS;
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
struct wlan_bssid_ex *pnetwork = &pmlmeinfo->network;
- pmlmeext->cur_channel = (u8)pnetwork->Configuration.DSConfig;
+ pmlmeext->cur_channel = (u8)pnetwork->DSConfig;
pmlmeinfo->bcn_interval = get_beacon_interval23a(pnetwork);
/* update wireless mode */
struct wlan_bssid_ex *pnetwork = &pmlmeinfo->network;
int beacon_timeout;
- pmlmeext->cur_channel = (u8)pnetwork->Configuration.DSConfig;
+ pmlmeext->cur_channel = (u8)pnetwork->DSConfig;
pmlmeinfo->bcn_interval = get_beacon_interval23a(pnetwork);
/* update wireless mode */
}
/* If channel is used by AP, set channel scan type to active */
- channel = bssid->Configuration.DSConfig;
+ channel = bssid->DSConfig;
chplan_new = pmlmeext->channel_set;
i = 0;
while (i < MAX_CHANNEL_NUM && chplan_new[i].ChannelNum != 0) {
/* DS parameter set */
pframe = rtw_set_ie23a(pframe, WLAN_EID_DS_PARAMS, 1, (unsigned char *)
- &cur_network->Configuration.DSConfig, &pktlen);
+ &cur_network->DSConfig, &pktlen);
if ((pmlmeinfo->state&0x03) == WIFI_FW_ADHOC_STATE) {
u32 ATIMWindow;
/* IBSS Parameter Set... */
- /* ATIMWindow = cur->Configuration.ATIMWindow; */
+ /* ATIMWindow = cur->ATIMWindow; */
ATIMWindow = 0;
pframe = rtw_set_ie23a(pframe, WLAN_EID_IBSS_PARAMS, 2,
- (unsigned char *)(&ATIMWindow), &pktlen);
+ (unsigned char *)&ATIMWindow, &pktlen);
}
/* todo: ERP IE */
#define NDIS_802_11_LENGTH_RATES 8
#define NDIS_802_11_LENGTH_RATES_EX 16
-/*
- FW will only save the channel number in DSConfig.
- ODI Handler will convert the channel number to freq. number.
-*/
-struct ndis_802_11_config {
- 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_fixed_ies {
u8 Timestamp[8];
u16 BeaconInterval;
struct cfg80211_ssid Ssid;
u32 Privacy;
long Rssi;/* in dBM, raw data , get from PHY) */
- struct ndis_802_11_config Configuration;
+ u16 BeaconPeriod; /* units are Kusec */
+ u32 ATIMWindow; /* units are Kusec */
+ u32 DSConfig; /* Frequency, units are kHz */
enum nl80211_iftype ifmode;
unsigned char SupportedRates[NDIS_802_11_LENGTH_RATES_EX];
struct wlan_phy_info PhyInfo;
goto exit;
}
- channel = pnetwork->network.Configuration.DSConfig;
+ channel = pnetwork->network.DSConfig;
if (channel <= RTW_CH_MAX_2G_CHANNEL)
freq = ieee80211_channel_to_frequency(channel,
IEEE80211_BAND_2GHZ);
struct wiphy *wiphy = pwdev->wiphy;
struct ieee80211_channel *notify_channel;
u32 freq;
- u16 channel = cur_network->network.Configuration.DSConfig;
+ u16 channel = cur_network->network.DSConfig;
if (channel <= RTW_CH_MAX_2G_CHANNEL)
freq =
contains the channel to which this network belongs */
if (rtw_ch_set_search_ch23a
(padapter->mlmeextpriv.channel_set,
- pnetwork->network.Configuration.DSConfig) >= 0)
+ pnetwork->network.DSConfig) >= 0)
rtw_cfg80211_inform_bss(padapter, pnetwork);
}