cfg80211.h (5db817d864241232c51d654836996282c69f5e28) cfg80211.h (13d87d92e401523f8d8e817720d40dc31cdfa444)
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

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

1735 /* Only 6Ghz. */
1736 if (channel->band != NL80211_BAND_6GHZ)
1737 return (false);
1738
1739 TODO();
1740 return (false);
1741}
1742
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

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

1735 /* Only 6Ghz. */
1736 if (channel->band != NL80211_BAND_6GHZ)
1737 return (false);
1738
1739 TODO();
1740 return (false);
1741}
1742
1743static __inline int
1743static inline int
1744cfg80211_get_ies_channel_number(const uint8_t *ie, size_t len,
1745 enum nl80211_band band, enum cfg80211_bss_frame_type ftype)
1746{
1744cfg80211_get_ies_channel_number(const uint8_t *ie, size_t len,
1745 enum nl80211_band band, enum cfg80211_bss_frame_type ftype)
1746{
1747 const struct element *elem;
1747
1748
1748 TODO();
1749 switch (band) {
1750 case NL80211_BAND_6GHZ:
1751 TODO();
1752 break;
1753 case NL80211_BAND_5GHZ:
1754 case NL80211_BAND_2GHZ:
1755 /* DSPARAMS has the channel number. */
1756 elem = cfg80211_find_elem(IEEE80211_ELEMID_DSPARMS, ie, len);
1757 if (elem != NULL && elem->datalen == 1)
1758 return (elem->data[0]);
1759 /* HTINFO has the primary center channel. */
1760 elem = cfg80211_find_elem(IEEE80211_ELEMID_HTINFO, ie, len);
1761 if (elem != NULL &&
1762 elem->datalen >= (sizeof(struct ieee80211_ie_htinfo) - 2)) {
1763 const struct ieee80211_ie_htinfo *htinfo;
1764 htinfo = (const struct ieee80211_ie_htinfo *)elem;
1765 return (htinfo->hi_ctrlchannel);
1766 }
1767 /* What else? */
1768 break;
1769 default:
1770 IMPROVE("Unsupported");
1771 break;
1772 }
1749 return (-1);
1750}
1751
1752/* Used for scanning at least. */
1753static __inline void
1754get_random_mask_addr(uint8_t *dst, const uint8_t *addr, const uint8_t *mask)
1755{
1756 int i;

--- 53 unchanged lines hidden ---
1773 return (-1);
1774}
1775
1776/* Used for scanning at least. */
1777static __inline void
1778get_random_mask_addr(uint8_t *dst, const uint8_t *addr, const uint8_t *mask)
1779{
1780 int i;

--- 53 unchanged lines hidden ---