Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 171351
b: refs/heads/master
c: 22403de
h: refs/heads/master
i:
  171349: a332217
  171347: 947d712
  171343: d6f226b
v: v3
  • Loading branch information
Johannes Berg authored and John W. Linville committed Oct 30, 2009
1 parent 0590aea commit 364d945
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e7d17cf4f7e1b8d06575b6db2397c99c151674b8
refs/heads/master: 22403def134e2c1017cb04ae9129a38e841b2d8c
12 changes: 11 additions & 1 deletion trunk/include/linux/ieee80211.h
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ static inline int ieee80211_is_cfendack(__le16 fc)
}

/**
* ieee80211_is_nullfunc - check if FTYPE=IEEE80211_FTYPE_DATA and STYPE=IEEE80211_STYPE_NULLFUNC
* ieee80211_is_nullfunc - check if frame is a regular (non-QoS) nullfunc frame
* @fc: frame control bytes in little-endian byteorder
*/
static inline int ieee80211_is_nullfunc(__le16 fc)
Expand All @@ -481,6 +481,16 @@ static inline int ieee80211_is_nullfunc(__le16 fc)
cpu_to_le16(IEEE80211_FTYPE_DATA | IEEE80211_STYPE_NULLFUNC);
}

/**
* ieee80211_is_qos_nullfunc - check if frame is a QoS nullfunc frame
* @fc: frame control bytes in little-endian byteorder
*/
static inline int ieee80211_is_qos_nullfunc(__le16 fc)
{
return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) ==
cpu_to_le16(IEEE80211_FTYPE_DATA | IEEE80211_STYPE_QOS_NULLFUNC);
}

struct ieee80211s_hdr {
u8 flags;
u8 ttl;
Expand Down
15 changes: 10 additions & 5 deletions trunk/net/mac80211/rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -886,12 +886,17 @@ ieee80211_rx_h_sta_process(struct ieee80211_rx_data *rx)
}
}

/* Drop data::nullfunc frames silently, since they are used only to
* control station power saving mode. */
if (ieee80211_is_nullfunc(hdr->frame_control)) {
/*
* Drop (qos-)data::nullfunc frames silently, since they
* are used only to control station power saving mode.
*/
if (ieee80211_is_nullfunc(hdr->frame_control) ||
ieee80211_is_qos_nullfunc(hdr->frame_control)) {
I802_DEBUG_INC(rx->local->rx_handlers_drop_nullfunc);
/* Update counter and free packet here to avoid counting this
* as a dropped packed. */
/*
* Update counter and free packet here to avoid
* counting this as a dropped packed.
*/
sta->rx_packets++;
dev_kfree_skb(rx->skb);
return RX_QUEUED;
Expand Down

0 comments on commit 364d945

Please sign in to comment.