From: Jouni Malinen <j@w1.fi>
To: "John W. Linville" <linville@tuxdriver.com>
Cc: Johannes Berg <johannes@sipsolutions.net>,
linux-wireless@vger.kernel.org
Subject: [PATCH 2/3] mac80211_hwsim: Minor cleanup
Date: Fri, 13 Jun 2008 19:44:47 +0300 [thread overview]
Message-ID: <20080613164803.494173981@localhost> (raw)
In-Reply-To: 20080613164445.542630279@localhost
Remove unnecessary '__constant_' prefix and use the atomic version of
ieee80211_iterate_active_interfaces().
Signed-off-by: Jouni Malinen <j@w1.fi>
Index: wireless-testing/drivers/net/wireless/mac80211_hwsim.c
===================================================================
--- wireless-testing.orig/drivers/net/wireless/mac80211_hwsim.c
+++ wireless-testing/drivers/net/wireless/mac80211_hwsim.c
@@ -121,10 +121,9 @@ static void mac80211_hwsim_monitor_rx(st
hdr->hdr.it_version = PKTHDR_RADIOTAP_VERSION;
hdr->hdr.it_pad = 0;
hdr->hdr.it_len = cpu_to_le16(sizeof(*hdr));
- hdr->hdr.it_present = __constant_cpu_to_le32(
- (1 << IEEE80211_RADIOTAP_FLAGS) |
- (1 << IEEE80211_RADIOTAP_RATE) |
- (1 << IEEE80211_RADIOTAP_CHANNEL));
+ hdr->hdr.it_present = cpu_to_le32((1 << IEEE80211_RADIOTAP_FLAGS) |
+ (1 << IEEE80211_RADIOTAP_RATE) |
+ (1 << IEEE80211_RADIOTAP_CHANNEL));
hdr->rt_flags = 0;
hdr->rt_rate = txrate->bitrate / 5;
hdr->rt_channel = data->channel->center_freq;
@@ -139,7 +138,7 @@ static void mac80211_hwsim_monitor_rx(st
skb_set_mac_header(skb, 0);
skb->ip_summed = CHECKSUM_UNNECESSARY;
skb->pkt_type = PACKET_OTHERHOST;
- skb->protocol = __constant_htons(ETH_P_802_2);
+ skb->protocol = htons(ETH_P_802_2);
memset(skb->cb, 0, sizeof(skb->cb));
netif_rx(skb);
}
@@ -309,7 +308,8 @@ static void mac80211_hwsim_beacon(unsign
if (!data->started || !data->radio_enabled)
return;
- ieee80211_iterate_active_interfaces(hw, mac80211_hwsim_beacon_tx, hw);
+ ieee80211_iterate_active_interfaces_atomic(
+ hw, mac80211_hwsim_beacon_tx, hw);
data->beacon_timer.expires = jiffies + data->beacon_int;
add_timer(&data->beacon_timer);
--
--
Jouni Malinen PGP id EFC895FA
next prev parent reply other threads:[~2008-06-13 16:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-13 16:44 [PATCH 0/3] mac80211_hwsim: Clean up Jouni Malinen
2008-06-13 16:44 ` [PATCH 1/3] mac80211_hwsim: Clean up documentation Jouni Malinen
2008-06-13 16:44 ` Jouni Malinen [this message]
2008-06-13 16:44 ` [PATCH 3/3] mac80211_hwsim: Shared TX code for received frames and Beacons Jouni Malinen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080613164803.494173981@localhost \
--to=j@w1.fi \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).