]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
wifi: cfg80211: allow ToDS=0/FromDS=0 data frames on NAN data interfaces
authorDaniel Gabay <daniel.gabay@intel.com>
Wed, 18 Mar 2026 12:39:21 +0000 (14:39 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 25 Mar 2026 19:56:55 +0000 (20:56 +0100)
According to Wi-Fi Aware (TM) specification Table 3, data frame should
have 0 in the FromDS/ToDS fields. Don't drop received frames with 0
FromDS/ToDS if they are received on NAN_DATA interface.
While at it, fix a double indent.

Signed-off-by: Daniel Gabay <daniel.gabay@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260108102921.de5f318a790a.Id34dd69552920b579e6881ffd38fa692a491b601@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260219094725.3846371-5-miriam.rachel.korenblit@intel.com
Link: https://patch.msgid.link/20260318123926.206536-8-miriam.rachel.korenblit@intel.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/wireless/util.c

index e2878d20a32dfe1b4494ac7bb42b575a6c446151..cff5a1bd95cc4907f21122c31cf2d0e216aa198f 100644 (file)
@@ -625,8 +625,9 @@ int ieee80211_data_to_8023_exthdr(struct sk_buff *skb, struct ethhdr *ehdr,
        case cpu_to_le16(0):
                if (iftype != NL80211_IFTYPE_ADHOC &&
                    iftype != NL80211_IFTYPE_STATION &&
-                   iftype != NL80211_IFTYPE_OCB)
-                               return -1;
+                   iftype != NL80211_IFTYPE_OCB &&
+                   iftype != NL80211_IFTYPE_NAN_DATA)
+                       return -1;
                break;
        }