diff options
author | David S. Miller <davem@davemloft.net> | 2009-11-09 14:17:24 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-11-09 14:17:24 -0500 |
commit | f6d773cd4f3c18c40ab25a5cb92453756237840e (patch) | |
tree | 5631a6ea4495ae2eb5058fb63b25dea3b197d61b /include/net | |
parent | d0e1e88d6e7dbd8e1661cb6a058ca30f54ee39e4 (diff) | |
parent | bcb628d579a61d0ab0cac4c6cc8a403de5254920 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/ieee80211_radiotap.h | 2 | ||||
-rw-r--r-- | include/net/mac80211.h | 116 |
2 files changed, 98 insertions, 20 deletions
diff --git a/include/net/ieee80211_radiotap.h b/include/net/ieee80211_radiotap.h index 23c3f3d97779..9d3d86aaccbb 100644 --- a/include/net/ieee80211_radiotap.h +++ b/include/net/ieee80211_radiotap.h | |||
@@ -80,7 +80,7 @@ struct ieee80211_radiotap_header { | |||
80 | * Additional extensions are made | 80 | * Additional extensions are made |
81 | * by setting bit 31. | 81 | * by setting bit 31. |
82 | */ | 82 | */ |
83 | }; | 83 | } __packed; |
84 | 84 | ||
85 | /* Name Data type Units | 85 | /* Name Data type Units |
86 | * ---- --------- ----- | 86 | * ---- --------- ----- |
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index c42c4a820b89..2c10eac637d8 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -494,7 +494,6 @@ ieee80211_tx_info_clear_status(struct ieee80211_tx_info *info) | |||
494 | * @RX_FLAG_MMIC_ERROR: Michael MIC error was reported on this frame. | 494 | * @RX_FLAG_MMIC_ERROR: Michael MIC error was reported on this frame. |
495 | * Use together with %RX_FLAG_MMIC_STRIPPED. | 495 | * Use together with %RX_FLAG_MMIC_STRIPPED. |
496 | * @RX_FLAG_DECRYPTED: This frame was decrypted in hardware. | 496 | * @RX_FLAG_DECRYPTED: This frame was decrypted in hardware. |
497 | * @RX_FLAG_RADIOTAP: This frame starts with a radiotap header. | ||
498 | * @RX_FLAG_MMIC_STRIPPED: the Michael MIC is stripped off this frame, | 497 | * @RX_FLAG_MMIC_STRIPPED: the Michael MIC is stripped off this frame, |
499 | * verification has been done by the hardware. | 498 | * verification has been done by the hardware. |
500 | * @RX_FLAG_IV_STRIPPED: The IV/ICV are stripped from this frame. | 499 | * @RX_FLAG_IV_STRIPPED: The IV/ICV are stripped from this frame. |
@@ -515,7 +514,6 @@ ieee80211_tx_info_clear_status(struct ieee80211_tx_info *info) | |||
515 | enum mac80211_rx_flags { | 514 | enum mac80211_rx_flags { |
516 | RX_FLAG_MMIC_ERROR = 1<<0, | 515 | RX_FLAG_MMIC_ERROR = 1<<0, |
517 | RX_FLAG_DECRYPTED = 1<<1, | 516 | RX_FLAG_DECRYPTED = 1<<1, |
518 | RX_FLAG_RADIOTAP = 1<<2, | ||
519 | RX_FLAG_MMIC_STRIPPED = 1<<3, | 517 | RX_FLAG_MMIC_STRIPPED = 1<<3, |
520 | RX_FLAG_IV_STRIPPED = 1<<4, | 518 | RX_FLAG_IV_STRIPPED = 1<<4, |
521 | RX_FLAG_FAILED_FCS_CRC = 1<<5, | 519 | RX_FLAG_FAILED_FCS_CRC = 1<<5, |
@@ -554,7 +552,7 @@ struct ieee80211_rx_status { | |||
554 | int freq; | 552 | int freq; |
555 | int signal; | 553 | int signal; |
556 | int noise; | 554 | int noise; |
557 | int qual; | 555 | int __deprecated qual; |
558 | int antenna; | 556 | int antenna; |
559 | int rate_idx; | 557 | int rate_idx; |
560 | int flag; | 558 | int flag; |
@@ -565,7 +563,9 @@ struct ieee80211_rx_status { | |||
565 | * | 563 | * |
566 | * Flags to define PHY configuration options | 564 | * Flags to define PHY configuration options |
567 | * | 565 | * |
568 | * @IEEE80211_CONF_RADIOTAP: add radiotap header at receive time (if supported) | 566 | * @IEEE80211_CONF_MONITOR: there's a monitor interface present -- use this |
567 | * to determine for example whether to calculate timestamps for packets | ||
568 | * or not, do not use instead of filter flags! | ||
569 | * @IEEE80211_CONF_PS: Enable 802.11 power save mode (managed mode only) | 569 | * @IEEE80211_CONF_PS: Enable 802.11 power save mode (managed mode only) |
570 | * @IEEE80211_CONF_IDLE: The device is running, but idle; if the flag is set | 570 | * @IEEE80211_CONF_IDLE: The device is running, but idle; if the flag is set |
571 | * the driver should be prepared to handle configuration requests but | 571 | * the driver should be prepared to handle configuration requests but |
@@ -574,7 +574,7 @@ struct ieee80211_rx_status { | |||
574 | * it can also be unset in that case when monitor interfaces are active. | 574 | * it can also be unset in that case when monitor interfaces are active. |
575 | */ | 575 | */ |
576 | enum ieee80211_conf_flags { | 576 | enum ieee80211_conf_flags { |
577 | IEEE80211_CONF_RADIOTAP = (1<<0), | 577 | IEEE80211_CONF_MONITOR = (1<<0), |
578 | IEEE80211_CONF_PS = (1<<1), | 578 | IEEE80211_CONF_PS = (1<<1), |
579 | IEEE80211_CONF_IDLE = (1<<2), | 579 | IEEE80211_CONF_IDLE = (1<<2), |
580 | }; | 580 | }; |
@@ -584,7 +584,7 @@ enum ieee80211_conf_flags { | |||
584 | * enum ieee80211_conf_changed - denotes which configuration changed | 584 | * enum ieee80211_conf_changed - denotes which configuration changed |
585 | * | 585 | * |
586 | * @IEEE80211_CONF_CHANGE_LISTEN_INTERVAL: the listen interval changed | 586 | * @IEEE80211_CONF_CHANGE_LISTEN_INTERVAL: the listen interval changed |
587 | * @IEEE80211_CONF_CHANGE_RADIOTAP: the radiotap flag changed | 587 | * @IEEE80211_CONF_CHANGE_MONITOR: the monitor flag changed |
588 | * @IEEE80211_CONF_CHANGE_PS: the PS flag or dynamic PS timeout changed | 588 | * @IEEE80211_CONF_CHANGE_PS: the PS flag or dynamic PS timeout changed |
589 | * @IEEE80211_CONF_CHANGE_POWER: the TX power changed | 589 | * @IEEE80211_CONF_CHANGE_POWER: the TX power changed |
590 | * @IEEE80211_CONF_CHANGE_CHANNEL: the channel/channel_type changed | 590 | * @IEEE80211_CONF_CHANGE_CHANNEL: the channel/channel_type changed |
@@ -593,7 +593,7 @@ enum ieee80211_conf_flags { | |||
593 | */ | 593 | */ |
594 | enum ieee80211_conf_changed { | 594 | enum ieee80211_conf_changed { |
595 | IEEE80211_CONF_CHANGE_LISTEN_INTERVAL = BIT(2), | 595 | IEEE80211_CONF_CHANGE_LISTEN_INTERVAL = BIT(2), |
596 | IEEE80211_CONF_CHANGE_RADIOTAP = BIT(3), | 596 | IEEE80211_CONF_CHANGE_MONITOR = BIT(3), |
597 | IEEE80211_CONF_CHANGE_PS = BIT(4), | 597 | IEEE80211_CONF_CHANGE_PS = BIT(4), |
598 | IEEE80211_CONF_CHANGE_POWER = BIT(5), | 598 | IEEE80211_CONF_CHANGE_POWER = BIT(5), |
599 | IEEE80211_CONF_CHANGE_CHANNEL = BIT(6), | 599 | IEEE80211_CONF_CHANGE_CHANNEL = BIT(6), |
@@ -1661,8 +1661,7 @@ void ieee80211_restart_hw(struct ieee80211_hw *hw); | |||
1661 | * ieee80211_rx - receive frame | 1661 | * ieee80211_rx - receive frame |
1662 | * | 1662 | * |
1663 | * Use this function to hand received frames to mac80211. The receive | 1663 | * Use this function to hand received frames to mac80211. The receive |
1664 | * buffer in @skb must start with an IEEE 802.11 header or a radiotap | 1664 | * buffer in @skb must start with an IEEE 802.11 header. |
1665 | * header if %RX_FLAG_RADIOTAP is set in the @status flags. | ||
1666 | * | 1665 | * |
1667 | * This function may not be called in IRQ context. Calls to this function | 1666 | * This function may not be called in IRQ context. Calls to this function |
1668 | * for a single hardware must be synchronized against each other. Calls to | 1667 | * for a single hardware must be synchronized against each other. Calls to |
@@ -1744,19 +1743,45 @@ void ieee80211_tx_status_irqsafe(struct ieee80211_hw *hw, | |||
1744 | struct sk_buff *skb); | 1743 | struct sk_buff *skb); |
1745 | 1744 | ||
1746 | /** | 1745 | /** |
1747 | * ieee80211_beacon_get - beacon generation function | 1746 | * ieee80211_beacon_get_tim - beacon generation function |
1748 | * @hw: pointer obtained from ieee80211_alloc_hw(). | 1747 | * @hw: pointer obtained from ieee80211_alloc_hw(). |
1749 | * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf. | 1748 | * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf. |
1749 | * @tim_offset: pointer to variable that will receive the TIM IE offset. | ||
1750 | * Set to 0 if invalid (in non-AP modes). | ||
1751 | * @tim_length: pointer to variable that will receive the TIM IE length, | ||
1752 | * (including the ID and length bytes!). | ||
1753 | * Set to 0 if invalid (in non-AP modes). | ||
1754 | * | ||
1755 | * If the driver implements beaconing modes, it must use this function to | ||
1756 | * obtain the beacon frame/template. | ||
1750 | * | 1757 | * |
1751 | * If the beacon frames are generated by the host system (i.e., not in | 1758 | * If the beacon frames are generated by the host system (i.e., not in |
1752 | * hardware/firmware), the low-level driver uses this function to receive | 1759 | * hardware/firmware), the driver uses this function to get each beacon |
1753 | * the next beacon frame from the 802.11 code. The low-level is responsible | 1760 | * frame from mac80211 -- it is responsible for calling this function |
1754 | * for calling this function before beacon data is needed (e.g., based on | 1761 | * before the beacon is needed (e.g. based on hardware interrupt). |
1755 | * hardware interrupt). Returned skb is used only once and low-level driver | 1762 | * |
1756 | * is responsible for freeing it. | 1763 | * If the beacon frames are generated by the device, then the driver |
1764 | * must use the returned beacon as the template and change the TIM IE | ||
1765 | * according to the current DTIM parameters/TIM bitmap. | ||
1766 | * | ||
1767 | * The driver is responsible for freeing the returned skb. | ||
1768 | */ | ||
1769 | struct sk_buff *ieee80211_beacon_get_tim(struct ieee80211_hw *hw, | ||
1770 | struct ieee80211_vif *vif, | ||
1771 | u16 *tim_offset, u16 *tim_length); | ||
1772 | |||
1773 | /** | ||
1774 | * ieee80211_beacon_get - beacon generation function | ||
1775 | * @hw: pointer obtained from ieee80211_alloc_hw(). | ||
1776 | * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf. | ||
1777 | * | ||
1778 | * See ieee80211_beacon_get_tim(). | ||
1757 | */ | 1779 | */ |
1758 | struct sk_buff *ieee80211_beacon_get(struct ieee80211_hw *hw, | 1780 | static inline struct sk_buff *ieee80211_beacon_get(struct ieee80211_hw *hw, |
1759 | struct ieee80211_vif *vif); | 1781 | struct ieee80211_vif *vif) |
1782 | { | ||
1783 | return ieee80211_beacon_get_tim(hw, vif, NULL, NULL); | ||
1784 | } | ||
1760 | 1785 | ||
1761 | /** | 1786 | /** |
1762 | * ieee80211_rts_get - RTS frame generation function | 1787 | * ieee80211_rts_get - RTS frame generation function |
@@ -2081,16 +2106,69 @@ void ieee80211_stop_tx_ba_cb_irqsafe(struct ieee80211_hw *hw, const u8 *ra, | |||
2081 | /** | 2106 | /** |
2082 | * ieee80211_find_sta - find a station | 2107 | * ieee80211_find_sta - find a station |
2083 | * | 2108 | * |
2084 | * @hw: pointer as obtained from ieee80211_alloc_hw() | 2109 | * @vif: virtual interface to look for station on |
2085 | * @addr: station's address | 2110 | * @addr: station's address |
2086 | * | 2111 | * |
2087 | * This function must be called under RCU lock and the | 2112 | * This function must be called under RCU lock and the |
2088 | * resulting pointer is only valid under RCU lock as well. | 2113 | * resulting pointer is only valid under RCU lock as well. |
2089 | */ | 2114 | */ |
2090 | struct ieee80211_sta *ieee80211_find_sta(struct ieee80211_hw *hw, | 2115 | struct ieee80211_sta *ieee80211_find_sta(struct ieee80211_vif *vif, |
2091 | const u8 *addr); | 2116 | const u8 *addr); |
2092 | 2117 | ||
2093 | /** | 2118 | /** |
2119 | * ieee80211_find_sta_by_hw - find a station on hardware | ||
2120 | * | ||
2121 | * @hw: pointer as obtained from ieee80211_alloc_hw() | ||
2122 | * @addr: station's address | ||
2123 | * | ||
2124 | * This function must be called under RCU lock and the | ||
2125 | * resulting pointer is only valid under RCU lock as well. | ||
2126 | * | ||
2127 | * NOTE: This function should not be used! When mac80211 is converted | ||
2128 | * internally to properly keep track of stations on multiple | ||
2129 | * virtual interfaces, it will not always know which station to | ||
2130 | * return here since a single address might be used by multiple | ||
2131 | * logical stations (e.g. consider a station connecting to another | ||
2132 | * BSSID on the same AP hardware without disconnecting first). | ||
2133 | * | ||
2134 | * DO NOT USE THIS FUNCTION. | ||
2135 | */ | ||
2136 | struct ieee80211_sta *ieee80211_find_sta_by_hw(struct ieee80211_hw *hw, | ||
2137 | const u8 *addr); | ||
2138 | |||
2139 | /** | ||
2140 | * ieee80211_sta_block_awake - block station from waking up | ||
2141 | * @hw: the hardware | ||
2142 | * @pubsta: the station | ||
2143 | * @block: whether to block or unblock | ||
2144 | * | ||
2145 | * Some devices require that all frames that are on the queues | ||
2146 | * for a specific station that went to sleep are flushed before | ||
2147 | * a poll response or frames after the station woke up can be | ||
2148 | * delivered to that it. Note that such frames must be rejected | ||
2149 | * by the driver as filtered, with the appropriate status flag. | ||
2150 | * | ||
2151 | * This function allows implementing this mode in a race-free | ||
2152 | * manner. | ||
2153 | * | ||
2154 | * To do this, a driver must keep track of the number of frames | ||
2155 | * still enqueued for a specific station. If this number is not | ||
2156 | * zero when the station goes to sleep, the driver must call | ||
2157 | * this function to force mac80211 to consider the station to | ||
2158 | * be asleep regardless of the station's actual state. Once the | ||
2159 | * number of outstanding frames reaches zero, the driver must | ||
2160 | * call this function again to unblock the station. That will | ||
2161 | * cause mac80211 to be able to send ps-poll responses, and if | ||
2162 | * the station queried in the meantime then frames will also | ||
2163 | * be sent out as a result of this. Additionally, the driver | ||
2164 | * will be notified that the station woke up some time after | ||
2165 | * it is unblocked, regardless of whether the station actually | ||
2166 | * woke up while blocked or not. | ||
2167 | */ | ||
2168 | void ieee80211_sta_block_awake(struct ieee80211_hw *hw, | ||
2169 | struct ieee80211_sta *pubsta, bool block); | ||
2170 | |||
2171 | /** | ||
2094 | * ieee80211_beacon_loss - inform hardware does not receive beacons | 2172 | * ieee80211_beacon_loss - inform hardware does not receive beacons |
2095 | * | 2173 | * |
2096 | * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf. | 2174 | * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf. |