diff options
Diffstat (limited to 'drivers/net/wireless/zd1211rw/zd_mac.c')
-rw-r--r-- | drivers/net/wireless/zd1211rw/zd_mac.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/net/wireless/zd1211rw/zd_mac.c b/drivers/net/wireless/zd1211rw/zd_mac.c index 3bdc54d128d0..d6f3e02a0b54 100644 --- a/drivers/net/wireless/zd1211rw/zd_mac.c +++ b/drivers/net/wireless/zd1211rw/zd_mac.c | |||
@@ -108,7 +108,9 @@ int zd_mac_init_hw(struct zd_mac *mac, u8 device_type) | |||
108 | if (r) | 108 | if (r) |
109 | goto disable_int; | 109 | goto disable_int; |
110 | 110 | ||
111 | r = zd_set_encryption_type(chip, NO_WEP); | 111 | /* We must inform the device that we are doing encryption/decryption in |
112 | * software at the moment. */ | ||
113 | r = zd_set_encryption_type(chip, ENC_SNIFFER); | ||
112 | if (r) | 114 | if (r) |
113 | goto disable_int; | 115 | goto disable_int; |
114 | 116 | ||
@@ -136,10 +138,8 @@ static int reset_mode(struct zd_mac *mac) | |||
136 | { | 138 | { |
137 | struct ieee80211_device *ieee = zd_mac_to_ieee80211(mac); | 139 | struct ieee80211_device *ieee = zd_mac_to_ieee80211(mac); |
138 | struct zd_ioreq32 ioreqs[3] = { | 140 | struct zd_ioreq32 ioreqs[3] = { |
139 | { CR_RX_FILTER, RX_FILTER_BEACON|RX_FILTER_PROBE_RESPONSE| | 141 | { CR_RX_FILTER, STA_RX_FILTER }, |
140 | RX_FILTER_AUTH|RX_FILTER_ASSOC_RESPONSE }, | ||
141 | { CR_SNIFFER_ON, 0U }, | 142 | { CR_SNIFFER_ON, 0U }, |
142 | { CR_ENCRYPTION_TYPE, NO_WEP }, | ||
143 | }; | 143 | }; |
144 | 144 | ||
145 | if (ieee->iw_mode == IW_MODE_MONITOR) { | 145 | if (ieee->iw_mode == IW_MODE_MONITOR) { |
@@ -713,10 +713,10 @@ static int zd_mac_tx(struct zd_mac *mac, struct ieee80211_txb *txb, int pri) | |||
713 | struct zd_rt_hdr { | 713 | struct zd_rt_hdr { |
714 | struct ieee80211_radiotap_header rt_hdr; | 714 | struct ieee80211_radiotap_header rt_hdr; |
715 | u8 rt_flags; | 715 | u8 rt_flags; |
716 | u8 rt_rate; | ||
716 | u16 rt_channel; | 717 | u16 rt_channel; |
717 | u16 rt_chbitmask; | 718 | u16 rt_chbitmask; |
718 | u16 rt_rate; | 719 | } __attribute__((packed)); |
719 | }; | ||
720 | 720 | ||
721 | static void fill_rt_header(void *buffer, struct zd_mac *mac, | 721 | static void fill_rt_header(void *buffer, struct zd_mac *mac, |
722 | const struct ieee80211_rx_stats *stats, | 722 | const struct ieee80211_rx_stats *stats, |
@@ -735,14 +735,14 @@ static void fill_rt_header(void *buffer, struct zd_mac *mac, | |||
735 | if (status->decryption_type & (ZD_RX_WEP64|ZD_RX_WEP128|ZD_RX_WEP256)) | 735 | if (status->decryption_type & (ZD_RX_WEP64|ZD_RX_WEP128|ZD_RX_WEP256)) |
736 | hdr->rt_flags |= IEEE80211_RADIOTAP_F_WEP; | 736 | hdr->rt_flags |= IEEE80211_RADIOTAP_F_WEP; |
737 | 737 | ||
738 | hdr->rt_rate = stats->rate / 5; | ||
739 | |||
738 | /* FIXME: 802.11a */ | 740 | /* FIXME: 802.11a */ |
739 | hdr->rt_channel = cpu_to_le16(ieee80211chan2mhz( | 741 | hdr->rt_channel = cpu_to_le16(ieee80211chan2mhz( |
740 | _zd_chip_get_channel(&mac->chip))); | 742 | _zd_chip_get_channel(&mac->chip))); |
741 | hdr->rt_chbitmask = cpu_to_le16(IEEE80211_CHAN_2GHZ | | 743 | hdr->rt_chbitmask = cpu_to_le16(IEEE80211_CHAN_2GHZ | |
742 | ((status->frame_status & ZD_RX_FRAME_MODULATION_MASK) == | 744 | ((status->frame_status & ZD_RX_FRAME_MODULATION_MASK) == |
743 | ZD_RX_OFDM ? IEEE80211_CHAN_OFDM : IEEE80211_CHAN_CCK)); | 745 | ZD_RX_OFDM ? IEEE80211_CHAN_OFDM : IEEE80211_CHAN_CCK)); |
744 | |||
745 | hdr->rt_rate = stats->rate / 5; | ||
746 | } | 746 | } |
747 | 747 | ||
748 | /* Returns 1 if the data packet is for us and 0 otherwise. */ | 748 | /* Returns 1 if the data packet is for us and 0 otherwise. */ |