From eb40aeac630d2da3735b782baa127af624a3b023 Mon Sep 17 00:00:00 2001 From: Mike McCormack Date: Fri, 24 Sep 2010 18:38:23 +0900 Subject: [PATCH] Staging: rtl8192e: Clean up rtl8192_net_update() Signed-off-by: Mike McCormack Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8192e/r8192E_core.c | 41 ++++++++++++++++------------------ 1 file changed, 19 insertions(+), 22 deletions(-) diff --git a/drivers/staging/rtl8192e/r8192E_core.c b/drivers/staging/rtl8192e/r8192E_core.c index d5282fe86df..330e5f6f5c7 100644 --- a/drivers/staging/rtl8192e/r8192E_core.c +++ b/drivers/staging/rtl8192e/r8192E_core.c @@ -1185,47 +1185,44 @@ static void rtl8192_update_cap(struct net_device* dev, u16 cap) static void rtl8192_net_update(struct net_device *dev) { - struct r8192_priv *priv = ieee80211_priv(dev); struct ieee80211_network *net; u16 BcnTimeCfg = 0, BcnCW = 6, BcnIFS = 0xf; u16 rate_config = 0; net = &priv->ieee80211->current_network; - //update Basic rate: RR, BRSR + + /* update Basic rate: RR, BRSR */ rtl8192_config_rate(dev, &rate_config); - // 2007.01.16, by Emily - // Select RRSR (in Legacy-OFDM and CCK) - // For 8190, we select only 24M, 12M, 6M, 11M, 5.5M, 2M, and 1M from the Basic rate. - // We do not use other rates. - priv->basic_rate = rate_config &= 0x15f; - //BSSID - write_nic_dword(dev,BSSIDR,((u32*)net->bssid)[0]); - write_nic_word(dev,BSSIDR+4,((u16*)net->bssid)[2]); -#if 0 - //MSR - rtl8192_update_msr(dev); -#endif + /* + * Select RRSR (in Legacy-OFDM and CCK) + * For 8190, we select only 24M, 12M, 6M, 11M, 5.5M, + * 2M, and 1M from the Basic rate. + * We do not use other rates. + */ + priv->basic_rate = rate_config &= 0x15f; + + /* BSSID */ + write_nic_dword(dev, BSSIDR, ((u32 *)net->bssid)[0]); + write_nic_word(dev, BSSIDR+4, ((u16 *)net->bssid)[2]); -// rtl8192_update_cap(dev, net->capability); if (priv->ieee80211->iw_mode == IW_MODE_ADHOC) { write_nic_word(dev, ATIMWND, 2); write_nic_word(dev, BCN_DMATIME, 256); write_nic_word(dev, BCN_INTERVAL, net->beacon_interval); - // write_nic_word(dev, BcnIntTime, 100); - //BIT15 of BCN_DRV_EARLY_INT will indicate whether software beacon or hw beacon is applied. + /* + * BIT15 of BCN_DRV_EARLY_INT will indicate + * whether software beacon or hw beacon is applied. + */ write_nic_word(dev, BCN_DRV_EARLY_INT, 10); write_nic_byte(dev, BCN_ERR_THRESH, 100); BcnTimeCfg |= (BcnCW<