struct led_priv ledpriv;
struct mp_priv mppriv;
bool driver_stopped;
- s32 bSurpriseRemoved;
+ bool surprise_removed;
s32 bSuspended;
u32 IsrContent;
u32 ImrContent;
mutex_lock(&padapter->mutex_start);
if (!padapter->bup) {
padapter->driver_stopped = false;
- padapter->bSurpriseRemoved = false;
+ padapter->surprise_removed = false;
padapter->bup = true;
if (rtl871x_hal_init(padapter) != _SUCCESS)
goto netdev_open_error;
while (1) {
if (wait_for_completion_interruptible(cmd_queue_comp))
break;
- if (padapter->driver_stopped || padapter->bSurpriseRemoved)
+ if (padapter->driver_stopped || padapter->surprise_removed)
break;
if (r8712_register_cmd_alive(padapter) != _SUCCESS)
continue;
memcpy((u8 *)pcmdbuf, pcmd->parmbuf, pcmd->cmdsz);
while (check_cmd_fifo(padapter, wr_sz) == _FAIL) {
if (padapter->driver_stopped ||
- padapter->bSurpriseRemoved)
+ padapter->surprise_removed)
break;
msleep(100);
continue;
{
struct intf_hdl *hdl = &adapter->pio_queue->intf;
- if (adapter->driver_stopped || adapter->bSurpriseRemoved)
+ if (adapter->driver_stopped || adapter->surprise_removed)
return;
hdl->io_ops._read_mem(hdl, addr, cnt, pmem);
{
struct intf_hdl *hdl = &adapter->pio_queue->intf;
- if (adapter->driver_stopped || adapter->bSurpriseRemoved)
+ if (adapter->driver_stopped || adapter->surprise_removed)
return;
hdl->io_ops._read_port(hdl, addr, cnt, pmem);
{
u8 LedCfg;
- if (padapter->bSurpriseRemoved || padapter->driver_stopped)
+ if (padapter->surprise_removed || padapter->driver_stopped)
return;
LedCfg = r8712_read8(padapter, LEDCFG);
switch (pLed->LedPin) {
{
u8 LedCfg;
- if (padapter->bSurpriseRemoved || padapter->driver_stopped)
+ if (padapter->surprise_removed || padapter->driver_stopped)
return;
LedCfg = r8712_read8(padapter, LEDCFG);
switch (pLed->LedPin) {
/* This fixed the crash problem on Fedora 12 when trying to do the
* insmod;ifconfig up;rmmod commands.
*/
- if (pLed->padapter->bSurpriseRemoved || pLed->padapter->driver_stopped)
+ if (pLed->padapter->surprise_removed || pLed->padapter->driver_stopped)
return;
schedule_work(&pLed->BlinkWorkItem);
}
/*indicate this recv_frame*/
if (!pattrib->amsdu) {
if (!padapter->driver_stopped &&
- !padapter->bSurpriseRemoved) {
+ !padapter->surprise_removed) {
/* indicate this recv_frame */
r8712_recv_indicatepkt(padapter,
prframe);
r8712_wlanhdr_to_ethhdr(prframe);
if (pattrib->qos != 1) {
if (!padapter->driver_stopped &&
- !padapter->bSurpriseRemoved) {
+ !padapter->surprise_removed) {
r8712_recv_indicatepkt(padapter, prframe);
return _SUCCESS;
} else {
struct __queue *ppending_recvframe_queue =
&preorder_ctrl->pending_recvframe_queue;
- if (padapter->driver_stopped || padapter->bSurpriseRemoved)
+ if (padapter->driver_stopped || padapter->surprise_removed)
return;
spin_lock_irqsave(&ppending_recvframe_queue->lock, irql);
r8712_recv_indicatepkts_in_order(padapter, preorder_ctrl, true);
if (recv_indicatepkt_reorder(padapter, prframe) != _SUCCESS) {
/* including perform A-MPDU Rx Ordering Buffer Control*/
if (!padapter->driver_stopped &&
- !padapter->bSurpriseRemoved)
+ !padapter->surprise_removed)
return _FAIL;
}
} else { /*B/G mode*/
retval = r8712_wlanhdr_to_ethhdr(prframe);
if (retval != _SUCCESS)
return retval;
- if (!padapter->driver_stopped && !padapter->bSurpriseRemoved) {
+ if (!padapter->driver_stopped && !padapter->surprise_removed) {
/* indicate this recv_frame */
r8712_recv_indicatepkt(padapter, prframe);
} else {
{
u16 x, mask;
- if (padapter->bSurpriseRemoved)
+ if (padapter->surprise_removed)
goto out;
mask = 0x01 << (count - 1);
x = r8712_read8(padapter, EE_9346CR);
x &= ~_EEDI;
if (data & mask)
x |= _EEDI;
- if (padapter->bSurpriseRemoved)
+ if (padapter->surprise_removed)
goto out;
r8712_write8(padapter, EE_9346CR, (u8)x);
udelay(CLOCK_RATE);
down_clk(padapter, &x);
mask >>= 1;
} while (mask);
- if (padapter->bSurpriseRemoved)
+ if (padapter->surprise_removed)
goto out;
x &= ~_EEDI;
r8712_write8(padapter, EE_9346CR, (u8)x);
{
u16 x, d = 0, i;
- if (padapter->bSurpriseRemoved)
+ if (padapter->surprise_removed)
goto out;
x = r8712_read8(padapter, EE_9346CR);
x &= ~(_EEDO | _EEDI);
for (i = 0; i < 16; i++) {
d <<= 1;
up_clk(padapter, &x);
- if (padapter->bSurpriseRemoved)
+ if (padapter->surprise_removed)
goto out;
x = r8712_read8(padapter, EE_9346CR);
x &= ~(_EEDI);
{
u16 x;
- if (padapter->bSurpriseRemoved)
+ if (padapter->surprise_removed)
return;
x = r8712_read8(padapter, EE_9346CR);
- if (padapter->bSurpriseRemoved)
+ if (padapter->surprise_removed)
return;
x &= ~(_EECS | _EEDI);
r8712_write8(padapter, EE_9346CR, (u8)x);
- if (padapter->bSurpriseRemoved)
+ if (padapter->surprise_removed)
return;
up_clk(padapter, &x);
- if (padapter->bSurpriseRemoved)
+ if (padapter->surprise_removed)
return;
down_clk(padapter, &x);
}
tmp8_clk_new = tmp8_clk_ori | 0x20;
if (tmp8_clk_new != tmp8_clk_ori)
r8712_write8(padapter, 0x10250003, tmp8_clk_new);
- if (padapter->bSurpriseRemoved)
+ if (padapter->surprise_removed)
goto out;
/* select EEPROM, reset bits, set _EECS */
x = r8712_read8(padapter, EE_9346CR);
- if (padapter->bSurpriseRemoved)
+ if (padapter->surprise_removed)
goto out;
x &= ~(_EEDI | _EEDO | _EESK | _EEM0);
x |= _EEM1 | _EECS;
r8712_write8(padapter, 0x102502f1, tmp8_ori);
return data;
}
-
{
sint res;
- if (padapter->driver_stopped || padapter->bSurpriseRemoved ||
+ if (padapter->driver_stopped || padapter->surprise_removed ||
!check_fwstate(&padapter->mlmepriv, _FW_LINKED)) {
res = false;
} else {
unsigned long irqL;
struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
- if (adapter->driver_stopped || adapter->bSurpriseRemoved)
+ if (adapter->driver_stopped || adapter->surprise_removed)
return;
spin_lock_irqsave(&pmlmepriv->lock, irqL);
_clr_fwstate_(pmlmepriv, _FW_UNDER_LINKING);
void _r8712_dhcp_timeout_handler (struct _adapter *adapter)
{
- if (adapter->driver_stopped || adapter->bSurpriseRemoved)
+ if (adapter->driver_stopped || adapter->surprise_removed)
return;
if (adapter->pwrctrlpriv.pwr_mode != adapter->registrypriv.power_mgnt)
r8712_set_ps_mode(adapter, adapter->registrypriv.power_mgnt,
if (pwrpriv->rpwm_retry == 0)
return;
}
- if (padapter->driver_stopped || padapter->bSurpriseRemoved)
+ if (padapter->driver_stopped || padapter->surprise_removed)
return;
rpwm = val8 | pwrpriv->tog;
switch (val8) {
{
struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv;
- if (padapter->driver_stopped || padapter->bSurpriseRemoved)
+ if (padapter->driver_stopped || padapter->surprise_removed)
return;
if (pwrpriv->cpwm != pwrpriv->rpwm)
schedule_work(&pwrpriv->rpwm_workitem);
void rtl871x_intf_stop(struct _adapter *padapter)
{
/*disable_hw_interrupt*/
- if (!padapter->bSurpriseRemoved) {
+ if (!padapter->surprise_removed) {
/*device still exists, so driver can do i/o operation
* TODO:
*/
r8712_stop_drv_threads(padapter);
/*s5.*/
- if (!padapter->bSurpriseRemoved) {
+ if (!padapter->surprise_removed) {
padapter->hw_init_completed = false;
rtl8712_hal_deinit(padapter);
}
/* never exit with a firmware callback pending */
wait_for_completion(&padapter->rtl8712_fw_ready);
if (drvpriv.drv_registered)
- padapter->bSurpriseRemoved = true;
+ padapter->surprise_removed = true;
unregister_netdev(pnetdev); /* will call netdev_close() */
flush_scheduled_work();
udelay(1);
if (purb->status == (-ESHUTDOWN))
padapter->driver_stopped = true;
else
- padapter->bSurpriseRemoved = true;
+ padapter->surprise_removed = true;
}
complete(&pintfpriv->io_retevt_comp);
}
struct usb_device *pusbd = pdvobj->pusbdev;
struct urb *piorw_urb = pintfpriv->piorw_urb;
- if ((padapter->driver_stopped) || (padapter->bSurpriseRemoved) ||
+ if ((padapter->driver_stopped) || (padapter->surprise_removed) ||
(padapter->pwrctrlpriv.pnp_bstop_trx))
return;
/* translate DMA FIFO addr to pipehandle */
struct _adapter *padapter = (struct _adapter *)precvbuf->adapter;
struct recv_priv *precvpriv = &padapter->recvpriv;
- if (padapter->bSurpriseRemoved || padapter->driver_stopped)
+ if (padapter->surprise_removed || padapter->driver_stopped)
return;
if (purb->status == 0) { /* SUCCESS */
if ((purb->actual_length > (MAX_RECVBUF_SZ)) ||
struct recv_priv *precvpriv = &adapter->recvpriv;
struct usb_device *pusbd = pdvobj->pusbdev;
- if (adapter->driver_stopped || adapter->bSurpriseRemoved ||
+ if (adapter->driver_stopped || adapter->surprise_removed ||
adapter->pwrctrlpriv.pnp_bstop_trx || !precvbuf)
return _FAIL;
r8712_init_recvbuf(adapter, precvbuf);
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
if (padapter->driver_stopped ||
- padapter->bSurpriseRemoved) {
- netdev_err(padapter->pnetdev, "xmit_bh => driver_stopped or bSurpriseRemoved\n");
+ padapter->surprise_removed) {
+ netdev_err(padapter->pnetdev, "xmit_bh => driver_stopped or surprise_removed\n");
return;
}
ret = r8712_xmitframe_complete(padapter, pxmitpriv, NULL);
break;
}
}
- if (padapter->bSurpriseRemoved)
+ if (padapter->surprise_removed)
return;
switch (purb->status) {
case 0:
struct usb_device *pusbd = pdvobj->pusbdev;
struct pkt_attrib *pattrib = &pxmitframe->attrib;
- if ((padapter->driver_stopped) || (padapter->bSurpriseRemoved) ||
+ if ((padapter->driver_stopped) || (padapter->surprise_removed) ||
(padapter->pwrctrlpriv.pnp_bstop_trx))
return _FAIL;
for (i = 0; i < 8; i++) {