);
if (p && ie_len > 0) {
memset(&pbss_network->ssid, 0, sizeof(struct ndis_802_11_ssid));
- memcpy(pbss_network->ssid.Ssid, (p + 2), ie_len);
- pbss_network->ssid.SsidLength = ie_len;
+ memcpy(pbss_network->ssid.ssid, (p + 2), ie_len);
+ pbss_network->ssid.ssid_length = ie_len;
}
/* channel */
int i;
for (i = 0; i < ssid_num && i < RTW_SSID_SCAN_AMOUNT; i++) {
- if (ssid[i].SsidLength) {
+ if (ssid[i].ssid_length) {
memcpy(&psurveyPara->ssid[i], &ssid[i], sizeof(struct ndis_802_11_ssid));
psurveyPara->ssid_num++;
}
ie += 2;
/* SSID */
- ie = rtw_set_ie(ie, WLAN_EID_SSID, pdev_network->ssid.SsidLength, pdev_network->ssid.Ssid, &sz);
+ ie = rtw_set_ie(ie, WLAN_EID_SSID, pdev_network->ssid.ssid_length, pdev_network->ssid.ssid, &sz);
/* supported rates */
wireless_mode = pregistrypriv->wireless_mode;
{
u8 ret = true;
- if (ssid->SsidLength > 32) {
+ if (ssid->ssid_length > 32) {
ret = false;
goto exit;
}
struct wlan_network *pnetwork = &pmlmepriv->cur_network;
netdev_dbg(padapter->pnetdev, "set ssid [%s] fw_state = 0x%08x\n",
- ssid->Ssid, get_fwstate(pmlmepriv));
+ ssid->ssid, get_fwstate(pmlmepriv));
if (padapter->hw_init_completed == false) {
status = _FAIL;
goto release_mlme_lock;
if (check_fwstate(pmlmepriv, _FW_LINKED|WIFI_ADHOC_MASTER_STATE) == true) {
- if ((pmlmepriv->assoc_ssid.SsidLength == ssid->SsidLength) &&
- (!memcmp(&pmlmepriv->assoc_ssid.Ssid, ssid->Ssid, ssid->SsidLength))) {
+ if ((pmlmepriv->assoc_ssid.ssid_length == ssid->ssid_length) &&
+ (!memcmp(&pmlmepriv->assoc_ssid.ssid, ssid->ssid, ssid->ssid_length))) {
if ((check_fwstate(pmlmepriv, WIFI_STATION_STATE) == false)) {
if (rtw_is_same_ibss(padapter, pnetwork) == false) {
/* if in WIFI_ADHOC_MASTER_STATE | WIFI_ADHOC_STATE, create bss or rejoin again */
inline int is_same_ess(struct wlan_bssid_ex *a, struct wlan_bssid_ex *b)
{
- return (a->ssid.SsidLength == b->ssid.SsidLength)
- && !memcmp(a->ssid.Ssid, b->ssid.Ssid, a->ssid.SsidLength);
+ return (a->ssid.ssid_length == b->ssid.ssid_length)
+ && !memcmp(a->ssid.ssid, b->ssid.ssid, a->ssid.ssid_length);
}
int is_same_network(struct wlan_bssid_ex *src, struct wlan_bssid_ex *dst, u8 feature)
s_cap = le16_to_cpu(tmps);
d_cap = le16_to_cpu(tmpd);
- return (src->ssid.SsidLength == dst->ssid.SsidLength) &&
+ return (src->ssid.ssid_length == dst->ssid.ssid_length) &&
/* (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))) &&
+ ((!memcmp(src->ssid.ssid, dst->ssid.ssid, src->ssid.ssid_length))) &&
((s_cap & WLAN_CAPABILITY_IBSS) ==
(d_cap & WLAN_CAPABILITY_IBSS)) &&
((s_cap & WLAN_CAPABILITY_ESS) ==
/* lock pmlmepriv->lock when you accessing network_q */
if ((check_fwstate(pmlmepriv, _FW_UNDER_LINKING)) == false) {
- if (pnetwork->ssid.Ssid[0] == 0)
- pnetwork->ssid.SsidLength = 0;
+ if (pnetwork->ssid.ssid[0] == 0)
+ pnetwork->ssid.ssid_length = 0;
rtw_add_network(adapter, pnetwork);
}
}
/* check ssid, if needed */
- if (mlme->assoc_ssid.Ssid[0] && mlme->assoc_ssid.SsidLength) {
- if (competitor->network.ssid.SsidLength != mlme->assoc_ssid.SsidLength
- || memcmp(competitor->network.ssid.Ssid, mlme->assoc_ssid.Ssid, mlme->assoc_ssid.SsidLength)
+ if (mlme->assoc_ssid.ssid[0] && mlme->assoc_ssid.ssid_length) {
+ if (competitor->network.ssid.ssid_length != mlme->assoc_ssid.ssid_length
+ || memcmp(competitor->network.ssid.ssid, mlme->assoc_ssid.ssid, mlme->assoc_ssid.ssid_length)
)
goto exit;
}
if (is_valid_p2p_probereq)
goto _issue_probersp;
- if ((ielen != 0 && false == !memcmp((void *)(p+2), (void *)cur->ssid.Ssid, cur->ssid.SsidLength))
+ if ((ielen != 0 && false == !memcmp((void *)(p+2), (void *)cur->ssid.ssid, cur->ssid.ssid_length))
|| (ielen == 0 && pmlmeinfo->hidden_ssid_mode)
)
return _SUCCESS;
goto OnAssocReqFail;
} else {
/* check if ssid match */
- if (memcmp((void *)(p+2), cur->ssid.Ssid, cur->ssid.SsidLength))
+ if (memcmp((void *)(p+2), cur->ssid.ssid, cur->ssid.ssid_length))
status = WLAN_STATUS_CHALLENGE_FAIL;
- if (ie_len != cur->ssid.SsidLength)
+ if (ie_len != cur->ssid.ssid_length)
status = WLAN_STATUS_CHALLENGE_FAIL;
}
pattrib->pktlen += 2;
/* SSID */
- pframe = rtw_set_ie(pframe, WLAN_EID_SSID, cur_network->ssid.SsidLength, cur_network->ssid.Ssid, &pattrib->pktlen);
+ pframe = rtw_set_ie(pframe, WLAN_EID_SSID, cur_network->ssid.ssid_length, cur_network->ssid.ssid, &pattrib->pktlen);
/* supported rates... */
rate_len = rtw_get_rateset_len(cur_network->supported_rates);
ssid_ie = rtw_get_ie(ies+_FIXED_IE_LENGTH_, WLAN_EID_SSID, &ssid_ielen,
(pframe-ies)-_FIXED_IE_LENGTH_);
- ssid_ielen_diff = cur_network->ssid.SsidLength - ssid_ielen;
+ ssid_ielen_diff = cur_network->ssid.ssid_length - ssid_ielen;
- if (ssid_ie && cur_network->ssid.SsidLength) {
+ if (ssid_ie && cur_network->ssid.ssid_length) {
uint remainder_ielen;
u8 *remainder_ie;
memcpy(buf, remainder_ie, remainder_ielen);
memcpy(remainder_ie+ssid_ielen_diff, buf, remainder_ielen);
- *(ssid_ie+1) = cur_network->ssid.SsidLength;
- memcpy(ssid_ie+2, cur_network->ssid.Ssid, cur_network->ssid.SsidLength);
+ *(ssid_ie+1) = cur_network->ssid.ssid_length;
+ memcpy(ssid_ie+2, cur_network->ssid.ssid, cur_network->ssid.ssid_length);
pframe += ssid_ielen_diff;
pattrib->pktlen += ssid_ielen_diff;
/* below for ad-hoc mode */
/* SSID */
- pframe = rtw_set_ie(pframe, WLAN_EID_SSID, cur_network->ssid.SsidLength, cur_network->ssid.Ssid, &pattrib->pktlen);
+ pframe = rtw_set_ie(pframe, WLAN_EID_SSID, cur_network->ssid.ssid_length, cur_network->ssid.ssid, &pattrib->pktlen);
/* supported rates... */
rate_len = rtw_get_rateset_len(cur_network->supported_rates);
pattrib->pktlen = sizeof(struct ieee80211_hdr_3addr);
if (pssid)
- pframe = rtw_set_ie(pframe, WLAN_EID_SSID, pssid->SsidLength, pssid->Ssid, &(pattrib->pktlen));
+ pframe = rtw_set_ie(pframe, WLAN_EID_SSID, pssid->ssid_length, pssid->ssid, &(pattrib->pktlen));
else
pframe = rtw_set_ie(pframe, WLAN_EID_SSID, 0, NULL, &(pattrib->pktlen));
pattrib->pktlen += 2;
/* SSID */
- pframe = rtw_set_ie(pframe, WLAN_EID_SSID, pmlmeinfo->network.ssid.SsidLength, pmlmeinfo->network.ssid.Ssid, &(pattrib->pktlen));
+ pframe = rtw_set_ie(pframe, WLAN_EID_SSID, pmlmeinfo->network.ssid.ssid_length, pmlmeinfo->network.ssid.ssid, &(pattrib->pktlen));
/* supported rate & extended supported rate */
int i;
for (i = 0; i < RTW_SSID_SCAN_AMOUNT; i++) {
- if (pmlmeext->sitesurvey_res.ssid[i].SsidLength) {
+ if (pmlmeext->sitesurvey_res.ssid[i].ssid_length) {
/* IOT issue, When wifi_spec is not set, send one probe req without WPS IE. */
if (padapter->registrypriv.wifi_spec)
issue_probereq(padapter, &(pmlmeext->sitesurvey_res.ssid[i]), NULL);
if (len > NDIS_802_11_LENGTH_SSID)
return _FAIL;
- memcpy(bssid->ssid.Ssid, (p + 2), *(p + 1));
- bssid->ssid.SsidLength = *(p + 1);
+ memcpy(bssid->ssid.ssid, (p + 2), *(p + 1));
+ bssid->ssid.ssid_length = *(p + 1);
} else
- bssid->ssid.SsidLength = 0;
+ bssid->ssid.ssid_length = 0;
memset(bssid->supported_rates, 0, NDIS_802_11_LENGTH_RATES_EX);
pmlmeext->sitesurvey_res.channel_idx = 0;
for (i = 0; i < RTW_SSID_SCAN_AMOUNT; i++) {
- if (pparm->ssid[i].SsidLength) {
- memcpy(pmlmeext->sitesurvey_res.ssid[i].Ssid, pparm->ssid[i].Ssid, IW_ESSID_MAX_SIZE);
- pmlmeext->sitesurvey_res.ssid[i].SsidLength = pparm->ssid[i].SsidLength;
+ if (pparm->ssid[i].ssid_length) {
+ memcpy(pmlmeext->sitesurvey_res.ssid[i].ssid, pparm->ssid[i].ssid, IW_ESSID_MAX_SIZE);
+ pmlmeext->sitesurvey_res.ssid[i].ssid_length = pparm->ssid[i].ssid_length;
} else {
- pmlmeext->sitesurvey_res.ssid[i].SsidLength = 0;
+ pmlmeext->sitesurvey_res.ssid[i].ssid_length = 0;
}
}
if (ssid_len > NDIS_802_11_LENGTH_SSID)
ssid_len = 0;
}
- memcpy(bssid->ssid.Ssid, (p + 2), ssid_len);
- bssid->ssid.SsidLength = ssid_len;
+ memcpy(bssid->ssid.ssid, (p + 2), ssid_len);
+ bssid->ssid.ssid_length = ssid_len;
- if (memcmp(bssid->ssid.Ssid, cur_network->network.ssid.Ssid, 32) ||
- bssid->ssid.SsidLength != cur_network->network.ssid.SsidLength)
- if (bssid->ssid.Ssid[0] != '\0' &&
- bssid->ssid.SsidLength != 0) /* not hidden ssid */
+ if (memcmp(bssid->ssid.ssid, cur_network->network.ssid.ssid, 32) ||
+ bssid->ssid.ssid_length != cur_network->network.ssid.ssid_length)
+ if (bssid->ssid.ssid[0] != '\0' &&
+ bssid->ssid.ssid_length != 0) /* not hidden ssid */
goto _mismatch;
/* check encryption info */
/* below for ad-hoc mode */
/* SSID */
- pframe = rtw_set_ie(pframe, WLAN_EID_SSID, cur_network->ssid.SsidLength, cur_network->ssid.Ssid, &pktlen);
+ pframe = rtw_set_ie(pframe, WLAN_EID_SSID, cur_network->ssid.ssid_length, cur_network->ssid.ssid, &pktlen);
/* supported rates... */
rate_len = rtw_get_rateset_len(cur_network->supported_rates);
typedef unsigned char NDIS_802_11_RATES_EX[NDIS_802_11_LENGTH_RATES_EX]; /* Set of 16 data rates */
struct ndis_802_11_ssid {
- u32 SsidLength;
- u8 Ssid[32];
+ u32 ssid_length;
+ u8 ssid[32];
};
enum ndis_802_11_network_type {
if (request->n_ssids == 1 && request->n_channels == 1) /* it means under processing WPS */
{
if (ssids[0].ssid_len != 0 &&
- (pssid->SsidLength != ssids[0].ssid_len ||
- memcmp(pssid->Ssid, ssids[0].ssid, ssids[0].ssid_len)))
+ (pssid->ssid_length != ssids[0].ssid_len ||
+ memcmp(pssid->ssid, ssids[0].ssid, ssids[0].ssid_len)))
{
if (psr)
*psr = 0; /* clear sr */
notify_channel = ieee80211_get_channel(padapter->rtw_wdev->wiphy, freq);
bss = cfg80211_get_bss(padapter->rtw_wdev->wiphy, notify_channel,
- pnetwork->mac_address, pnetwork->ssid.Ssid,
- pnetwork->ssid.SsidLength,
+ pnetwork->mac_address, pnetwork->ssid.ssid,
+ pnetwork->ssid.ssid_length,
WLAN_CAPABILITY_ESS, WLAN_CAPABILITY_ESS);
cfg80211_put_bss(padapter->rtw_wdev->wiphy, bss);
struct wlan_bssid_ex *select_network = &pnetwork->network;
bss = cfg80211_get_bss(wiphy, NULL/*notify_channel*/,
- select_network->mac_address, select_network->ssid.Ssid,
- select_network->ssid.SsidLength, 0/*WLAN_CAPABILITY_ESS*/,
+ select_network->mac_address, select_network->ssid.ssid,
+ select_network->ssid.ssid_length, 0/*WLAN_CAPABILITY_ESS*/,
0/*WLAN_CAPABILITY_ESS*/);
if (bss) {
/* parsing request ssids, n_ssids */
for (i = 0; i < request->n_ssids && i < RTW_SSID_SCAN_AMOUNT; i++) {
- memcpy(ssid[i].Ssid, ssids[i].ssid, ssids[i].ssid_len);
- ssid[i].SsidLength = ssids[i].ssid_len;
+ memcpy(ssid[i].ssid, ssids[i].ssid, ssids[i].ssid_len);
+ ssid[i].ssid_length = ssids[i].ssid_len;
}
/* parsing channels, n_channels */
}
memset(&ndis_ssid, 0, sizeof(struct ndis_802_11_ssid));
- ndis_ssid.SsidLength = params->ssid_len;
- memcpy(ndis_ssid.Ssid, (u8 *)params->ssid, params->ssid_len);
+ ndis_ssid.ssid_length = params->ssid_len;
+ memcpy(ndis_ssid.ssid, (u8 *)params->ssid, params->ssid_len);
psecuritypriv->ndisencryptstatus = Ndis802_11EncryptionDisabled;
psecuritypriv->dot11PrivacyAlgrthm = _NO_PRIVACY_;
}
memset(&ndis_ssid, 0, sizeof(struct ndis_802_11_ssid));
- ndis_ssid.SsidLength = sme->ssid_len;
- memcpy(ndis_ssid.Ssid, (u8 *)sme->ssid, sme->ssid_len);
+ ndis_ssid.ssid_length = sme->ssid_len;
+ memcpy(ndis_ssid.ssid, (u8 *)sme->ssid, sme->ssid_len);
if (check_fwstate(pmlmepriv, _FW_UNDER_LINKING) == true) {
ret = -EBUSY;
struct wlan_bssid_ex *pbss_network = &adapter->mlmepriv.cur_network.network;
struct wlan_bssid_ex *pbss_network_ext = &adapter->mlmeextpriv.mlmext_info.network;
- memcpy(pbss_network->ssid.Ssid, (void *)settings->ssid, settings->ssid_len);
- pbss_network->ssid.SsidLength = settings->ssid_len;
- memcpy(pbss_network_ext->ssid.Ssid, (void *)settings->ssid, settings->ssid_len);
- pbss_network_ext->ssid.SsidLength = settings->ssid_len;
+ memcpy(pbss_network->ssid.ssid, (void *)settings->ssid, settings->ssid_len);
+ pbss_network->ssid.ssid_length = settings->ssid_len;
+ memcpy(pbss_network_ext->ssid.ssid, (void *)settings->ssid, settings->ssid_len);
+ pbss_network_ext->ssid.ssid_length = settings->ssid_len;
}
return ret;
/* Add the ESSID */
iwe.cmd = SIOCGIWESSID;
iwe.u.data.flags = 1;
- iwe.u.data.length = min((u16)pnetwork->network.ssid.SsidLength, (u16)32);
- start = iwe_stream_add_point(info, start, stop, &iwe, pnetwork->network.ssid.Ssid);
+ iwe.u.data.length = min((u16)pnetwork->network.ssid.ssid_length, (u16)32);
+ start = iwe_stream_add_point(info, start, stop, &iwe, pnetwork->network.ssid.ssid);
/* parsing HT_CAP_IE */
if (pnetwork->network.Reserved[0] == 2) { /* Probe Request */
else
iwe.u.data.flags = IW_ENCODE_DISABLED;
iwe.u.data.length = 0;
- start = iwe_stream_add_point(info, start, stop, &iwe, pnetwork->network.ssid.Ssid);
+ start = iwe_stream_add_point(info, start, stop, &iwe, pnetwork->network.ssid.ssid);
/*Add basic and extended rates */
max_rate = 0;
if (wrqu->data.flags & IW_SCAN_THIS_ESSID) {
int len = min((int)req->essid_len, IW_ESSID_MAX_SIZE);
- memcpy(ssid[0].Ssid, req->essid, len);
- ssid[0].SsidLength = len;
+ memcpy(ssid[0].ssid, req->essid, len);
+ ssid[0].ssid_length = len;
spin_lock_bh(&pmlmepriv->lock);
sec_len = *(pos++); len -= 1;
if (sec_len > 0 && sec_len <= len) {
- ssid[ssid_index].SsidLength = sec_len;
- memcpy(ssid[ssid_index].Ssid, pos, ssid[ssid_index].SsidLength);
+ ssid[ssid_index].ssid_length = sec_len;
+ memcpy(ssid[ssid_index].ssid, pos, ssid[ssid_index].ssid_length);
ssid_index++;
}
len = (wrqu->essid.length < IW_ESSID_MAX_SIZE) ? wrqu->essid.length : IW_ESSID_MAX_SIZE;
memset(&ndis_ssid, 0, sizeof(struct ndis_802_11_ssid));
- ndis_ssid.SsidLength = len;
- memcpy(ndis_ssid.Ssid, extra, len);
- src_ssid = ndis_ssid.Ssid;
+ ndis_ssid.ssid_length = len;
+ memcpy(ndis_ssid.ssid, extra, len);
+ src_ssid = ndis_ssid.ssid;
spin_lock_bh(&queue->lock);
phead = get_list_head(queue);
pnetwork = list_entry(pmlmepriv->pscanned,
struct wlan_network, list);
- dst_ssid = pnetwork->network.ssid.Ssid;
+ dst_ssid = pnetwork->network.ssid.ssid;
- if ((!memcmp(dst_ssid, src_ssid, ndis_ssid.SsidLength)) &&
- (pnetwork->network.ssid.SsidLength == ndis_ssid.SsidLength)) {
+ if ((!memcmp(dst_ssid, src_ssid, ndis_ssid.ssid_length)) &&
+ (pnetwork->network.ssid.ssid_length == ndis_ssid.ssid_length)) {
if (check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == true) {
if (pnetwork->network.infrastructure_mode != pmlmepriv->cur_network.network.infrastructure_mode)
continue;
if ((check_fwstate(pmlmepriv, _FW_LINKED) == true) ||
(check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == true)) {
- len = pcur_bss->ssid.SsidLength;
+ len = pcur_bss->ssid.ssid_length;
wrqu->essid.length = len;
- memcpy(extra, pcur_bss->ssid.Ssid, len);
+ memcpy(extra, pcur_bss->ssid.ssid, len);
wrqu->essid.flags = 1;
} else {
memcpy(ssid, ssid_ie+2, ssid_len);
ssid[ssid_len] = 0x0;
- memcpy(pbss_network->ssid.Ssid, (void *)ssid, ssid_len);
- pbss_network->ssid.SsidLength = ssid_len;
- memcpy(pbss_network_ext->ssid.Ssid, (void *)ssid, ssid_len);
- pbss_network_ext->ssid.SsidLength = ssid_len;
+ memcpy(pbss_network->ssid.ssid, (void *)ssid, ssid_len);
+ pbss_network->ssid.ssid_length = ssid_len;
+ memcpy(pbss_network_ext->ssid.ssid, (void *)ssid, ssid_len);
+ pbss_network_ext->ssid.ssid_length = ssid_len;
}
return ret;
/* registry_par->hci = (u8)hci; */
registry_par->network_mode = (u8)rtw_network_mode;
- memcpy(registry_par->ssid.Ssid, "ANY", 3);
- registry_par->ssid.SsidLength = 3;
+ memcpy(registry_par->ssid.ssid, "ANY", 3);
+ registry_par->ssid.ssid_length = 3;
registry_par->channel = (u8)rtw_channel;
registry_par->wireless_mode = (u8)rtw_wireless_mode;