Commit ace3c2a2 authored by John Whitmore's avatar John Whitmore Committed by Greg Kroah-Hartman

staging:rtl8192u: Remove macro cpMacAddr - Style

The macro cpMacAddr implements the same functionality as the
ether_addr_copy function defined in etherdevice.h, as a result the
macro has been removed from the code, and its use replaced with the
function call.

Note that the header comment of the function ether_addr_copy states
that the two byte arrays passed as parameters to the function must
be u16 aligned. Because of this the structure ieee80211_network has
had its member variables re-ordered so that the members bssid and
MBssid are aligned to a u16 boundary.

This is a coding style change which should have no impact on runtime
code execution.
Suggested-by: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarJohn Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 9391bea9
......@@ -31,17 +31,13 @@ struct rt_dot11d_info {
bool enabled; /* dot11MultiDomainCapabilityEnabled */
};
#define cpMacAddr(des, src) ((des)[0] = (src)[0], \
(des)[1] = (src)[1], (des)[2] = (src)[2], \
(des)[3] = (src)[3], (des)[4] = (src)[4], \
(des)[5] = (src)[5])
#define GET_DOT11D_INFO(__pIeeeDev) ((struct rt_dot11d_info *)((__pIeeeDev)->pDot11dInfo))
#define IS_DOT11D_ENABLE(__pIeeeDev) (GET_DOT11D_INFO(__pIeeeDev)->enabled)
#define IS_COUNTRY_IE_VALID(__pIeeeDev) (GET_DOT11D_INFO(__pIeeeDev)->country_ie_len > 0)
#define IS_EQUAL_CIE_SRC(__pIeeeDev, __pTa) ether_addr_equal(GET_DOT11D_INFO(__pIeeeDev)->country_ie_src_addr, __pTa)
#define UPDATE_CIE_SRC(__pIeeeDev, __pTa) cpMacAddr(GET_DOT11D_INFO(__pIeeeDev)->country_ie_src_addr, __pTa)
#define UPDATE_CIE_SRC(__pIeeeDev, __pTa) ether_addr_copy(GET_DOT11D_INFO(__pIeeeDev)->country_ie_src_addr, __pTa)
#define GET_CIE_WATCHDOG(__pIeeeDev) (GET_DOT11D_INFO(__pIeeeDev)->country_ie_watchdog)
#define RESET_CIE_WATCHDOG(__pIeeeDev) (GET_CIE_WATCHDOG(__pIeeeDev) = 0)
......
......@@ -1329,8 +1329,13 @@ typedef enum _erp_t {
struct ieee80211_network {
/* These entries are used to identify a unique network */
u8 bssid[ETH_ALEN];
u8 bssid[ETH_ALEN]; /* u16 aligned! */
u8 channel;
// CCXv4 S59, MBSSID.
bool bMBssidValid;
u8 MBssid[ETH_ALEN]; /* u16 aligned! */
u8 MBssidMask;
/* Ensure null-terminated for any debug msgs */
u8 ssid[IW_ESSID_MAX_SIZE + 1];
u8 ssid_len;
......@@ -1341,10 +1346,6 @@ struct ieee80211_network {
bool bCkipSupported;
bool bCcxRmEnable;
u16 CcxRmState[2];
// CCXv4 S59, MBSSID.
bool bMBssidValid;
u8 MBssidMask;
u8 MBssid[6];
// CCX 2 S38, WLAN Device Version Number element. Annie, 2006-08-20.
bool bWithCcxVerNum;
u8 BssCcxVerNumber;
......
......@@ -1944,7 +1944,7 @@ int ieee80211_parse_info_param(struct ieee80211_device *ieee,
{
network->bMBssidValid = true;
network->MBssidMask = 0xff << (network->MBssidMask);
cpMacAddr(network->MBssid, network->bssid);
ether_addr_copy(network->MBssid, network->bssid);
network->MBssid[5] &= network->MBssidMask;
}
else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment