提交 7c26d76b 编写于 作者: A Andrew Miller 提交者: Greg Kroah-Hartman

Staging: rtl8187se: r8180_core.c: Cleaned up if statement

clean up the if statement's conditions to make them more
readable

fix the if statement's body indention, one tab stop to many.
Signed-off-by: NAndrew Miller <amiller@amilx.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 9948bc7e
...@@ -1615,35 +1615,39 @@ void rtl8180_rx(struct net_device *dev) ...@@ -1615,35 +1615,39 @@ void rtl8180_rx(struct net_device *dev)
fc = le16_to_cpu(hdr->frame_ctl); fc = le16_to_cpu(hdr->frame_ctl);
type = WLAN_FC_GET_TYPE(fc); type = WLAN_FC_GET_TYPE(fc);
if ((IEEE80211_FTYPE_CTL != type) && if (IEEE80211_FTYPE_CTL != type &&
(eqMacAddr(priv->ieee80211->current_network.bssid, (fc & IEEE80211_FCTL_TODS) ? hdr->addr1 : (fc & IEEE80211_FCTL_FROMDS) ? hdr->addr2 : hdr->addr3)) !bHwError && !bCRC && !bICV &&
&& (!bHwError) && (!bCRC) && (!bICV)) { eqMacAddr(priv->ieee80211->current_network.bssid,
/* Perform signal smoothing for dynamic fc & IEEE80211_FCTL_TODS ? hdr->addr1 :
* mechanism on demand. This is different fc & IEEE80211_FCTL_FROMDS ? hdr->addr2 :
* with PerformSignalSmoothing8185 in smoothing hdr->addr3)) {
* fomula. No dramatic adjustion is apply
* because dynamic mechanism need some degree /* Perform signal smoothing for dynamic
* of correctness. */ * mechanism on demand. This is different
PerformUndecoratedSignalSmoothing8185(priv, bCckRate); * with PerformSignalSmoothing8185 in smoothing
* fomula. No dramatic adjustion is apply
/* For good-looking singal strength. */ * because dynamic mechanism need some degree
SignalStrengthIndex = NetgearSignalStrengthTranslate( * of correctness. */
priv->LastSignalStrengthInPercent, PerformUndecoratedSignalSmoothing8185(priv, bCckRate);
priv->SignalStrength);
/* For good-looking singal strength. */
priv->LastSignalStrengthInPercent = SignalStrengthIndex; SignalStrengthIndex = NetgearSignalStrengthTranslate(
priv->Stats_SignalStrength = TranslateToDbm8185((u8)SignalStrengthIndex); priv->LastSignalStrengthInPercent,
priv->SignalStrength);
priv->LastSignalStrengthInPercent = SignalStrengthIndex;
priv->Stats_SignalStrength = TranslateToDbm8185((u8)SignalStrengthIndex);
/* /*
* We need more correct power of received packets and the "SignalStrength" of RxStats is beautified, * We need more correct power of received packets and the "SignalStrength" of RxStats is beautified,
* so we record the correct power here. * so we record the correct power here.
*/ */
priv->Stats_SignalQuality = (long)(priv->Stats_SignalQuality * 5 + (long)priv->SignalQuality + 5) / 6; priv->Stats_SignalQuality = (long)(priv->Stats_SignalQuality * 5 + (long)priv->SignalQuality + 5) / 6;
priv->Stats_RecvSignalPower = (long)(priv->Stats_RecvSignalPower * 5 + priv->RecvSignalPower - 1) / 6; priv->Stats_RecvSignalPower = (long)(priv->Stats_RecvSignalPower * 5 + priv->RecvSignalPower - 1) / 6;
/* Figure out which antenna that received the lasted packet. */ /* Figure out which antenna that received the lasted packet. */
priv->LastRxPktAntenna = Antenna ? 1 : 0; /* 0: aux, 1: main. */ priv->LastRxPktAntenna = Antenna ? 1 : 0; /* 0: aux, 1: main. */
SwAntennaDiversityRxOk8185(dev, priv->SignalStrength); SwAntennaDiversityRxOk8185(dev, priv->SignalStrength);
} }
if (first) { if (first) {
if (!priv->rx_skb_complete) { if (!priv->rx_skb_complete) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册