nexmon – Blame information for rev 1

Subversion Repositories:
Rev:
Rev Author Line No. Line
1 office 1 diff -Naur linux/drivers/net/wireless/zd1211rw/zd_mac.c zdpats/drivers/net/wireless/zd1211rw/zd_mac.c
2 --- linux/drivers/net/wireless/zd1211rw/zd_mac.c 2011-05-19 06:06:34.000000000 +0200
3 +++ zdpats/drivers/net/wireless/zd1211rw/zd_mac.c 2011-06-25 17:46:33.146013429 +0200
4 @@ -227,14 +227,19 @@
5 static int set_rx_filter(struct zd_mac *mac)
6 {
7 unsigned long flags;
8 - u32 filter = STA_RX_FILTER;
9 + struct zd_ioreq32 ioreqs[] = {
10 + {CR_RX_FILTER, STA_RX_FILTER},
11 + { CR_SNIFFER_ON, 0U },
12 + };
13  
14 spin_lock_irqsave(&mac->lock, flags);
15 - if (mac->pass_ctrl)
16 - filter |= RX_FILTER_CTRL;
17 + if (mac->pass_ctrl) {
18 + ioreqs[0].value |= 0xFFFFFFFF;
19 + ioreqs[1].value = 0x1;
20 + }
21 spin_unlock_irqrestore(&mac->lock, flags);
22  
23 - return zd_iowrite32(&mac->chip, CR_RX_FILTER, filter);
24 + return zd_iowrite32a(&mac->chip, ioreqs, ARRAY_SIZE(ioreqs));
25 }
26  
27 static int set_mac_and_bssid(struct zd_mac *mac)
28 @@ -970,7 +975,8 @@
29 /* Caller has to ensure that length >= sizeof(struct rx_status). */
30 status = (struct rx_status *)
31 (buffer + (length - sizeof(struct rx_status)));
32 - if (status->frame_status & ZD_RX_ERROR) {
33 + if ((status->frame_status & ZD_RX_ERROR) ||
34 + (status->frame_status & ~0x21)) {
35 if (mac->pass_failed_fcs &&
36 (status->frame_status & ZD_RX_CRC32_ERROR)) {
37 stats.flag |= RX_FLAG_FAILED_FCS_CRC;
38 @@ -983,7 +989,8 @@
39 stats.freq = zd_channels[_zd_chip_get_channel(&mac->chip) - 1].center_freq;
40 stats.band = IEEE80211_BAND_2GHZ;
41 stats.signal = zd_check_signal(hw, status->signal_strength);
42 -
43 + stats.signal = stats.signal - 90;
44 +
45 rate = zd_rx_rate(buffer, status);
46  
47 /* todo: return index in the big switches in zd_rx_rate instead */
48 @@ -1312,7 +1319,7 @@
49 hw->wiphy->bands[IEEE80211_BAND_2GHZ] = &mac->band;
50  
51 hw->flags = IEEE80211_HW_RX_INCLUDES_FCS |
52 - IEEE80211_HW_SIGNAL_UNSPEC |
53 + IEEE80211_HW_SIGNAL_DBM |
54 IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING |
55 IEEE80211_HW_MFP_CAPABLE;
56  
57 hw->wiphy->interface_modes =