summaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2009-05-27 04:42:37 +0000
committerDavid S. Miller <davem@davemloft.net>2009-05-27 15:47:06 -0700
commit1ce8e7b57b3a4527ef83da1c5c7bd8a6b9d87b56 (patch)
tree095536a47e40fdb621c1f959637fa63f57a4ccf2 /net/mac80211
parent0bb32417ff0f6ac385e4eec3ef6641950bbb3694 (diff)
downloadop-kernel-dev-1ce8e7b57b3a4527ef83da1c5c7bd8a6b9d87b56.zip
op-kernel-dev-1ce8e7b57b3a4527ef83da1c5c7bd8a6b9d87b56.tar.gz
net: ALIGN/PTR_ALIGN cleanup in alloc_netdev_mq()/netdev_priv()
Use ALIGN() and PTR_ALIGN() macros instead of handcoding them. Get rid of NETDEV_ALIGN_CONST ugly define Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/main.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index 6b7e92e..e37770c 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -735,9 +735,7 @@ struct ieee80211_hw *ieee80211_alloc_hw(size_t priv_data_len,
* +-------------------------+
*
*/
- priv_size = ((sizeof(struct ieee80211_local) +
- NETDEV_ALIGN_CONST) & ~NETDEV_ALIGN_CONST) +
- priv_data_len;
+ priv_size = ALIGN(sizeof(*local), NETDEV_ALIGN) + priv_data_len;
wiphy = wiphy_new(&mac80211_config_ops, priv_size);
@@ -754,9 +752,7 @@ struct ieee80211_hw *ieee80211_alloc_hw(size_t priv_data_len,
local->hw.wiphy = wiphy;
- local->hw.priv = (char *)local +
- ((sizeof(struct ieee80211_local) +
- NETDEV_ALIGN_CONST) & ~NETDEV_ALIGN_CONST);
+ local->hw.priv = (char *)local + ALIGN(sizeof(*local), NETDEV_ALIGN);
BUG_ON(!ops->tx);
BUG_ON(!ops->start);
OpenPOWER on IntegriCloud