mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-27 03:47:43 +00:00
rtl8187: Remove deprecated 'qual' from returned RX status
The qual member of ieee80211_rx_status is deprecated. As a result, this driver no longer needs to calculate a quality value. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Acked-by: Hin-Tak Leung <htl10@users.sourceforge.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
715caaeb89
commit
70d9f405d0
@ -119,7 +119,6 @@ struct rtl8187_priv {
|
|||||||
} hw_rev;
|
} hw_rev;
|
||||||
struct sk_buff_head rx_queue;
|
struct sk_buff_head rx_queue;
|
||||||
u8 signal;
|
u8 signal;
|
||||||
u8 quality;
|
|
||||||
u8 noise;
|
u8 noise;
|
||||||
u8 slot_time;
|
u8 slot_time;
|
||||||
u8 aifsn[4];
|
u8 aifsn[4];
|
||||||
|
@ -320,7 +320,6 @@ static void rtl8187_rx_cb(struct urb *urb)
|
|||||||
struct ieee80211_rx_status rx_status = { 0 };
|
struct ieee80211_rx_status rx_status = { 0 };
|
||||||
int rate, signal;
|
int rate, signal;
|
||||||
u32 flags;
|
u32 flags;
|
||||||
u32 quality;
|
|
||||||
unsigned long f;
|
unsigned long f;
|
||||||
|
|
||||||
spin_lock_irqsave(&priv->rx_queue.lock, f);
|
spin_lock_irqsave(&priv->rx_queue.lock, f);
|
||||||
@ -338,10 +337,9 @@ static void rtl8187_rx_cb(struct urb *urb)
|
|||||||
(typeof(hdr))(skb_tail_pointer(skb) - sizeof(*hdr));
|
(typeof(hdr))(skb_tail_pointer(skb) - sizeof(*hdr));
|
||||||
flags = le32_to_cpu(hdr->flags);
|
flags = le32_to_cpu(hdr->flags);
|
||||||
/* As with the RTL8187B below, the AGC is used to calculate
|
/* As with the RTL8187B below, the AGC is used to calculate
|
||||||
* signal strength and quality. In this case, the scaling
|
* signal strength. In this case, the scaling
|
||||||
* constants are derived from the output of p54usb.
|
* constants are derived from the output of p54usb.
|
||||||
*/
|
*/
|
||||||
quality = 130 - ((41 * hdr->agc) >> 6);
|
|
||||||
signal = -4 - ((27 * hdr->agc) >> 6);
|
signal = -4 - ((27 * hdr->agc) >> 6);
|
||||||
rx_status.antenna = (hdr->signal >> 7) & 1;
|
rx_status.antenna = (hdr->signal >> 7) & 1;
|
||||||
rx_status.mactime = le64_to_cpu(hdr->mac_time);
|
rx_status.mactime = le64_to_cpu(hdr->mac_time);
|
||||||
@ -354,23 +352,18 @@ static void rtl8187_rx_cb(struct urb *urb)
|
|||||||
* In testing, none of these quantities show qualitative
|
* In testing, none of these quantities show qualitative
|
||||||
* agreement with AP signal strength, except for the AGC,
|
* agreement with AP signal strength, except for the AGC,
|
||||||
* which is inversely proportional to the strength of the
|
* which is inversely proportional to the strength of the
|
||||||
* signal. In the following, the quality and signal strength
|
* signal. In the following, the signal strength
|
||||||
* are derived from the AGC. The arbitrary scaling constants
|
* is derived from the AGC. The arbitrary scaling constants
|
||||||
* are chosen to make the results close to the values obtained
|
* are chosen to make the results close to the values obtained
|
||||||
* for a BCM4312 using b43 as the driver. The noise is ignored
|
* for a BCM4312 using b43 as the driver. The noise is ignored
|
||||||
* for now.
|
* for now.
|
||||||
*/
|
*/
|
||||||
flags = le32_to_cpu(hdr->flags);
|
flags = le32_to_cpu(hdr->flags);
|
||||||
quality = 170 - hdr->agc;
|
|
||||||
signal = 14 - hdr->agc / 2;
|
signal = 14 - hdr->agc / 2;
|
||||||
rx_status.antenna = (hdr->rssi >> 7) & 1;
|
rx_status.antenna = (hdr->rssi >> 7) & 1;
|
||||||
rx_status.mactime = le64_to_cpu(hdr->mac_time);
|
rx_status.mactime = le64_to_cpu(hdr->mac_time);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (quality > 100)
|
|
||||||
quality = 100;
|
|
||||||
rx_status.qual = quality;
|
|
||||||
priv->quality = quality;
|
|
||||||
rx_status.signal = signal;
|
rx_status.signal = signal;
|
||||||
priv->signal = signal;
|
priv->signal = signal;
|
||||||
rate = (flags >> 20) & 0xF;
|
rate = (flags >> 20) & 0xF;
|
||||||
|
Loading…
Reference in New Issue
Block a user