nexmon – Blame information for rev 1
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | --- drivers/net/wireless/zd1211rw/zd_mac.c |
2 | +++ drivers/net/wireless/zd1211rw/zd_mac.c |
||
3 | @@ -221,14 +221,19 @@ void zd_mac_clear(struct zd_mac *mac) |
||
4 | static int set_rx_filter(struct zd_mac *mac) |
||
5 | { |
||
6 | unsigned long flags; |
||
7 | - u32 filter = STA_RX_FILTER; |
||
8 | + struct zd_ioreq32 ioreqs[] = { |
||
9 | + {CR_RX_FILTER, STA_RX_FILTER}, |
||
10 | + { CR_SNIFFER_ON, 0U }, |
||
11 | + }; |
||
12 | |||
13 | spin_lock_irqsave(&mac->lock, flags); |
||
14 | - if (mac->pass_ctrl) |
||
15 | - filter |= RX_FILTER_CTRL; |
||
16 | + if (mac->pass_ctrl) { |
||
17 | + ioreqs[0].value |= 0xFFFFFFFF; |
||
18 | + ioreqs[1].value = 0x1; |
||
19 | + } |
||
20 | spin_unlock_irqrestore(&mac->lock, flags); |
||
21 | |||
22 | - return zd_iowrite32(&mac->chip, CR_RX_FILTER, filter); |
||
23 | + return zd_iowrite32a(&mac->chip, ioreqs, ARRAY_SIZE(ioreqs)); |
||
24 | } |
||
25 | |||
26 | static int set_mc_hash(struct zd_mac *mac) |
||
27 | @@ -815,7 +820,8 @@ int zd_mac_rx(struct ieee80211_hw *hw, c |
||
28 | /* Caller has to ensure that length >= sizeof(struct rx_status). */ |
||
29 | status = (struct rx_status *) |
||
30 | (buffer + (length - sizeof(struct rx_status))); |
||
31 | - if (status->frame_status & ZD_RX_ERROR) { |
||
32 | + if ((status->frame_status & ZD_RX_ERROR) || |
||
33 | + (status->frame_status & ~0x21)) { |
||
34 | if (mac->pass_failed_fcs && |
||
35 | (status->frame_status & ZD_RX_CRC32_ERROR)) { |
||
36 | stats.flag |= RX_FLAG_FAILED_FCS_CRC; |
||
37 | @@ -828,7 +834,8 @@ int zd_mac_rx(struct ieee80211_hw *hw, c |
||
38 | stats.freq = zd_channels[_zd_chip_get_channel(&mac->chip) - 1].center_freq; |
||
39 | stats.band = IEEE80211_BAND_2GHZ; |
||
40 | stats.signal = status->signal_strength; |
||
41 | - |
||
42 | + stats.signal = stats.signal - 90; |
||
43 | + |
||
44 | rate = zd_rx_rate(buffer, status); |
||
45 | |||
46 | /* todo: return index in the big switches in zd_rx_rate instead */ |
||
47 | @@ -1155,7 +1162,7 @@ struct ieee80211_hw *zd_mac_alloc_hw(str |
||
48 | hw->wiphy->bands[IEEE80211_BAND_2GHZ] = &mac->band; |
||
49 | |||
50 | hw->flags = IEEE80211_HW_RX_INCLUDES_FCS | |
||
51 | - IEEE80211_HW_SIGNAL_UNSPEC; |
||
52 | + IEEE80211_HW_SIGNAL_DBM; |
||
53 | |||
54 | hw->wiphy->interface_modes = |
||
55 | BIT(NL80211_IFTYPE_MESH_POINT) | |