diff options
Diffstat (limited to 'drivers/staging/rtl8192e/rtl8192e/rtl_core.c')
-rw-r--r-- | drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 30 |
1 files changed, 22 insertions, 8 deletions
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c index 5729cf678765..5615c80f614c 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c @@ -325,6 +325,7 @@ bool MgntActSet_RF_State(struct net_device *dev, enum rt_rf_power_state rtState; u16 RFWaitCounter = 0; unsigned long flag; + RT_TRACE((COMP_PS | COMP_RF), "===>MgntActSet_RF_State(): " "StateToSet(%d)\n", StateToSet); @@ -486,6 +487,7 @@ void rtl8192_tx_timeout(struct net_device *dev) void rtl8192_irq_enable(struct net_device *dev) { struct r8192_priv *priv = (struct r8192_priv *)rtllib_priv(dev); + priv->irq_enabled = 1; priv->ops->irq_enable(dev); @@ -598,9 +600,9 @@ static void rtl8192_qos_activate(void *data) RT_TRACE(COMP_QOS, "qos active process with associate response " "received\n"); - for (i = 0; i < QOS_QUEUE_NUM; i++) { + for (i = 0; i < QOS_QUEUE_NUM; i++) priv->rtllib->SetHwRegHandler(dev, HW_VAR_AC_PARAM, (u8 *)(&i)); - } + success: mutex_unlock(&priv->mutex); @@ -667,19 +669,18 @@ static int rtl8192_handle_beacon(struct net_device *dev, static int rtl8192_qos_association_resp(struct r8192_priv *priv, struct rtllib_network *network) { - int ret = 0; unsigned long flags; u32 size = sizeof(struct rtllib_qos_parameters); int set_qos_param = 0; if ((priv == NULL) || (network == NULL)) - return ret; + return 0; if (priv->rtllib->state != RTLLIB_LINKED) - return ret; + return 0; if ((priv->rtllib->iw_mode != IW_MODE_INFRA)) - return ret; + return 0; spin_lock_irqsave(&priv->rtllib->lock, flags); if (network->flags & NETWORK_HAS_QOS_PARAMETERS) { @@ -709,7 +710,7 @@ static int rtl8192_qos_association_resp(struct r8192_priv *priv, dm_init_edca_turbo(priv->rtllib->dev); queue_work_rsl(priv->priv_wq, &priv->qos_activate); } - return ret; + return 0; } static int rtl8192_handle_assoc_response(struct net_device *dev, @@ -717,6 +718,7 @@ static int rtl8192_handle_assoc_response(struct net_device *dev, struct rtllib_network *network) { struct r8192_priv *priv = rtllib_priv(dev); + rtl8192_qos_association_resp(priv, network); return 0; } @@ -762,6 +764,7 @@ void rtl8192_config_rate(struct net_device *dev, u16 *rate_config) struct r8192_priv *priv = rtllib_priv(dev); struct rtllib_network *net; u8 i = 0, basic_rate = 0; + net = &priv->rtllib->current_network; for (i = 0; i < net->rates_len; i++) { @@ -852,6 +855,7 @@ void rtl8192_config_rate(struct net_device *dev, u16 *rate_config) static void rtl8192_refresh_supportrate(struct r8192_priv *priv) { struct rtllib_device *ieee = priv->rtllib; + if (ieee->mode == WIRELESS_MODE_N_24G || ieee->mode == WIRELESS_MODE_N_5G) { memcpy(ieee->Regdot11HTOperationalRateSet, @@ -941,6 +945,7 @@ static int _rtl8192_sta_up(struct net_device *dev, bool is_silent_reset) struct rt_pwr_save_ctrl *pPSC = (struct rt_pwr_save_ctrl *) (&(priv->rtllib->PowerSaveControl)); bool init_status = true; + priv->bDriverIsGoingToUnload = false; priv->bdisable_nic = false; @@ -1270,6 +1275,7 @@ static short rtl8192_get_channel_map(struct net_device *dev) int i; struct r8192_priv *priv = rtllib_priv(dev); + if ((priv->rf_chip != RF_8225) && (priv->rf_chip != RF_8256) && (priv->rf_chip != RF_6052)) { RT_TRACE(COMP_ERR, "%s: unknown rf chip, can't set channel " @@ -1346,6 +1352,7 @@ short rtl8192_is_tx_queue_empty(struct net_device *dev) { int i = 0; struct r8192_priv *priv = rtllib_priv(dev); + for (i = 0; i <= MGNT_QUEUE; i++) { if ((i == TXCMD_QUEUE) || (i == HCCA_QUEUE)) continue; @@ -1503,7 +1510,7 @@ RESET_START: RT_TRACE(COMP_ERR, "%s():the driver is not up! " "return\n", __func__); up(&priv->wx_sem); - return ; + return; } priv->up = 0; @@ -1783,6 +1790,7 @@ void rtl819x_watchdog_wqcallback(void *data) void watch_dog_timer_callback(unsigned long data) { struct r8192_priv *priv = rtllib_priv((struct net_device *)data); + queue_delayed_work_rsl(priv->priv_wq, &priv->watch_dog_wq, 0); mod_timer(&priv->watch_dog_timer, jiffies + MSECS(RTLLIB_WATCH_DOG_TIME)); @@ -1794,6 +1802,7 @@ void watch_dog_timer_callback(unsigned long data) void rtl8192_rx_enable(struct net_device *dev) { struct r8192_priv *priv = (struct r8192_priv *)rtllib_priv(dev); + priv->ops->rx_enable(dev); } @@ -1816,6 +1825,7 @@ static void rtl8192_free_rx_ring(struct net_device *dev) rx_queue_idx++) { for (i = 0; i < priv->rxringcount; i++) { struct sk_buff *skb = priv->rx_buf[rx_queue_idx][i]; + if (!skb) continue; @@ -2080,6 +2090,7 @@ static short rtl8192_alloc_rx_desc_ring(struct net_device *dev) for (i = 0; i < priv->rxringcount; i++) { struct sk_buff *skb = dev_alloc_skb(priv->rxbuffersize); dma_addr_t *mapping; + entry = &priv->rx_ring[rx_queue_idx][i]; if (!skb) return 0; @@ -2171,6 +2182,7 @@ void rtl8192_pci_resetdescring(struct net_device *dev) for (rx_queue_idx = 0; rx_queue_idx < MAX_RX_QUEUE; rx_queue_idx++) { if (priv->rx_ring[rx_queue_idx]) { struct rx_desc *entry = NULL; + for (i = 0; i < priv->rxringcount; i++) { entry = &priv->rx_ring[rx_queue_idx][i]; entry->OWN = 1; @@ -2691,6 +2703,7 @@ static irqreturn_t rtl8192_interrupt(int irq, void *netdev) unsigned long flags; u32 inta; u32 intb; + intb = 0; if (priv->irq_enabled == 0) @@ -3049,6 +3062,7 @@ bool NicIFDisableNIC(struct net_device *dev) bool status = true; struct r8192_priv *priv = rtllib_priv(dev); u8 tmp_state = 0; + RT_TRACE(COMP_PS, "=========>%s()\n", __func__); priv->bdisable_nic = true; tmp_state = priv->rtllib->state; |