From: Pkshih <pkshih@realtek.com>
To: "huxm@marvell.com" <huxm@marvell.com>,
"gbhat@marvell.com" <gbhat@marvell.com>,
"jussi.kivilinna@iki.fi" <jussi.kivilinna@iki.fi>,
"nishants@marvell.com" <nishants@marvell.com>,
"kvalo@codeaurora.org" <kvalo@codeaurora.org>,
"joe@perches.com" <joe@perches.com>,
"amitkarwar@gmail.com" <amitkarwar@gmail.com>,
"chunkeey@googlemail.com" <chunkeey@googlemail.com>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"b43-dev@lists.infradead.org" <b43-dev@lists.infradead.org>
Subject: [PATCH 06/12] wireless: Convert simple uses of a static const Ethernet broadcast address
Date: Sat, 31 Mar 2018 14:01:12 +0000 [thread overview]
Message-ID: <1522504872.1910.17.camel@realtek.com> (raw)
In-Reply-To: <79196f134a513d50968e8e208a0e56b3c0236ee3.1522479607.git.joe@perches.com>
On Sat, 2018-03-31 at 00:05 -0700, Joe Perches wrote:
> Use the new ether_broadcast_addr global instead to save some object code.
>
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
> ?drivers/net/wireless/admtek/adm8211.c???????????| 3 +--
> ?drivers/net/wireless/ath/carl9170/mac.c?????????| 4 +---
> ?drivers/net/wireless/broadcom/b43/main.c????????| 3 +--
> ?drivers/net/wireless/marvell/mwifiex/cfg80211.c | 3 +--
> ?drivers/net/wireless/realtek/rtlwifi/core.c?????| 5 ++---
> ?drivers/net/wireless/rndis_wlan.c???????????????| 6 +-----
> ?drivers/net/wireless/ti/wl1251/main.c???????????| 5 +----
> ?drivers/net/wireless/ti/wlcore/main.c???????????| 5 +----
> ?8 files changed, 9 insertions(+), 25 deletions(-)
>
> ?
> diff --git a/drivers/net/wireless/realtek/rtlwifi/core.c
> b/drivers/net/wireless/realtek/rtlwifi/core.c
> index cfea57efa7f4..8c534a93dad5 100644
> --- a/drivers/net/wireless/realtek/rtlwifi/core.c
> +++ b/drivers/net/wireless/realtek/rtlwifi/core.c
> @@ -1527,7 +1527,6 @@ static int rtl_op_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
> ? bool wep_only = false;
> ? int err = 0;
> ? u8 mac_addr[ETH_ALEN];
> - u8 bcast_addr[ETH_ALEN] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
> ?
> ? rtlpriv->btcoexist.btc_info.in_4way = false;
> ?
> @@ -1544,7 +1543,7 @@ static int rtl_op_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
> ? RT_TRACE(rtlpriv, COMP_SEC, DBG_DMESG,
> ? ?"%s hardware based encryption for keyidx: %d, mac: %pM\n",
> ? ??cmd == SET_KEY ? "Using" : "Disabling", key->keyidx,
> - ??sta ? sta->addr : bcast_addr);
> + ??sta ? sta->addr : ether_broadcast_addr);
> ? rtlpriv->sec.being_setkey = true;
> ? rtl_ips_nic_on(hw);
> ? mutex_lock(&rtlpriv->locks.conf_mutex);
> @@ -1649,7 +1648,7 @@ static int rtl_op_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
> ? memcpy(rtlpriv->sec.key_buf[key_idx],
> ? ???????key->key, key->keylen);
> ? rtlpriv->sec.key_len[key_idx] = key->keylen;
> - memcpy(mac_addr, bcast_addr, ETH_ALEN);
> + memcpy(mac_addr, ether_broadcast_addr, ETH_ALEN);
Use?ether_addr_copy(mac_addr, ether_broadcast_addr) ?
> ? } else { /* pairwise key */
> ? RT_TRACE(rtlpriv, COMP_SEC, DBG_DMESG,
> ? ?"set pairwise key\n");
next prev parent reply other threads:[~2018-03-31 14:01 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-31 7:05 [PATCH 00/12] Ethernet: Add and use ether_<type>_addr globals Joe Perches
2018-03-31 7:05 ` [PATCH 06/12] wireless: Convert simple uses of a static const Ethernet broadcast address Joe Perches
2018-03-31 14:01 ` Pkshih [this message]
2018-03-31 14:33 ` Joe Perches
2018-04-05 12:39 ` Kalle Valo
2018-04-05 12:48 ` Kalle Valo
2018-04-05 13:27 ` [PATCH 00/12] Ethernet: Add and use ether_<type>_addr globals Felix Fietkau
2018-04-05 13:51 ` Joe Perches
2018-04-05 14:05 ` Felix Fietkau
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=1522504872.1910.17.camel@realtek.com \
--to=pkshih@realtek.com \
--cc=amitkarwar@gmail.com \
--cc=b43-dev@lists.infradead.org \
--cc=chunkeey@googlemail.com \
--cc=gbhat@marvell.com \
--cc=huxm@marvell.com \
--cc=joe@perches.com \
--cc=jussi.kivilinna@iki.fi \
--cc=kvalo@codeaurora.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nishants@marvell.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