diff options
Diffstat (limited to 'include/net/cfg80211.h')
-rw-r--r-- | include/net/cfg80211.h | 83 |
1 files changed, 64 insertions, 19 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index a3f0a7ed31ac..5b3569b2a74c 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
@@ -1561,37 +1561,82 @@ ieee80211_get_response_rate(struct ieee80211_supported_band *sband, | |||
1561 | * Documentation in Documentation/networking/radiotap-headers.txt | 1561 | * Documentation in Documentation/networking/radiotap-headers.txt |
1562 | */ | 1562 | */ |
1563 | 1563 | ||
1564 | struct radiotap_align_size { | ||
1565 | uint8_t align:4, size:4; | ||
1566 | }; | ||
1567 | |||
1568 | struct ieee80211_radiotap_namespace { | ||
1569 | const struct radiotap_align_size *align_size; | ||
1570 | int n_bits; | ||
1571 | uint32_t oui; | ||
1572 | uint8_t subns; | ||
1573 | }; | ||
1574 | |||
1575 | struct ieee80211_radiotap_vendor_namespaces { | ||
1576 | const struct ieee80211_radiotap_namespace *ns; | ||
1577 | int n_ns; | ||
1578 | }; | ||
1579 | |||
1564 | /** | 1580 | /** |
1565 | * struct ieee80211_radiotap_iterator - tracks walk thru present radiotap args | 1581 | * struct ieee80211_radiotap_iterator - tracks walk thru present radiotap args |
1566 | * @rtheader: pointer to the radiotap header we are walking through | 1582 | * @this_arg_index: index of current arg, valid after each successful call |
1567 | * @max_length: length of radiotap header in cpu byte ordering | 1583 | * to ieee80211_radiotap_iterator_next() |
1568 | * @this_arg_index: IEEE80211_RADIOTAP_... index of current arg | 1584 | * @this_arg: pointer to current radiotap arg; it is valid after each |
1569 | * @this_arg: pointer to current radiotap arg | 1585 | * call to ieee80211_radiotap_iterator_next() but also after |
1570 | * @arg_index: internal next argument index | 1586 | * ieee80211_radiotap_iterator_init() where it will point to |
1571 | * @arg: internal next argument pointer | 1587 | * the beginning of the actual data portion |
1572 | * @next_bitmap: internal pointer to next present u32 | 1588 | * @this_arg_size: length of the current arg, for convenience |
1573 | * @bitmap_shifter: internal shifter for curr u32 bitmap, b0 set == arg present | 1589 | * @current_namespace: pointer to the current namespace definition |
1590 | * (or internally %NULL if the current namespace is unknown) | ||
1591 | * @is_radiotap_ns: indicates whether the current namespace is the default | ||
1592 | * radiotap namespace or not | ||
1593 | * | ||
1594 | * @overrides: override standard radiotap fields | ||
1595 | * @n_overrides: number of overrides | ||
1596 | * | ||
1597 | * @_rtheader: pointer to the radiotap header we are walking through | ||
1598 | * @_max_length: length of radiotap header in cpu byte ordering | ||
1599 | * @_arg_index: next argument index | ||
1600 | * @_arg: next argument pointer | ||
1601 | * @_next_bitmap: internal pointer to next present u32 | ||
1602 | * @_bitmap_shifter: internal shifter for curr u32 bitmap, b0 set == arg present | ||
1603 | * @_vns: vendor namespace definitions | ||
1604 | * @_next_ns_data: beginning of the next namespace's data | ||
1605 | * @_reset_on_ext: internal; reset the arg index to 0 when going to the | ||
1606 | * next bitmap word | ||
1607 | * | ||
1608 | * Describes the radiotap parser state. Fields prefixed with an underscore | ||
1609 | * must not be used by users of the parser, only by the parser internally. | ||
1574 | */ | 1610 | */ |
1575 | 1611 | ||
1576 | struct ieee80211_radiotap_iterator { | 1612 | struct ieee80211_radiotap_iterator { |
1577 | struct ieee80211_radiotap_header *rtheader; | 1613 | struct ieee80211_radiotap_header *_rtheader; |
1578 | int max_length; | 1614 | const struct ieee80211_radiotap_vendor_namespaces *_vns; |
1615 | const struct ieee80211_radiotap_namespace *current_namespace; | ||
1616 | |||
1617 | unsigned char *_arg, *_next_ns_data; | ||
1618 | uint32_t *_next_bitmap; | ||
1619 | |||
1620 | unsigned char *this_arg; | ||
1579 | int this_arg_index; | 1621 | int this_arg_index; |
1580 | u8 *this_arg; | 1622 | int this_arg_size; |
1581 | 1623 | ||
1582 | int arg_index; | 1624 | int is_radiotap_ns; |
1583 | u8 *arg; | 1625 | |
1584 | __le32 *next_bitmap; | 1626 | int _max_length; |
1585 | u32 bitmap_shifter; | 1627 | int _arg_index; |
1628 | uint32_t _bitmap_shifter; | ||
1629 | int _reset_on_ext; | ||
1586 | }; | 1630 | }; |
1587 | 1631 | ||
1588 | extern int ieee80211_radiotap_iterator_init( | 1632 | extern int ieee80211_radiotap_iterator_init( |
1589 | struct ieee80211_radiotap_iterator *iterator, | 1633 | struct ieee80211_radiotap_iterator *iterator, |
1590 | struct ieee80211_radiotap_header *radiotap_header, | 1634 | struct ieee80211_radiotap_header *radiotap_header, |
1591 | int max_length); | 1635 | int max_length, const struct ieee80211_radiotap_vendor_namespaces *vns); |
1592 | 1636 | ||
1593 | extern int ieee80211_radiotap_iterator_next( | 1637 | extern int ieee80211_radiotap_iterator_next( |
1594 | struct ieee80211_radiotap_iterator *iterator); | 1638 | struct ieee80211_radiotap_iterator *iterator); |
1639 | |||
1595 | 1640 | ||
1596 | extern const unsigned char rfc1042_header[6]; | 1641 | extern const unsigned char rfc1042_header[6]; |
1597 | extern const unsigned char bridge_tunnel_header[6]; | 1642 | extern const unsigned char bridge_tunnel_header[6]; |