Skip to content

Commit d82d48a

Browse files
Jiapeng Chonggregkh
Jiapeng Chong
authored andcommitted
wifi: ipw2x00: libipw_rx_any(): fix bad alignment
[ Upstream commit 4fa4f049dc0d9741b16c96bcbf0108c85368a2b9 ] This patch fixes incorrect code alignment. ./drivers/net/wireless/intel/ipw2x00/libipw_rx.c:871:2-3: code aligned with following code on line 882. ./drivers/net/wireless/intel/ipw2x00/libipw_rx.c:886:2-3: code aligned with following code on line 900. Reported-by: Abaci Robot <[email protected]> Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=11381 Signed-off-by: Jiapeng Chong <[email protected]> Signed-off-by: Kalle Valo <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Sasha Levin <[email protected]>
1 parent 76649cc commit d82d48a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/net/wireless/intel/ipw2x00/libipw_rx.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -870,8 +870,8 @@ void libipw_rx_any(struct libipw_device *ieee,
870870
switch (ieee->iw_mode) {
871871
case IW_MODE_ADHOC:
872872
/* our BSS and not from/to DS */
873-
if (ether_addr_equal(hdr->addr3, ieee->bssid))
874-
if ((fc & (IEEE80211_FCTL_TODS+IEEE80211_FCTL_FROMDS)) == 0) {
873+
if (ether_addr_equal(hdr->addr3, ieee->bssid) &&
874+
((fc & (IEEE80211_FCTL_TODS + IEEE80211_FCTL_FROMDS)) == 0)) {
875875
/* promisc: get all */
876876
if (ieee->dev->flags & IFF_PROMISC)
877877
is_packet_for_us = 1;
@@ -885,8 +885,8 @@ void libipw_rx_any(struct libipw_device *ieee,
885885
break;
886886
case IW_MODE_INFRA:
887887
/* our BSS (== from our AP) and from DS */
888-
if (ether_addr_equal(hdr->addr2, ieee->bssid))
889-
if ((fc & (IEEE80211_FCTL_TODS+IEEE80211_FCTL_FROMDS)) == IEEE80211_FCTL_FROMDS) {
888+
if (ether_addr_equal(hdr->addr2, ieee->bssid) &&
889+
((fc & (IEEE80211_FCTL_TODS + IEEE80211_FCTL_FROMDS)) == IEEE80211_FCTL_FROMDS)) {
890890
/* promisc: get all */
891891
if (ieee->dev->flags & IFF_PROMISC)
892892
is_packet_for_us = 1;

0 commit comments

Comments
 (0)