Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 67064f27 authored by Arend van Spriel's avatar Arend van Spriel Committed by Greg Kroah-Hartman
Browse files

staging: brcm80211: remove filtering of received frames



In the receive path of the brcmsmac driver probe request frames and
frames with invalid mac address fields are dropped. This is only
fine for STA mode. Anticipating coming AP and monitor mode functionality
this is unwanted behavior.

Reported-by: default avatarJohannes Berg <johannes@sipsolutions.net>
Reviewed-by: default avatarPieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: default avatarRoland Vossen <rvossen@broadcom.com>
Signed-off-by: default avatarArend van Spriel <arend@broadcom.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 215f311b
Loading
Loading
Loading
Loading
+1 −22
Original line number Original line Diff line number Diff line
@@ -8238,29 +8238,8 @@ void brcms_c_recv(struct brcms_c_info *wlc, struct sk_buff *p)
	if (len < D11_PHY_HDR_LEN + sizeof(h->frame_control))
	if (len < D11_PHY_HDR_LEN + sizeof(h->frame_control))
		goto toss;
		goto toss;


	/* not supporting A-MSDU */
	is_amsdu = rxh->RxStatus2 & RXS_AMSDU_MASK;
	is_amsdu = rxh->RxStatus2 & RXS_AMSDU_MASK;

	/* explicitly test bad src address to avoid sending bad deauth */
	if (!is_amsdu) {
		/* CTS and ACK CTL frames are w/o a2 */

		if (ieee80211_is_data(h->frame_control) ||
		    ieee80211_is_mgmt(h->frame_control)) {
			if ((is_zero_ether_addr(h->addr2) ||
			     is_multicast_ether_addr(h->addr2))) {
				wiphy_err(wlc->wiphy, "wl%d: %s: dropping a "
					  "frame with invalid src mac address,"
					  " a2: %pM\n",
					 wlc->pub->unit, __func__, h->addr2);
				goto toss;
			}
		}
	}

	/* due to sheer numbers, toss out probe reqs for now */
	if (ieee80211_is_probe_req(h->frame_control))
		goto toss;

	if (is_amsdu)
	if (is_amsdu)
		goto toss;
		goto toss;