diff options
author | Jouni Malinen <j@w1.fi> | 2008-06-13 12:44:47 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-06-14 12:18:12 -0400 |
commit | f248f10515dc7279120adf2d3eabcac9561fb1b4 (patch) | |
tree | cb9bbac7255093cf92213aebbb9e21b37264e7d7 /drivers/net/wireless/mac80211_hwsim.c | |
parent | ba77f1abde3999e45d92c0ba4e0356f7498e959f (diff) |
mac80211_hwsim: Minor cleanup
Remove unnecessary '__constant_' prefix and use the atomic version of
ieee80211_iterate_active_interfaces().
Signed-off-by: Jouni Malinen <j@w1.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/mac80211_hwsim.c')
-rw-r--r-- | drivers/net/wireless/mac80211_hwsim.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c index 3e33b29a4fc9..7a8494e4ca51 100644 --- a/drivers/net/wireless/mac80211_hwsim.c +++ b/drivers/net/wireless/mac80211_hwsim.c | |||
@@ -121,10 +121,9 @@ static void mac80211_hwsim_monitor_rx(struct ieee80211_hw *hw, | |||
121 | hdr->hdr.it_version = PKTHDR_RADIOTAP_VERSION; | 121 | hdr->hdr.it_version = PKTHDR_RADIOTAP_VERSION; |
122 | hdr->hdr.it_pad = 0; | 122 | hdr->hdr.it_pad = 0; |
123 | hdr->hdr.it_len = cpu_to_le16(sizeof(*hdr)); | 123 | hdr->hdr.it_len = cpu_to_le16(sizeof(*hdr)); |
124 | hdr->hdr.it_present = __constant_cpu_to_le32( | 124 | hdr->hdr.it_present = cpu_to_le32((1 << IEEE80211_RADIOTAP_FLAGS) | |
125 | (1 << IEEE80211_RADIOTAP_FLAGS) | | 125 | (1 << IEEE80211_RADIOTAP_RATE) | |
126 | (1 << IEEE80211_RADIOTAP_RATE) | | 126 | (1 << IEEE80211_RADIOTAP_CHANNEL)); |
127 | (1 << IEEE80211_RADIOTAP_CHANNEL)); | ||
128 | hdr->rt_flags = 0; | 127 | hdr->rt_flags = 0; |
129 | hdr->rt_rate = txrate->bitrate / 5; | 128 | hdr->rt_rate = txrate->bitrate / 5; |
130 | hdr->rt_channel = data->channel->center_freq; | 129 | hdr->rt_channel = data->channel->center_freq; |
@@ -139,7 +138,7 @@ static void mac80211_hwsim_monitor_rx(struct ieee80211_hw *hw, | |||
139 | skb_set_mac_header(skb, 0); | 138 | skb_set_mac_header(skb, 0); |
140 | skb->ip_summed = CHECKSUM_UNNECESSARY; | 139 | skb->ip_summed = CHECKSUM_UNNECESSARY; |
141 | skb->pkt_type = PACKET_OTHERHOST; | 140 | skb->pkt_type = PACKET_OTHERHOST; |
142 | skb->protocol = __constant_htons(ETH_P_802_2); | 141 | skb->protocol = htons(ETH_P_802_2); |
143 | memset(skb->cb, 0, sizeof(skb->cb)); | 142 | memset(skb->cb, 0, sizeof(skb->cb)); |
144 | netif_rx(skb); | 143 | netif_rx(skb); |
145 | } | 144 | } |
@@ -309,7 +308,8 @@ static void mac80211_hwsim_beacon(unsigned long arg) | |||
309 | if (!data->started || !data->radio_enabled) | 308 | if (!data->started || !data->radio_enabled) |
310 | return; | 309 | return; |
311 | 310 | ||
312 | ieee80211_iterate_active_interfaces(hw, mac80211_hwsim_beacon_tx, hw); | 311 | ieee80211_iterate_active_interfaces_atomic( |
312 | hw, mac80211_hwsim_beacon_tx, hw); | ||
313 | 313 | ||
314 | data->beacon_timer.expires = jiffies + data->beacon_int; | 314 | data->beacon_timer.expires = jiffies + data->beacon_int; |
315 | add_timer(&data->beacon_timer); | 315 | add_timer(&data->beacon_timer); |