29 #define _RTL871X_IOCTL_SET_C_
37 #define IS_MAC_ADDRESS_BROADCAST(addr) \
39 ((addr[0] == 0xff) && (addr[1] == 0xff) && \
40 (addr[2] == 0xff) && (addr[3] == 0xff) && \
41 (addr[4] == 0xff) && (addr[5] == 0xff)) ? true : false \
52 if (!((ssid->
Ssid[i] >= 0x20) && (ssid->
Ssid[i] <= 0x7e)))
65 phead = get_list_head(queue);
74 _queue_empty(queue)) {
134 if (is_zero_ether_addr(bssid) || is_broadcast_ether_addr(bssid)) {
142 goto _Abort_Set_BSSID;
144 if (check_fwstate(pmlmepriv,
148 if (check_fwstate(pmlmepriv,
150 goto _Abort_Set_BSSID;
154 if (check_fwstate(pmlmepriv,
_FW_LINKED) ==
true)
157 if ((check_fwstate(pmlmepriv,
159 _clr_fwstate_(pmlmepriv,
167 status = do_join(padapter);
171 spin_unlock_irqrestore(&pmlmepriv->
lock, irqL);
187 goto _Abort_Set_SSID;
193 if ((check_fwstate(pmlmepriv,
196 pnetwork) ==
false) {
202 if (check_fwstate(pmlmepriv,
206 if (check_fwstate(pmlmepriv,
208 _clr_fwstate_(pmlmepriv,
210 set_fwstate(pmlmepriv,
214 goto _Abort_Set_SSID;
219 if (check_fwstate(pmlmepriv,
_FW_LINKED) ==
true)
222 if (check_fwstate(pmlmepriv,
224 _clr_fwstate_(pmlmepriv,
230 if (padapter->
securitypriv.btkip_countermeasure ==
true)
231 goto _Abort_Set_SSID;
232 if (validate_ssid(ssid) ==
false)
233 goto _Abort_Set_SSID;
240 spin_unlock_irqrestore(&pmlmepriv->
lock, irqL);
250 &(cur_network->
network.InfrastructureMode);
252 if (*pold_state != networktype) {
254 if ((check_fwstate(pmlmepriv,
_FW_LINKED) ==
true) ||
257 if (check_fwstate(pmlmepriv,
260 if ((check_fwstate(pmlmepriv,
_FW_LINKED) ==
true) ||
268 *pold_state = networktype;
274 switch (networktype) {
288 spin_unlock_irqrestore(&pmlmepriv->
lock, irqL);
298 if (check_fwstate(pmlmepriv,
_FW_LINKED) ==
true) {
303 spin_unlock_irqrestore(&pmlmepriv->
lock, irqL);
313 if (padapter ==
NULL)
327 spin_unlock_irqrestore(&pmlmepriv->
lock, irqL);
355 bdefaultkey = (wep->
KeyIndex & 0x40000000) > 0 ?
false :
true;
356 btransmitkey = (wep->
KeyIndex & 0x80000000) > 0 ?
true :
false;