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

wifi: ieee80211: split P2P definitions out

The ieee80211.h file has gotten very long, continue splitting
it by putting P2P definitions into a separate file. Note that
P2P isn't really even IEEE 802.11 but WFA.

Link: https://patch.msgid.link/20251105153843.e47b2614e9d2.Id242f61da720e365f6b5d7a4a545fbbc2f1e92b4@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>

+72 -52
+71
include/linux/ieee80211-p2p.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0-only */ 2 + /* 3 + * WFA P2P definitions 4 + * 5 + * Copyright (c) 2001-2002, SSH Communications Security Corp and Jouni Malinen 6 + * <jkmaline@cc.hut.fi> 7 + * Copyright (c) 2002-2003, Jouni Malinen <jkmaline@cc.hut.fi> 8 + * Copyright (c) 2005, Devicescape Software, Inc. 9 + * Copyright (c) 2006, Michael Wu <flamingice@sourmilk.net> 10 + * Copyright (c) 2013 - 2014 Intel Mobile Communications GmbH 11 + * Copyright (c) 2016 - 2017 Intel Deutschland GmbH 12 + * Copyright (c) 2018 - 2025 Intel Corporation 13 + */ 14 + 15 + #ifndef LINUX_IEEE80211_P2P_H 16 + #define LINUX_IEEE80211_P2P_H 17 + 18 + #include <linux/types.h> 19 + /* 20 + * Peer-to-Peer IE attribute related definitions. 21 + */ 22 + /* 23 + * enum ieee80211_p2p_attr_id - identifies type of peer-to-peer attribute. 24 + */ 25 + enum ieee80211_p2p_attr_id { 26 + IEEE80211_P2P_ATTR_STATUS = 0, 27 + IEEE80211_P2P_ATTR_MINOR_REASON, 28 + IEEE80211_P2P_ATTR_CAPABILITY, 29 + IEEE80211_P2P_ATTR_DEVICE_ID, 30 + IEEE80211_P2P_ATTR_GO_INTENT, 31 + IEEE80211_P2P_ATTR_GO_CONFIG_TIMEOUT, 32 + IEEE80211_P2P_ATTR_LISTEN_CHANNEL, 33 + IEEE80211_P2P_ATTR_GROUP_BSSID, 34 + IEEE80211_P2P_ATTR_EXT_LISTEN_TIMING, 35 + IEEE80211_P2P_ATTR_INTENDED_IFACE_ADDR, 36 + IEEE80211_P2P_ATTR_MANAGABILITY, 37 + IEEE80211_P2P_ATTR_CHANNEL_LIST, 38 + IEEE80211_P2P_ATTR_ABSENCE_NOTICE, 39 + IEEE80211_P2P_ATTR_DEVICE_INFO, 40 + IEEE80211_P2P_ATTR_GROUP_INFO, 41 + IEEE80211_P2P_ATTR_GROUP_ID, 42 + IEEE80211_P2P_ATTR_INTERFACE, 43 + IEEE80211_P2P_ATTR_OPER_CHANNEL, 44 + IEEE80211_P2P_ATTR_INVITE_FLAGS, 45 + /* 19 - 220: Reserved */ 46 + IEEE80211_P2P_ATTR_VENDOR_SPECIFIC = 221, 47 + 48 + IEEE80211_P2P_ATTR_MAX 49 + }; 50 + 51 + /* Notice of Absence attribute - described in P2P spec 4.1.14 */ 52 + /* Typical max value used here */ 53 + #define IEEE80211_P2P_NOA_DESC_MAX 4 54 + 55 + struct ieee80211_p2p_noa_desc { 56 + u8 count; 57 + __le32 duration; 58 + __le32 interval; 59 + __le32 start_time; 60 + } __packed; 61 + 62 + struct ieee80211_p2p_noa_attr { 63 + u8 index; 64 + u8 oppps_ctwindow; 65 + struct ieee80211_p2p_noa_desc desc[IEEE80211_P2P_NOA_DESC_MAX]; 66 + } __packed; 67 + 68 + #define IEEE80211_P2P_OPPPS_ENABLE_BIT BIT(7) 69 + #define IEEE80211_P2P_OPPPS_CTWINDOW_MASK 0x7F 70 + 71 + #endif /* LINUX_IEEE80211_P2P_H */
+1 -52
include/linux/ieee80211.h
··· 1333 1333 } u; 1334 1334 } __packed; 1335 1335 1336 - /* 1337 - * Peer-to-Peer IE attribute related definitions. 1338 - */ 1339 - /* 1340 - * enum ieee80211_p2p_attr_id - identifies type of peer-to-peer attribute. 1341 - */ 1342 - enum ieee80211_p2p_attr_id { 1343 - IEEE80211_P2P_ATTR_STATUS = 0, 1344 - IEEE80211_P2P_ATTR_MINOR_REASON, 1345 - IEEE80211_P2P_ATTR_CAPABILITY, 1346 - IEEE80211_P2P_ATTR_DEVICE_ID, 1347 - IEEE80211_P2P_ATTR_GO_INTENT, 1348 - IEEE80211_P2P_ATTR_GO_CONFIG_TIMEOUT, 1349 - IEEE80211_P2P_ATTR_LISTEN_CHANNEL, 1350 - IEEE80211_P2P_ATTR_GROUP_BSSID, 1351 - IEEE80211_P2P_ATTR_EXT_LISTEN_TIMING, 1352 - IEEE80211_P2P_ATTR_INTENDED_IFACE_ADDR, 1353 - IEEE80211_P2P_ATTR_MANAGABILITY, 1354 - IEEE80211_P2P_ATTR_CHANNEL_LIST, 1355 - IEEE80211_P2P_ATTR_ABSENCE_NOTICE, 1356 - IEEE80211_P2P_ATTR_DEVICE_INFO, 1357 - IEEE80211_P2P_ATTR_GROUP_INFO, 1358 - IEEE80211_P2P_ATTR_GROUP_ID, 1359 - IEEE80211_P2P_ATTR_INTERFACE, 1360 - IEEE80211_P2P_ATTR_OPER_CHANNEL, 1361 - IEEE80211_P2P_ATTR_INVITE_FLAGS, 1362 - /* 19 - 220: Reserved */ 1363 - IEEE80211_P2P_ATTR_VENDOR_SPECIFIC = 221, 1364 - 1365 - IEEE80211_P2P_ATTR_MAX 1366 - }; 1367 - 1368 - /* Notice of Absence attribute - described in P2P spec 4.1.14 */ 1369 - /* Typical max value used here */ 1370 - #define IEEE80211_P2P_NOA_DESC_MAX 4 1371 - 1372 - struct ieee80211_p2p_noa_desc { 1373 - u8 count; 1374 - __le32 duration; 1375 - __le32 interval; 1376 - __le32 start_time; 1377 - } __packed; 1378 - 1379 - struct ieee80211_p2p_noa_attr { 1380 - u8 index; 1381 - u8 oppps_ctwindow; 1382 - struct ieee80211_p2p_noa_desc desc[IEEE80211_P2P_NOA_DESC_MAX]; 1383 - } __packed; 1384 - 1385 - #define IEEE80211_P2P_OPPPS_ENABLE_BIT BIT(7) 1386 - #define IEEE80211_P2P_OPPPS_CTWINDOW_MASK 0x7F 1387 - 1388 1336 /* Authentication algorithms */ 1389 1337 #define WLAN_AUTH_OPEN 0 1390 1338 #define WLAN_AUTH_SHARED_KEY 1 ··· 2826 2878 #include "ieee80211-eht.h" 2827 2879 #include "ieee80211-mesh.h" 2828 2880 #include "ieee80211-s1g.h" 2881 + #include "ieee80211-p2p.h" 2829 2882 2830 2883 /** 2831 2884 * ieee80211_check_tim - check if AID bit is set in TIM