diff options
Diffstat (limited to 'drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c')
-rw-r--r-- | drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c index 4a35f9b5602d..0ffed2d06b58 100644 --- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c +++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c @@ -62,6 +62,7 @@ static void rtl8192e_update_msr(struct net_device *dev) struct r8192_priv *priv = rtllib_priv(dev); u8 msr; enum led_ctl_mode LedAction = LED_CTL_NO_LINK; + msr = read_nic_byte(dev, MSR); msr &= ~MSR_LINK_MASK; @@ -166,6 +167,7 @@ void rtl8192e_SetHwReg(struct net_device *dev, u8 variable, u8 *val) case HW_VAR_ACK_PREAMBLE: { u32 regTmp; + priv->short_preamble = (bool)(*(u8 *)val); regTmp = priv->basic_rate; if (priv->short_preamble) @@ -299,6 +301,7 @@ void rtl8192e_SetHwReg(struct net_device *dev, u8 variable, u8 *val) case HW_VAR_RF_TIMING: { u8 Rf_Timing = *((u8 *)val); + write_nic_byte(dev, rFPGA0_RFTiming1, Rf_Timing); break; } @@ -318,6 +321,7 @@ static void rtl8192_read_eeprom_info(struct net_device *dev) u16 i, usValue, IC_Version; u16 EEPROMId; u8 bMac_Tmp_Addr[6] = {0x00, 0xe0, 0x4c, 0x00, 0x00, 0x01}; + RT_TRACE(COMP_INIT, "====> rtl8192_read_eeprom_info\n"); EEPROMId = eprom_read(dev, 0); @@ -682,6 +686,7 @@ static void rtl8192_hwconfig(struct net_device *dev) write_nic_byte(dev, BW_OPMODE, regBwOpMode); { u32 ratr_value = 0; + ratr_value = regRATR; if (priv->rf_type == RF_1T2R) ratr_value &= ~(RATE_ALL_OFDM_2SS); @@ -807,6 +812,7 @@ start: CamResetAllEntry(dev); { u8 SECR_value = 0x0; + SECR_value |= SCR_TxEncEnable; SECR_value |= SCR_RxDecEnable; SECR_value |= SCR_NoSKMC; @@ -816,6 +822,7 @@ start: write_nic_word(dev, BCN_INTERVAL, 100); { int i; + for (i = 0; i < QOS_QUEUE_NUM; i++) write_nic_dword(dev, WDCAPARA_ADD[i], 0x005e4332); } @@ -1003,6 +1010,7 @@ void rtl8192_link_change(struct net_device *dev) if (ieee->iw_mode == IW_MODE_INFRA || ieee->iw_mode == IW_MODE_ADHOC) { u32 reg = 0; + reg = read_nic_dword(dev, RCR); if (priv->rtllib->state == RTLLIB_LINKED) { if (ieee->IntelPromiscuousModeInfo.bPromiscuousOn) @@ -1175,6 +1183,7 @@ void rtl8192_tx_fill_desc(struct net_device *dev, struct tx_desc *pdesc, dma_addr_t mapping = pci_map_single(priv->pdev, skb->data, skb->len, PCI_DMA_TODEVICE); struct tx_fwinfo_8190pci *pTxFwInfo = NULL; + pTxFwInfo = (struct tx_fwinfo_8190pci *)skb->data; memset(pTxFwInfo, 0, sizeof(struct tx_fwinfo_8190pci)); pTxFwInfo->TxHT = (cb_desc->data_rate & 0x80) ? 1 : 0; @@ -1233,6 +1242,7 @@ void rtl8192_tx_fill_desc(struct net_device *dev, struct tx_desc *pdesc, pdesc->SecType = 0x0; if (cb_desc->bHwSec) { static u8 tmp; + if (!tmp) { RT_TRACE(COMP_DBG, "==>================hw sec\n"); tmp = 1; @@ -1293,6 +1303,7 @@ void rtl8192_tx_fill_cmd_desc(struct net_device *dev, entry->CmdInit = DESC_PACKET_TYPE_INIT; } else { struct tx_desc * entry_tmp = (struct tx_desc *)entry; + entry_tmp->CmdInit = DESC_PACKET_TYPE_NORMAL; entry_tmp->Offset = sizeof(struct tx_fwinfo_8190pci) + 8; entry_tmp->PktSize = (u16)(cb_desc->pkt_size + @@ -2031,6 +2042,7 @@ bool rtl8192_rx_query_status_desc(struct net_device *dev, return false; } else { struct rx_fwinfo *pDrvInfo = NULL; + stats->RxDrvInfoSize = pdesc->RxDrvInfoSize; stats->RxBufShift = ((pdesc->Shift)&0x03); stats->Decrypted = !pdesc->SWDec; @@ -2220,6 +2232,7 @@ rtl8192_InitializeVariables(struct net_device *dev) void rtl8192_EnableInterrupt(struct net_device *dev) { struct r8192_priv *priv = (struct r8192_priv *)rtllib_priv(dev); + priv->irq_enabled = 1; write_nic_dword(dev, INTA_MASK, priv->irq_mask[0]); @@ -2238,6 +2251,7 @@ void rtl8192_DisableInterrupt(struct net_device *dev) void rtl8192_ClearInterrupt(struct net_device *dev) { u32 tmp = 0; + tmp = read_nic_dword(dev, ISR); write_nic_dword(dev, ISR, tmp); } @@ -2246,6 +2260,7 @@ void rtl8192_ClearInterrupt(struct net_device *dev) void rtl8192_enable_rx(struct net_device *dev) { struct r8192_priv *priv = (struct r8192_priv *)rtllib_priv(dev); + write_nic_dword(dev, RDQDA, priv->rx_ring_dma[RX_MPDU_QUEUE]); } @@ -2358,6 +2373,7 @@ bool rtl8192_GetNmodeSupportBySecCfg(struct net_device *dev) { struct r8192_priv *priv = rtllib_priv(dev); struct rtllib_device *ieee = priv->rtllib; + if (ieee->rtllib_ap_sec_type && (ieee->rtllib_ap_sec_type(priv->rtllib)&(SEC_ALG_WEP | SEC_ALG_TKIP))) { |