Commit 8f896d61 authored by Xenia Ragiadakou's avatar Xenia Ragiadakou Committed by Greg Kroah-Hartman

staging: rtl8192u: fix identation in r8192U_core.c

This patch fixes identation and alignment in r8192U_core.c.
Also, removes spaces from idents when applicable.
Signed-off-by: default avatarXenia Ragiadakou <burzalodowa@gmail.com>
Reviewed-by: Dan Carpenter<dan.carpenter@oracle.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f0a60a14
......@@ -853,9 +853,9 @@ void rtl8192_set_rxconf(struct net_device *dev)
write_nic_dword(dev, RCR, rxconf);
#ifdef DEBUG_RX
#ifdef DEBUG_RX
DMESG("rxconf: %x %x", rxconf, read_nic_dword(dev, RCR));
#endif
#endif
}
//wait to be removed
void rtl8192_rx_enable(struct net_device *dev)
......@@ -1619,8 +1619,7 @@ short rtl819xU_tx_cmd(struct net_device *dev, struct sk_buff *skb)
if (!status) {
return 0;
} else {
DMESGE("Error TX CMD URB, error %d",
status);
DMESGE("Error TX CMD URB, error %d", status);
return -1;
}
}
......@@ -1895,7 +1894,7 @@ short rtl8192_tx(struct net_device *dev, struct sk_buff *skb)
status = usb_submit_urb(tx_urb, GFP_ATOMIC);
if (!status) {
//we need to send 0 byte packet whenever 512N bytes/64N(HIGN SPEED/NORMAL SPEED) bytes packet has been transmitted. Otherwise, it will be halt to wait for another packet. WB. 2008.08.27
//we need to send 0 byte packet whenever 512N bytes/64N(HIGN SPEED/NORMAL SPEED) bytes packet has been transmitted. Otherwise, it will be halt to wait for another packet. WB. 2008.08.27
bool bSend0Byte = false;
u8 zero = 0;
if (udev->speed == USB_SPEED_HIGH) {
......@@ -2724,7 +2723,7 @@ static void rtl8192_read_eeprom_info(struct net_device *dev)
}
}
priv->TxPowerDiff = priv->EEPROMPwDiff;
// Antenna B gain offset to antenna A, bit0~3
// Antenna B gain offset to antenna A, bit0~3
priv->AntennaTxPwDiff[0] = (priv->EEPROMTxPowerDiff & 0xf);
// Antenna C gain offset to antenna A, bit4~7
priv->AntennaTxPwDiff[1] = ((priv->EEPROMTxPowerDiff & 0xf0)>>4);
......@@ -2735,7 +2734,7 @@ static void rtl8192_read_eeprom_info(struct net_device *dev)
priv->ThermalMeter[0] = priv->EEPROMThermalMeter;
}//end if VersionID == VERSION_819xU_A
//added by vivi, for dlink led, 20080416
//added by vivi, for dlink led, 20080416
switch (priv->eeprom_CustomerID) {
case EEPROM_CID_RUNTOP:
priv->CustomerID = RT_CID_819x_RUNTOP;
......@@ -2850,7 +2849,7 @@ void rtl8192_hwconfig(struct net_device *dev)
struct r8192_priv *priv = ieee80211_priv(dev);
u32 ratr_value = 0;
// Set RRSR, RATR, and BW_OPMODE registers
// Set RRSR, RATR, and BW_OPMODE registers
//
switch (priv->ieee80211->mode) {
case WIRELESS_MODE_B:
......@@ -2997,8 +2996,7 @@ bool rtl8192_adapter_start(struct net_device *dev)
write_nic_dword(dev, RQPN2, NUM_OF_PAGE_IN_FW_QUEUE_MGNT << RSVD_FW_QUEUE_PAGE_MGNT_SHIFT |
NUM_OF_PAGE_IN_FW_QUEUE_CMD << RSVD_FW_QUEUE_PAGE_CMD_SHIFT);
write_nic_dword(dev, RQPN3, APPLIED_RESERVED_QUEUE_IN_FW|
NUM_OF_PAGE_IN_FW_QUEUE_BCN<<RSVD_FW_QUEUE_PAGE_BCN_SHIFT
);
NUM_OF_PAGE_IN_FW_QUEUE_BCN<<RSVD_FW_QUEUE_PAGE_BCN_SHIFT);
write_nic_dword(dev, RATR0+4*7, (RATE_ALL_OFDM_AG | RATE_ALL_CCK));
//Set AckTimeout
......@@ -3058,7 +3056,7 @@ bool rtl8192_adapter_start(struct net_device *dev)
RT_TRACE(COMP_INIT, "%s():after firmware download\n", __func__);
//
#ifdef TO_DO_LIST
if (Adapter->ResetProgress == RESET_TYPE_NORESET) {
if (Adapter->ResetProgress == RESET_TYPE_NORESET) {
if (pMgntInfo->RegRfOff == TRUE) { // User disable RF via registry.
RT_TRACE((COMP_INIT|COMP_RF), DBG_LOUD, ("InitializeAdapter819xUsb(): Turn off RF for RegRfOff ----------\n"));
MgntActSet_RF_State(Adapter, eRfOff, RF_CHANGE_BY_SW);
......@@ -3342,51 +3340,27 @@ void CamRestoreAllEntry(struct net_device *dev)
for (EntryId = 0; EntryId < 4; EntryId++) {
MacAddr = CAM_CONST_ADDR[EntryId];
setKey(dev,
EntryId,
EntryId,
setKey(dev, EntryId, EntryId,
priv->ieee80211->pairwise_key_type,
MacAddr,
0,
NULL);
MacAddr, 0, NULL);
}
} else if (priv->ieee80211->pairwise_key_type == KEY_TYPE_TKIP) {
if (priv->ieee80211->iw_mode == IW_MODE_ADHOC)
setKey(dev,
4,
0,
priv->ieee80211->pairwise_key_type,
(u8 *)dev->dev_addr,
0,
NULL);
setKey(dev, 4, 0, priv->ieee80211->pairwise_key_type,
(u8 *)dev->dev_addr, 0, NULL);
else
setKey(dev,
4,
0,
priv->ieee80211->pairwise_key_type,
MacAddr,
0,
NULL);
setKey(dev, 4, 0, priv->ieee80211->pairwise_key_type,
MacAddr, 0, NULL);
} else if (priv->ieee80211->pairwise_key_type == KEY_TYPE_CCMP) {
if (priv->ieee80211->iw_mode == IW_MODE_ADHOC)
setKey(dev,
4,
0,
priv->ieee80211->pairwise_key_type,
(u8 *)dev->dev_addr,
0,
NULL);
setKey(dev, 4, 0, priv->ieee80211->pairwise_key_type,
(u8 *)dev->dev_addr, 0, NULL);
else
setKey(dev,
4,
0,
priv->ieee80211->pairwise_key_type,
MacAddr,
0,
NULL);
setKey(dev, 4, 0, priv->ieee80211->pairwise_key_type,
MacAddr, 0, NULL);
}
......@@ -3394,42 +3368,24 @@ void CamRestoreAllEntry(struct net_device *dev)
if (priv->ieee80211->group_key_type == KEY_TYPE_TKIP) {
MacAddr = CAM_CONST_BROAD;
for (EntryId = 1; EntryId < 4; EntryId++) {
setKey(dev,
EntryId,
EntryId,
setKey(dev, EntryId, EntryId,
priv->ieee80211->group_key_type,
MacAddr,
0,
NULL);
MacAddr, 0, NULL);
}
if (priv->ieee80211->iw_mode == IW_MODE_ADHOC)
setKey(dev,
0,
0,
priv->ieee80211->group_key_type,
CAM_CONST_ADDR[0],
0,
NULL);
setKey(dev, 0, 0, priv->ieee80211->group_key_type,
CAM_CONST_ADDR[0], 0, NULL);
} else if (priv->ieee80211->group_key_type == KEY_TYPE_CCMP) {
MacAddr = CAM_CONST_BROAD;
for (EntryId = 1; EntryId < 4; EntryId++) {
setKey(dev,
EntryId ,
EntryId,
setKey(dev, EntryId, EntryId,
priv->ieee80211->group_key_type,
MacAddr,
0,
NULL);
MacAddr, 0, NULL);
}
if (priv->ieee80211->iw_mode == IW_MODE_ADHOC)
setKey(dev,
0,
0,
priv->ieee80211->group_key_type,
CAM_CONST_ADDR[0],
0,
NULL);
setKey(dev, 0, 0, priv->ieee80211->group_key_type,
CAM_CONST_ADDR[0], 0, NULL);
}
}
//////////////////////////////////////////////////////////////
......@@ -3608,10 +3564,10 @@ extern void rtl819x_watchdog_wqcallback(struct work_struct *work)
rtl819x_update_rxcounts(priv, &TotalRxBcnNum, &TotalRxDataNum);
if ((TotalRxBcnNum+TotalRxDataNum) == 0) {
#ifdef TODO
#ifdef TODO
if (rfState == eRfOff)
RT_TRACE(COMP_ERR, "========>%s()\n", __func__);
#endif
#endif
netdev_dbg(dev, "===>%s(): AP is power off, connect another one\n", __func__);
priv->ieee80211->state = IEEE80211_ASSOCIATING;
notify_wx_assoc_event(priv->ieee80211);
......@@ -3722,7 +3678,7 @@ int rtl8192_down(struct net_device *dev)
priv->up = 0;
priv->ieee80211->ieee_up = 0;
RT_TRACE(COMP_DOWN, "==========>%s()\n", __func__);
/* FIXME */
/* FIXME */
if (!netif_queue_stopped(dev))
netif_stop_queue(dev);
......@@ -3884,8 +3840,7 @@ int rtl8192_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
}
if (ieee->group_key_type) {
setKey(dev,
ipw->u.crypt.idx,
setKey(dev, ipw->u.crypt.idx,
ipw->u.crypt.idx, //KeyIndex
ieee->group_key_type, //KeyType
broadcast_addr, //MacAddr
......@@ -4117,7 +4072,7 @@ void rtl8192_process_phyinfo(struct r8192_priv *priv, u8 *buffer, struct ieee802
pprevious_stats->RxPWDBAll);
if (pprevious_stats->bPacketBeacon) {
/* record the beacon pwdb to the sliding window. */
/* record the beacon pwdb to the sliding window. */
if (slide_beacon_adc_pwdb_statistics++ >= PHY_Beacon_RSSI_SLID_WIN_MAX) {
slide_beacon_adc_pwdb_statistics = PHY_Beacon_RSSI_SLID_WIN_MAX;
last_beacon_adc_pwdb = priv->stats.Slide_Beacon_pwdb[slide_beacon_adc_pwdb_index];
......@@ -4923,7 +4878,7 @@ void rtl819xusb_process_received_packet(struct net_device *dev,
if (!Adapter->bInHctTest)
CountRxErrStatistics(Adapter, pRfd);
#endif
#ifdef ENABLE_PS //by amy for adding ps function in future
#ifdef ENABLE_PS //by amy for adding ps function in future
RT_RF_POWER_STATE rtState;
// When RF is off, we should not count the packet for hw/sw synchronize
// reason, ie. there may be a duration while sw switch is changed and hw
......@@ -4931,7 +4886,7 @@ void rtl819xusb_process_received_packet(struct net_device *dev,
Adapter->HalFunc.GetHwRegHandler(Adapter, HW_VAR_RF_STATE, (u8 *)(&rtState));
if (rtState == eRfOff)
return;
#endif
#endif
priv->stats.rxframgment++;
#ifdef TODO
......@@ -5243,7 +5198,7 @@ void EnableHWSecurityConfig8192(struct net_device *dev)
SECR_value |= SCR_TxUseDK;
}
//add HWSec active enable here.
//default using hwsec. when peer AP is in N mode only and pairwise_key_type is none_aes(which HT_IOT_ACT_PURE_N_MODE indicates it), use software security. when peer AP is in b,g,n mode mixed and pairwise_key_type is none_aes, use g mode hw security. WB on 2008.7.4
//default using hwsec. when peer AP is in N mode only and pairwise_key_type is none_aes(which HT_IOT_ACT_PURE_N_MODE indicates it), use software security. when peer AP is in b,g,n mode mixed and pairwise_key_type is none_aes, use g mode hw security. WB on 2008.7.4
ieee->hwsec_active = 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment