u8 chanset_size,
struct p2p_channels *channel_list)
{
-
static const struct p2p_oper_class_map op_class[] = {
{ IEEE80211G, 81, 1, 13, 1, BW20 },
{ IEEE80211G, 82, 14, 14, 1, BW20 },
}
}
channel_list->reg_classes = cla;
-
}
static u8 init_channel_set(struct adapter *padapter, u8 ChannelPlan, struct rt_channel_info *channel_set)
}
return _SUCCESS;
-
}
unsigned int OnProbeRsp(struct adapter *padapter, union recv_frame *precv_frame)
}
return _SUCCESS;
-
}
unsigned int OnBeacon(struct adapter *padapter, union recv_frame *precv_frame)
_END_ONBEACON_:
return _SUCCESS;
-
}
unsigned int OnAuth(struct adapter *padapter, union recv_frame *precv_frame)
pstat = rtw_get_stainfo(pstapriv, sa);
if (!pstat) {
-
/* allocate a new one */
pstat = rtw_alloc_stainfo(pstapriv, sa);
if (!pstat) {
/* pstat->flags = 0; */
/* pstat->capability = 0; */
} else {
-
spin_lock_bh(&pstapriv->asoc_list_lock);
if (!list_empty(&pstat->asoc_list)) {
list_del_init(&pstat->asoc_list);
spin_lock_bh(&pstapriv->auth_list_lock);
if (list_empty(&pstat->auth_list)) {
-
list_add_tail(&pstat->auth_list, &pstapriv->auth_list);
pstapriv->auth_list_cnt++;
}
pstat->state |= WIFI_FW_AUTH_STATE;
pstat->authalg = algorithm;
} else if (seq == 3) {
-
p = rtw_get_ie(pframe + WLAN_HDR_A3_LEN + 4 + _AUTH_IE_OFFSET_, WLAN_EID_CHALLENGE, (int *)&ie_len,
len - WLAN_HDR_A3_LEN - _AUTH_IE_OFFSET_ - 4);
issue_auth(padapter, pstat, (unsigned short)status);
return _FAIL;
-
}
unsigned int OnAuthClient(struct adapter *padapter, union recv_frame *precv_frame)
/* pmlmeinfo->state &= ~(WIFI_FW_AUTH_STATE); */
return _FAIL;
-
}
unsigned int OnAssocReq(struct adapter *padapter, union recv_frame *precv_frame)
p = rtw_get_ie(pframe + WLAN_HDR_A3_LEN + ie_offset, WLAN_EID_EXT_SUPP_RATES, &ie_len,
pkt_len - WLAN_HDR_A3_LEN - ie_offset);
if (p) {
-
if (support_rate_num + ie_len <= sizeof(supportRate)) {
memcpy(supportRate + support_rate_num, p + 2, ie_len);
support_rate_num += ie_len;
pstat->wpa2_pairwise_cipher = 0;
memset(pstat->wpa_ie, 0, sizeof(pstat->wpa_ie));
if ((psecuritypriv->wpa_psk & BIT(1)) && elems.rsn_ie) {
-
int group_cipher = 0, pairwise_cipher = 0;
wpa_ie = elems.rsn_ie;
}
} else if ((psecuritypriv->wpa_psk & BIT(0)) && elems.wpa_ie) {
-
int group_cipher = 0, pairwise_cipher = 0;
wpa_ie = elems.wpa_ie;
status = WLAN_STATUS_INVALID_IE;
goto OnAssocReqFail;
-
}
if (elems.wps_ie) {
if (copy_len > 0)
memcpy(pstat->wpa_ie, wpa_ie-2, copy_len);
-
}
/* check if there is WMM IE & support WWM-PS */
pstat->uapsd_be = BIT(0)|BIT(1);
else
pstat->uapsd_be = 0;
-
}
break;
/* if (pstat->aid > NUM_STA) { */
if (pstat->aid > pstapriv->max_num_sta) {
-
pstat->aid = 0;
status = WLAN_STATUS_AP_UNABLE_TO_HANDLE_NEW_STA;
list_del_init(&psta->asoc_list);
pstapriv->asoc_list_cnt--;
updated = ap_free_sta(padapter, psta, false, reason);
-
}
spin_unlock_bh(&pstapriv->asoc_list_lock);
list_del_init(&psta->asoc_list);
pstapriv->asoc_list_cnt--;
updated = ap_free_sta(padapter, psta, false, reason);
-
}
spin_unlock_bh(&pstapriv->asoc_list_lock);
pmlmepriv->link_detect_info.busy_traffic = false;
return _SUCCESS;
-
}
unsigned int OnAtim(struct adapter *padapter, union recv_frame *precv_frame)
if (category == ptable->num)
ptable->func(padapter, precv_frame);
-
}
return _SUCCESS;
-
}
unsigned int DoReserved(struct adapter *padapter, union recv_frame *precv_frame)
exit:
return pmgntframe;
-
}
inline struct xmit_frame *alloc_mgtxmitframe(struct xmit_priv *pxmitpriv)
pattrib->retry_ctrl = true;
pattrib->mbssid = 0;
-
}
void update_mgntframe_attrib_addr(struct adapter *padapter, struct xmit_frame *pmgntframe)
}
goto _issue_bcn;
-
}
/* below for ad-hoc mode */
dump_mgntframe_and_wait(padapter, pmgntframe, timeout_ms);
else
dump_mgntframe(padapter, pmgntframe);
-
}
void issue_probersp(struct adapter *padapter, unsigned char *da, u8 is_valid_p2p_probereq)
pframe = rtw_set_ie(pframe, WLAN_EID_EXT_SUPP_RATES, (rate_len - 8), (cur_network->supported_rates + 8), &pattrib->pktlen);
/* todo:HT for adhoc */
-
}
pattrib->last_txcmdsz = pattrib->pktlen;
pattrib->icv_len = 4;
pattrib->pktlen += pattrib->icv_len;
-
}
-
}
pattrib->last_txcmdsz = pattrib->pktlen;
pframe += (ie_len+2);
pattrib->pktlen += (ie_len+2);
}
-
}
/* FILL WMM IE */
if (!pbuf || ie_len == 0)
break;
}
-
}
if (pmlmeinfo->assoc_AP_vendor == HT_IOT_PEER_REALTEK)
iedata |= BIT(2);/* 20 MHz BSS Width Request */
pframe = rtw_set_ie(pframe, WLAN_EID_BSS_COEX_2040, 1, &iedata, &(pattrib->pktlen));
-
}
/* */
if (ICS[0][0] == 0)
ICS[0][0] = 1;
}
-
}
spin_unlock_bh(&(pmlmepriv->scanned_queue.lock));
}
pframe = rtw_set_ie(pframe, WLAN_EID_BSS_INTOLERANT_CHL_REPORT, k, InfoContent, &(pattrib->pktlen));
-
}
-
}
pattrib->last_txcmdsz = pattrib->pktlen;
issue_action_BA(padapter, addr, WLAN_ACTION_DELBA, (((tid << 1) | initiator)&0x1F));
psta->htpriv.agg_enable_bitmap &= ~BIT(tid);
psta->htpriv.candidate_tid_bitmap &= ~BIT(tid);
-
}
}
}
return _SUCCESS;
-
}
unsigned int send_beacon(struct adapter *padapter)
set_survey_timer(pmlmeext, channel_scan_time_ms);
} else {
-
/* channel number is 0 or this channel is not valid. */
{
}
/* update bc/mc sta_info */
update_bmc_sta(padapter);
-
}
void start_clnt_join(struct adapter *padapter)
} else {
return;
}
-
}
void start_clnt_auth(struct adapter *padapter)
issue_auth(padapter, NULL, 0);
set_link_timer(pmlmeext, REAUTH_TO);
-
}
void start_clnt_assoc(struct adapter *padapter)
while ((i < MAX_CHANNEL_NUM) &&
(chplan_sta[i].ChannelNum != 0) &&
(chplan_sta[i].ChannelNum <= 14)) {
-
chplan_new[k].ChannelNum = chplan_sta[i].ChannelNum;
chplan_new[k].ScanType = SCAN_PASSIVE;
i++;
psta->htpriv.sgi_20m = false;
psta->htpriv.sgi_40m = false;
psta->qos_option = false;
-
}
psta->htpriv.ch_offset = pmlmeext->cur_ch_offset;
spin_lock_bh(&psta->lock);
psta->state = _FW_LINKED;
spin_unlock_bh(&psta->lock);
-
}
static void rtw_mlmeext_disconnect(struct adapter *padapter)
pmlmepriv->link_detect_info.traffic_transition_count = 0;
pmlmepriv->link_detect_info.low_power_transition_count = 0;
-
}
void mlmeext_joinbss_event_callback(struct adapter *padapter, int join_res)
}
pmlmeinfo->state |= WIFI_FW_ASSOC_SUCCESS;
-
}
join_type = 2;
struct dvobj_priv *pdvobj = adapter_to_dvobj(padapter);
if (padapter->bLinkInfoDump) {
-
if ((pmlmeinfo->state&0x03) == WIFI_FW_STATION_STATE)
rtw_hal_get_def_var(padapter,
HAL_DEF_UNDERCORATEDSMOOTHEDPWDB,
if (phtpriv->ht_option && phtpriv->ampdu_enable) {
if (phtpriv->candidate_tid_bitmap)
phtpriv->candidate_tid_bitmap = 0x0;
-
}
}
memcpy(pnetwork->ies, ((struct wlan_bssid_ex *)pbuf)->ies, pnetwork->ie_length);
start_create_ibss(padapter);
-
}
return H2C_SUCCESS;
-
}
u8 join_cmd_hdl(struct adapter *padapter, u8 *pbuf)
start_clnt_join(padapter);
return H2C_SUCCESS;
-
}
u8 disconnect_hdl(struct adapter *padapter, unsigned char *pbuf)
/* acquire channels from in */
j = 0;
for (i = 0; i < in_num; i++) {
-
set_idx = rtw_ch_set_search_ch(pmlmeext->channel_set, in[i].hw_value);
if (in[i].hw_value && !(in[i].flags & RTW_IEEE80211_CHAN_DISABLED)
&& set_idx >= 0
/* if out is empty, use channel_set as default */
if (j == 0) {
for (i = 0; i < pmlmeext->max_chan_nums; i++) {
-
if (j >= out_num) {
netdev_dbg(padapter->pnetdev,
FUNC_ADPT_FMT " out_num:%u not enough\n",