cfg80211.h (2e183d999c6033e876602ddbbc5cb538bb41e4b3) cfg80211.h (d875aa1587ce7d1651cabe395ed991f2384795cd)
1/*-
2 * Copyright (c) 2020-2021 The FreeBSD Foundation
3 * Copyright (c) 2021-2022 Bjoern A. Zeeb
4 *
5 * This software was developed by Björn Zeeb under sponsorship from
6 * the FreeBSD Foundation.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 42 unchanged lines hidden (view full) ---

51#ifndef D80211_IMPROVE
52#define D80211_IMPROVE 0x2
53#endif
54#define TODO() if (debug_80211 & D80211_TODO) \
55 printf("%s:%d: XXX LKPI80211 TODO\n", __func__, __LINE__)
56#define IMPROVE(...) if (debug_80211 & D80211_IMPROVE) \
57 printf("%s:%d: XXX LKPI80211 IMPROVE\n", __func__, __LINE__)
58
1/*-
2 * Copyright (c) 2020-2021 The FreeBSD Foundation
3 * Copyright (c) 2021-2022 Bjoern A. Zeeb
4 *
5 * This software was developed by Björn Zeeb under sponsorship from
6 * the FreeBSD Foundation.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 42 unchanged lines hidden (view full) ---

51#ifndef D80211_IMPROVE
52#define D80211_IMPROVE 0x2
53#endif
54#define TODO() if (debug_80211 & D80211_TODO) \
55 printf("%s:%d: XXX LKPI80211 TODO\n", __func__, __LINE__)
56#define IMPROVE(...) if (debug_80211 & D80211_IMPROVE) \
57 printf("%s:%d: XXX LKPI80211 IMPROVE\n", __func__, __LINE__)
58
59enum rfkill_hard_block_reasons {
60 RFKILL_HARD_BLOCK_NOT_OWNER = BIT(0),
61};
62
59#define WIPHY_PARAM_FRAG_THRESHOLD __LINE__ /* TODO FIXME brcmfmac */
60#define WIPHY_PARAM_RETRY_LONG __LINE__ /* TODO FIXME brcmfmac */
61#define WIPHY_PARAM_RETRY_SHORT __LINE__ /* TODO FIXME brcmfmac */
62#define WIPHY_PARAM_RTS_THRESHOLD __LINE__ /* TODO FIXME brcmfmac */
63
64#define CFG80211_SIGNAL_TYPE_MBM __LINE__ /* TODO FIXME brcmfmac */
65
66#define UPDATE_ASSOC_IES 1

--- 621 unchanged lines hidden (view full) ---

688#define IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_RX_MASK 0x1
689#define IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_RX_NO_DCM 0x2
690#define IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_TX_NO_DCM 0x4
691#define IEEE80211_HE_PHY_CAP3_DCM_MAX_RX_NSS_1 0x8
692#define IEEE80211_HE_PHY_CAP3_DCM_MAX_TX_NSS_1 0x10
693#define IEEE80211_HE_PHY_CAP3_SU_BEAMFORMER 0x20
694#define IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_RX_16_QAM 0x40
695#define IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_TX_16_QAM 0x80
63#define WIPHY_PARAM_FRAG_THRESHOLD __LINE__ /* TODO FIXME brcmfmac */
64#define WIPHY_PARAM_RETRY_LONG __LINE__ /* TODO FIXME brcmfmac */
65#define WIPHY_PARAM_RETRY_SHORT __LINE__ /* TODO FIXME brcmfmac */
66#define WIPHY_PARAM_RTS_THRESHOLD __LINE__ /* TODO FIXME brcmfmac */
67
68#define CFG80211_SIGNAL_TYPE_MBM __LINE__ /* TODO FIXME brcmfmac */
69
70#define UPDATE_ASSOC_IES 1

--- 621 unchanged lines hidden (view full) ---

692#define IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_RX_MASK 0x1
693#define IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_RX_NO_DCM 0x2
694#define IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_TX_NO_DCM 0x4
695#define IEEE80211_HE_PHY_CAP3_DCM_MAX_RX_NSS_1 0x8
696#define IEEE80211_HE_PHY_CAP3_DCM_MAX_TX_NSS_1 0x10
697#define IEEE80211_HE_PHY_CAP3_SU_BEAMFORMER 0x20
698#define IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_RX_16_QAM 0x40
699#define IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_TX_16_QAM 0x80
696#define IEEE80211_HE_PHY_CAP3_DCM_MAX_TX_NSS_2 0x100
697#define IEEE80211_HE_PHY_CAP3_RX_PARTIAL_BW_SU_IN_20MHZ_MU 0x200
700#define IEEE80211_HE_PHY_CAP3_DCM_MAX_TX_NSS_2 0x10
701#define IEEE80211_HE_PHY_CAP3_RX_PARTIAL_BW_SU_IN_20MHZ_MU 0x20
702#define IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_RX_BPSK 0x40
703#define IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_TX_BPSK 0x80
704#define IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_TX_MASK 0x80
698
699#define IEEE80211_HE_PHY_CAP4_BEAMFORMEE_MAX_STS_UNDER_80MHZ_8 0x1
700#define IEEE80211_HE_PHY_CAP4_BEAMFORMEE_MAX_STS_ABOVE_80MHZ_8 0x2
701#define IEEE80211_HE_PHY_CAP4_SU_BEAMFORMEE 0x4
702#define IEEE80211_HE_PHY_CAP4_MU_BEAMFORMER 0x8
703#define IEEE80211_HE_PHY_CAP4_BEAMFORMEE_MAX_STS_UNDER_80MHZ_4 0x10
704
705#define IEEE80211_HE_PHY_CAP5_BEAMFORMEE_NUM_SND_DIM_ABOVE_80MHZ_2 0x1

--- 28 unchanged lines hidden (view full) ---

734#define IEEE80211_HE_PHY_CAP8_DCM_MAX_RU_996 0x40
735#define IEEE80211_HE_PHY_CAP8_HE_ER_SU_1XLTF_AND_08_US_GI 0x80
736
737#define IEEE80211_HE_PHY_CAP9_NOMINAL_PKT_PADDING_0US 0x1
738#define IEEE80211_HE_PHY_CAP9_NOMINAL_PKT_PADDING_16US 0x2
739#define IEEE80211_HE_PHY_CAP9_NOMINAL_PKT_PADDING_8US 0x4
740#define IEEE80211_HE_PHY_CAP9_NOMINAL_PKT_PADDING_MASK 0x8
741#define IEEE80211_HE_PHY_CAP9_NOMINAL_PKT_PADDING_RESERVED 0x10
705
706#define IEEE80211_HE_PHY_CAP4_BEAMFORMEE_MAX_STS_UNDER_80MHZ_8 0x1
707#define IEEE80211_HE_PHY_CAP4_BEAMFORMEE_MAX_STS_ABOVE_80MHZ_8 0x2
708#define IEEE80211_HE_PHY_CAP4_SU_BEAMFORMEE 0x4
709#define IEEE80211_HE_PHY_CAP4_MU_BEAMFORMER 0x8
710#define IEEE80211_HE_PHY_CAP4_BEAMFORMEE_MAX_STS_UNDER_80MHZ_4 0x10
711
712#define IEEE80211_HE_PHY_CAP5_BEAMFORMEE_NUM_SND_DIM_ABOVE_80MHZ_2 0x1

--- 28 unchanged lines hidden (view full) ---

741#define IEEE80211_HE_PHY_CAP8_DCM_MAX_RU_996 0x40
742#define IEEE80211_HE_PHY_CAP8_HE_ER_SU_1XLTF_AND_08_US_GI 0x80
743
744#define IEEE80211_HE_PHY_CAP9_NOMINAL_PKT_PADDING_0US 0x1
745#define IEEE80211_HE_PHY_CAP9_NOMINAL_PKT_PADDING_16US 0x2
746#define IEEE80211_HE_PHY_CAP9_NOMINAL_PKT_PADDING_8US 0x4
747#define IEEE80211_HE_PHY_CAP9_NOMINAL_PKT_PADDING_MASK 0x8
748#define IEEE80211_HE_PHY_CAP9_NOMINAL_PKT_PADDING_RESERVED 0x10
749#define IEEE80211_HE_PHY_CAP9_NOMINAL_PKT_PADDING_POS 0x0
742#define IEEE80211_HE_PHY_CAP9_NON_TRIGGERED_CQI_FEEDBACK 0x20
750#define IEEE80211_HE_PHY_CAP9_NON_TRIGGERED_CQI_FEEDBACK 0x20
743#define IEEE80211_HE_PHY_CAP9_RX_FULL_BW_SU_USING_MU_WITH_COMP_SIGB 0x40
744#define IEEE80211_HE_PHY_CAP9_RX_FULL_BW_SU_USING_MU_WITH_NON_COMP_SIGB 0x80
745#define IEEE80211_HE_PHY_CAP9_RX_1024_QAM_LESS_THAN_242_TONE_RU 0x100
746#define IEEE80211_HE_PHY_CAP9_TX_1024_QAM_LESS_THAN_242_TONE_RU 0x200
747#define IEEE80211_HE_PHY_CAP9_LONGER_THAN_16_SIGB_OFDM_SYM 0x400
751#define IEEE80211_HE_PHY_CAP9_RX_FULL_BW_SU_USING_MU_WITH_COMP_SIGB 0x4
752#define IEEE80211_HE_PHY_CAP9_RX_FULL_BW_SU_USING_MU_WITH_NON_COMP_SIGB 0x8
753#define IEEE80211_HE_PHY_CAP9_RX_1024_QAM_LESS_THAN_242_TONE_RU 0x10
754#define IEEE80211_HE_PHY_CAP9_TX_1024_QAM_LESS_THAN_242_TONE_RU 0x20
755#define IEEE80211_HE_PHY_CAP9_LONGER_THAN_16_SIGB_OFDM_SYM 0x40
748
749#define IEEE80211_HE_PHY_CAP10_HE_MU_M1RU_MAX_LTF 0x1
750
751#define VENDOR_CMD_RAW_DATA (void *)(uintptr_t)(-ENOENT)
752
753struct ieee80211_he_cap_elem {
754 u8 mac_cap_info[6];
755 u8 phy_cap_info[11];

--- 191 unchanged lines hidden (view full) ---

947
948 int available_antennas_rx, available_antennas_tx;
949 int features, hw_version;
950 int interface_modes, max_match_sets, max_remain_on_channel_duration, max_scan_ie_len, max_scan_ssids, max_sched_scan_ie_len, max_sched_scan_plan_interval, max_sched_scan_plan_iterations, max_sched_scan_plans, max_sched_scan_reqs, max_sched_scan_ssids;
951 int num_iftype_ext_capab;
952 int max_ap_assoc_sta, probe_resp_offload, software_iftypes;
953 int bss_select_support, max_num_pmkids, retry_long, retry_short, signal_type;
954 int max_data_retry_count;
756
757#define IEEE80211_HE_PHY_CAP10_HE_MU_M1RU_MAX_LTF 0x1
758
759#define VENDOR_CMD_RAW_DATA (void *)(uintptr_t)(-ENOENT)
760
761struct ieee80211_he_cap_elem {
762 u8 mac_cap_info[6];
763 u8 phy_cap_info[11];

--- 191 unchanged lines hidden (view full) ---

955
956 int available_antennas_rx, available_antennas_tx;
957 int features, hw_version;
958 int interface_modes, max_match_sets, max_remain_on_channel_duration, max_scan_ie_len, max_scan_ssids, max_sched_scan_ie_len, max_sched_scan_plan_interval, max_sched_scan_plan_iterations, max_sched_scan_plans, max_sched_scan_reqs, max_sched_scan_ssids;
959 int num_iftype_ext_capab;
960 int max_ap_assoc_sta, probe_resp_offload, software_iftypes;
961 int bss_select_support, max_num_pmkids, retry_long, retry_short, signal_type;
962 int max_data_retry_count;
955 int tx_queue_len;
963 int tx_queue_len, rfkill;
956
957 unsigned long ext_features[BITS_TO_LONGS(NUM_NL80211_EXT_FEATURES)];
958 struct dentry *debugfsdir;
959 struct cfg80211_wowlan_support *wowlan;
960 /* Lower layer (driver/mac80211) specific data. */
961 /* Must stay last. */
962 uint8_t priv[0] __aligned(CACHE_LINE_SIZE);
963};

--- 112 unchanged lines hidden (view full) ---

1076static __inline const struct linuxkpi_ieee80211_regdomain *
1077wiphy_dereference(struct wiphy *wiphy,
1078 const struct linuxkpi_ieee80211_regdomain *regd)
1079{
1080 TODO();
1081 return (NULL);
1082}
1083
964
965 unsigned long ext_features[BITS_TO_LONGS(NUM_NL80211_EXT_FEATURES)];
966 struct dentry *debugfsdir;
967 struct cfg80211_wowlan_support *wowlan;
968 /* Lower layer (driver/mac80211) specific data. */
969 /* Must stay last. */
970 uint8_t priv[0] __aligned(CACHE_LINE_SIZE);
971};

--- 112 unchanged lines hidden (view full) ---

1084static __inline const struct linuxkpi_ieee80211_regdomain *
1085wiphy_dereference(struct wiphy *wiphy,
1086 const struct linuxkpi_ieee80211_regdomain *regd)
1087{
1088 TODO();
1089 return (NULL);
1090}
1091
1092static __inline void
1093wiphy_lock(struct wiphy *wiphy)
1094{
1095 TODO();
1096}
1097
1098static __inline void
1099wiphy_unlock(struct wiphy *wiphy)
1100{
1101 TODO();
1102}
1103
1104static __inline void
1105wiphy_rfkill_set_hw_state_reason(struct wiphy *wiphy, bool blocked,
1106 enum rfkill_hard_block_reasons reason)
1107{
1108 TODO();
1109}
1110
1084/* -------------------------------------------------------------------------- */
1085
1111/* -------------------------------------------------------------------------- */
1112
1113static __inline bool
1114rfkill_blocked(int rfkill) /* argument type? */
1115{
1116 TODO();
1117 return (false);
1118}
1119
1086static __inline int
1087reg_query_regdb_wmm(uint8_t *alpha2, uint32_t center_freq,
1088 struct ieee80211_reg_rule *rule)
1089{
1090
1091 /* ETSI has special rules. FreeBSD regdb needs to learn about them. */
1092 TODO();
1093

--- 470 unchanged lines hidden (view full) ---

1564 int i;
1565
1566 /* Get a completely random address and then overlay what we want. */
1567 get_random_bytes(dst, ETH_ALEN);
1568 for (i = 0; i < ETH_ALEN; i++)
1569 dst[i] = (dst[i] & ~(mask[i])) | (addr[i] & mask[i]);
1570}
1571
1120static __inline int
1121reg_query_regdb_wmm(uint8_t *alpha2, uint32_t center_freq,
1122 struct ieee80211_reg_rule *rule)
1123{
1124
1125 /* ETSI has special rules. FreeBSD regdb needs to learn about them. */
1126 TODO();
1127

--- 470 unchanged lines hidden (view full) ---

1598 int i;
1599
1600 /* Get a completely random address and then overlay what we want. */
1601 get_random_bytes(dst, ETH_ALEN);
1602 for (i = 0; i < ETH_ALEN; i++)
1603 dst[i] = (dst[i] & ~(mask[i])) | (addr[i] & mask[i]);
1604}
1605
1606static __inline void
1607cfg80211_shutdown_all_interfaces(struct wiphy *wiphy)
1608{
1609 TODO();
1610}
1611
1572#ifndef LINUXKPI_NET80211
1573#define ieee80211_channel linuxkpi_ieee80211_channel
1574#define ieee80211_regdomain linuxkpi_ieee80211_regdomain
1575/* net80211::IEEE80211_VHT_MCS_SUPPORT_0_n() conflicts */
1576#if defined(IEEE80211_VHT_MCS_SUPPORT_0_7)
1577#undef IEEE80211_VHT_MCS_SUPPORT_0_7
1578#endif
1579#if defined(IEEE80211_VHT_MCS_SUPPORT_0_8)
1580#undef IEEE80211_VHT_MCS_SUPPORT_0_8
1581#endif
1582#if defined(IEEE80211_VHT_MCS_SUPPORT_0_9)
1583#undef IEEE80211_VHT_MCS_SUPPORT_0_9
1584#endif
1585#define IEEE80211_VHT_MCS_SUPPORT_0_7 LKPI_IEEE80211_VHT_MCS_SUPPORT_0_7
1586#define IEEE80211_VHT_MCS_SUPPORT_0_8 LKPI_IEEE80211_VHT_MCS_SUPPORT_0_8
1587#define IEEE80211_VHT_MCS_SUPPORT_0_9 LKPI_IEEE80211_VHT_MCS_SUPPORT_0_9
1588#endif
1589
1590#endif /* _LINUXKPI_NET_CFG80211_H */
1612#ifndef LINUXKPI_NET80211
1613#define ieee80211_channel linuxkpi_ieee80211_channel
1614#define ieee80211_regdomain linuxkpi_ieee80211_regdomain
1615/* net80211::IEEE80211_VHT_MCS_SUPPORT_0_n() conflicts */
1616#if defined(IEEE80211_VHT_MCS_SUPPORT_0_7)
1617#undef IEEE80211_VHT_MCS_SUPPORT_0_7
1618#endif
1619#if defined(IEEE80211_VHT_MCS_SUPPORT_0_8)
1620#undef IEEE80211_VHT_MCS_SUPPORT_0_8
1621#endif
1622#if defined(IEEE80211_VHT_MCS_SUPPORT_0_9)
1623#undef IEEE80211_VHT_MCS_SUPPORT_0_9
1624#endif
1625#define IEEE80211_VHT_MCS_SUPPORT_0_7 LKPI_IEEE80211_VHT_MCS_SUPPORT_0_7
1626#define IEEE80211_VHT_MCS_SUPPORT_0_8 LKPI_IEEE80211_VHT_MCS_SUPPORT_0_8
1627#define IEEE80211_VHT_MCS_SUPPORT_0_9 LKPI_IEEE80211_VHT_MCS_SUPPORT_0_9
1628#endif
1629
1630#endif /* _LINUXKPI_NET_CFG80211_H */