Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Revert "mac80211: warn when receiving frames with unaligned data"

This reverts commit 81100eb80add328c4d2a377326f15aa0e7236398 for the
release, to avoid the unnecessary warning noise that is only really
relevant to wireless driver developers.

The warning will probably go right back in after I cut the release, but
at least we won't unnecessarily worry users.

Acked-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

-13
-13
net/mac80211/rx.c
··· 1443 1443 struct ieee80211_sub_if_data *prev = NULL; 1444 1444 struct sk_buff *skb_new; 1445 1445 u8 *bssid; 1446 - int hdrlen; 1447 1446 1448 1447 /* 1449 1448 * key references and virtual interfaces are protected using RCU ··· 1471 1472 rx.u.rx.status = status; 1472 1473 rx.fc = le16_to_cpu(hdr->frame_control); 1473 1474 type = rx.fc & IEEE80211_FCTL_FTYPE; 1474 - 1475 - /* 1476 - * Drivers are required to align the payload data to a four-byte 1477 - * boundary, so the last two bits of the address where it starts 1478 - * may not be set. The header is required to be directly before 1479 - * the payload data, padding like atheros hardware adds which is 1480 - * inbetween the 802.11 header and the payload is not supported, 1481 - * the driver is required to move the 802.11 header further back 1482 - * in that case. 1483 - */ 1484 - hdrlen = ieee80211_get_hdrlen(rx.fc); 1485 - WARN_ON_ONCE(((unsigned long)(skb->data + hdrlen)) & 3); 1486 1475 1487 1476 if (type == IEEE80211_FTYPE_DATA || type == IEEE80211_FTYPE_MGMT) 1488 1477 local->dot11ReceivedFragmentCount++;