diff options
Diffstat (limited to 'net/mac80211/main.c')
-rw-r--r-- | net/mac80211/main.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/net/mac80211/main.c b/net/mac80211/main.c index 6b7e92eaab47..e37770ced53c 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, | |||
735 | * +-------------------------+ | 735 | * +-------------------------+ |
736 | * | 736 | * |
737 | */ | 737 | */ |
738 | priv_size = ((sizeof(struct ieee80211_local) + | 738 | priv_size = ALIGN(sizeof(*local), NETDEV_ALIGN) + priv_data_len; |
739 | NETDEV_ALIGN_CONST) & ~NETDEV_ALIGN_CONST) + | ||
740 | priv_data_len; | ||
741 | 739 | ||
742 | wiphy = wiphy_new(&mac80211_config_ops, priv_size); | 740 | wiphy = wiphy_new(&mac80211_config_ops, priv_size); |
743 | 741 | ||
@@ -754,9 +752,7 @@ struct ieee80211_hw *ieee80211_alloc_hw(size_t priv_data_len, | |||
754 | 752 | ||
755 | local->hw.wiphy = wiphy; | 753 | local->hw.wiphy = wiphy; |
756 | 754 | ||
757 | local->hw.priv = (char *)local + | 755 | local->hw.priv = (char *)local + ALIGN(sizeof(*local), NETDEV_ALIGN); |
758 | ((sizeof(struct ieee80211_local) + | ||
759 | NETDEV_ALIGN_CONST) & ~NETDEV_ALIGN_CONST); | ||
760 | 756 | ||
761 | BUG_ON(!ops->tx); | 757 | BUG_ON(!ops->tx); |
762 | BUG_ON(!ops->start); | 758 | BUG_ON(!ops->start); |