Re: [Projekt-wlan] [PATCHv5 2/2] mac80211: fix A-MSDU outer SA/DA
On Mon, 2016-10-17 at 12:29 +0200, michael-dev wrote: > > ether_addr_copy requires both arguments to be __aligned(2) according > to > include/linux/etherdevice.h. > bssid might be sdata->u.mgd.bssid, which is bssid in struct > ieee80211_if_managed, but neither sdata->u, sdata->u.mgd nor > sdata->u.mgd.bssid seem to be declared as __aligned(2).So > ether_addr_copy should not be used. They are in fact aligned today, given that they occur after a pointer. However, I did add the __aligned(2) annotation to make that plenty clear for the future. johannes
Re: [Projekt-wlan] [PATCHv5 2/2] mac80211: fix A-MSDU outer SA/DA
Am 17.10.2016 11:44, schrieb Johannes Berg: + if (bssid && ieee80211_has_fromds(hdr->frame_control)) + memcpy(h_80211_src, bssid, ETH_ALEN); + + if (bssid && ieee80211_has_tods(hdr->frame_control)) + memcpy(h_80211_dst, bssid, ETH_ALEN); but I also changed these to ether_addr_copy() ether_addr_copy requires both arguments to be __aligned(2) according to include/linux/etherdevice.h. bssid might be sdata->u.mgd.bssid, which is bssid in struct ieee80211_if_managed, but neither sdata->u, sdata->u.mgd nor sdata->u.mgd.bssid seem to be declared as __aligned(2). So ether_addr_copy should not be used. What am I missing? Regards, M. Braun