From: Johannes Berg <johannes@sipsolutions.net>
To: Chun-Yeow Yeoh <yeohchunyeow@gmail.com>
Cc: linux-wireless <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH] mac80211: use put_unaligned_le16 for precedence value in mesh
Date: Tue, 12 Nov 2013 10:09:06 +0100 [thread overview]
Message-ID: <1384247346.14301.2.camel@jlt4.sipsolutions.net> (raw)
In-Reply-To: <1384223508-3024-1-git-send-email-yeohchunyeow@gmail.com> (sfid-20131112_033336_637700_EEE77577)
On Tue, 2013-11-12 at 10:31 +0800, Chun-Yeow Yeoh wrote:
> use put_unaligned_le16 for precedence value in mesh
> channel switch support
Applied - there are more potential places I guess.
johannes
>
> Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com>
> ---
> net/mac80211/mesh.c | 5 +----
> net/mac80211/util.c | 4 +---
> 2 files changed, 2 insertions(+), 7 deletions(-)
>
> diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c
> index ba10525..01a6685 100644
> --- a/net/mac80211/mesh.c
> +++ b/net/mac80211/mesh.c
> @@ -674,8 +674,6 @@ ieee80211_mesh_build_beacon(struct
> ieee80211_if_mesh *ifmsh)
> rcu_read_lock();
> csa = rcu_dereference(ifmsh->csa);
> if (csa) {
> - __le16 pre_value;
> -
> pos = skb_put(skb, 13);
> memset(pos, 0, 13);
> *pos++ = WLAN_EID_CHANNEL_SWITCH;
> @@ -697,8 +695,7 @@ ieee80211_mesh_build_beacon(struct
> ieee80211_if_mesh *ifmsh)
> WLAN_EID_CHAN_SWITCH_PARAM_TX_RESTRICT :
> 0x00;
> put_unaligned_le16(WLAN_REASON_MESH_CHAN, pos);
> pos += 2;
> - pre_value = cpu_to_le16(ifmsh->pre_value);
> - memcpy(pos, &pre_value, 2);
> + put_unaligned_le16(ifmsh->pre_value, pos);
> pos += 2;
> }
> rcu_read_unlock();
> diff --git a/net/mac80211/util.c b/net/mac80211/util.c
> index 7650efa..679e9d7 100644
> --- a/net/mac80211/util.c
> +++ b/net/mac80211/util.c
> @@ -2449,7 +2449,6 @@ int ieee80211_send_action_csa(struct
> ieee80211_sub_if_data *sdata,
>
> if (ieee80211_vif_is_mesh(&sdata->vif)) {
> struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
> - __le16 pre_value;
>
> skb_put(skb, 8);
> *pos++ = WLAN_EID_CHAN_SWITCH_PARAM; /* EID
> */
> @@ -2461,8 +2460,7 @@ int ieee80211_send_action_csa(struct
> ieee80211_sub_if_data *sdata,
> WLAN_EID_CHAN_SWITCH_PARAM_TX_RESTRICT :
> 0x00;
> put_unaligned_le16(WLAN_REASON_MESH_CHAN, pos); /*
> Reason Cd */
> pos += 2;
> - pre_value = cpu_to_le16(ifmsh->pre_value);
> - memcpy(pos, &pre_value, 2); /* Precedence
> Value */
> + put_unaligned_le16(ifmsh->pre_value, pos);/*
> Precedence Value */
> pos += 2;
> }
>
> --
> 1.7.9.5
parent reply other threads:[~2013-11-12 9:09 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <1384223508-3024-1-git-send-email-yeohchunyeow@gmail.com>]
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=1384247346.14301.2.camel@jlt4.sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=yeohchunyeow@gmail.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).