aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/mac80211.h
diff options
context:
space:
mode:
authorDaniel Drake <dsd@gentoo.org>2007-07-27 09:43:24 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:47:38 -0400
commit7e9ed18874f0df84b6651f0636e1cfdac43bc610 (patch)
tree7bac6083031a48e488c0de5bf71e7f9398e0e011 /include/net/mac80211.h
parentd5d08def9216c445339c5a24a2cdc9cc2c8c13f7 (diff)
[MAC80211]: improved short preamble handling
Similarly to CTS protection, whether short preambles are used for 802.11b transmissions should be a per-subif setting, not device global. For STAs, this patch makes short preamble handling automatic based on the ERP IE. For APs, hostapd still uses the prism ioctls, but the write ioctl has been restricted to AP-only subifs. ieee80211_txrx_data.short_preamble (an unused field) was removed. Unfortunately, some API changes were required for the following functions: - ieee80211_generic_frame_duration - ieee80211_rts_duration - ieee80211_ctstoself_duration - ieee80211_rts_get - ieee80211_ctstoself_get Affected drivers were updated accordingly. Signed-off-by: Daniel Drake <dsd@gentoo.org> Signed-off-by: Jiri Benc <jbenc@suse.cz> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'include/net/mac80211.h')
-rw-r--r--include/net/mac80211.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 91cee0f0aa71..3282038a1510 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -835,6 +835,7 @@ struct sk_buff *ieee80211_beacon_get(struct ieee80211_hw *hw,
835/** 835/**
836 * ieee80211_rts_get - RTS frame generation function 836 * ieee80211_rts_get - RTS frame generation function
837 * @hw: pointer obtained from ieee80211_alloc_hw(). 837 * @hw: pointer obtained from ieee80211_alloc_hw().
838 * @if_id: interface ID from &struct ieee80211_if_init_conf.
838 * @frame: pointer to the frame that is going to be protected by the RTS. 839 * @frame: pointer to the frame that is going to be protected by the RTS.
839 * @frame_len: the frame length (in octets). 840 * @frame_len: the frame length (in octets).
840 * @frame_txctl: &struct ieee80211_tx_control of the frame. 841 * @frame_txctl: &struct ieee80211_tx_control of the frame.
@@ -845,7 +846,7 @@ struct sk_buff *ieee80211_beacon_get(struct ieee80211_hw *hw,
845 * the next RTS frame from the 802.11 code. The low-level is responsible 846 * the next RTS frame from the 802.11 code. The low-level is responsible
846 * for calling this function before and RTS frame is needed. 847 * for calling this function before and RTS frame is needed.
847 */ 848 */
848void ieee80211_rts_get(struct ieee80211_hw *hw, 849void ieee80211_rts_get(struct ieee80211_hw *hw, int if_id,
849 const void *frame, size_t frame_len, 850 const void *frame, size_t frame_len,
850 const struct ieee80211_tx_control *frame_txctl, 851 const struct ieee80211_tx_control *frame_txctl,
851 struct ieee80211_rts *rts); 852 struct ieee80211_rts *rts);
@@ -853,6 +854,7 @@ void ieee80211_rts_get(struct ieee80211_hw *hw,
853/** 854/**
854 * ieee80211_rts_duration - Get the duration field for an RTS frame 855 * ieee80211_rts_duration - Get the duration field for an RTS frame
855 * @hw: pointer obtained from ieee80211_alloc_hw(). 856 * @hw: pointer obtained from ieee80211_alloc_hw().
857 * @if_id: interface ID from &struct ieee80211_if_init_conf.
856 * @frame_len: the length of the frame that is going to be protected by the RTS. 858 * @frame_len: the length of the frame that is going to be protected by the RTS.
857 * @frame_txctl: &struct ieee80211_tx_control of the frame. 859 * @frame_txctl: &struct ieee80211_tx_control of the frame.
858 * 860 *
@@ -860,13 +862,14 @@ void ieee80211_rts_get(struct ieee80211_hw *hw,
860 * the duration field, the low-level driver uses this function to receive 862 * the duration field, the low-level driver uses this function to receive
861 * the duration field value in little-endian byteorder. 863 * the duration field value in little-endian byteorder.
862 */ 864 */
863__le16 ieee80211_rts_duration(struct ieee80211_hw *hw, 865__le16 ieee80211_rts_duration(struct ieee80211_hw *hw, int if_id,
864 size_t frame_len, 866 size_t frame_len,
865 const struct ieee80211_tx_control *frame_txctl); 867 const struct ieee80211_tx_control *frame_txctl);
866 868
867/** 869/**
868 * ieee80211_ctstoself_get - CTS-to-self frame generation function 870 * ieee80211_ctstoself_get - CTS-to-self frame generation function
869 * @hw: pointer obtained from ieee80211_alloc_hw(). 871 * @hw: pointer obtained from ieee80211_alloc_hw().
872 * @if_id: interface ID from &struct ieee80211_if_init_conf.
870 * @frame: pointer to the frame that is going to be protected by the CTS-to-self. 873 * @frame: pointer to the frame that is going to be protected by the CTS-to-self.
871 * @frame_len: the frame length (in octets). 874 * @frame_len: the frame length (in octets).
872 * @frame_txctl: &struct ieee80211_tx_control of the frame. 875 * @frame_txctl: &struct ieee80211_tx_control of the frame.
@@ -877,7 +880,7 @@ __le16 ieee80211_rts_duration(struct ieee80211_hw *hw,
877 * the next CTS-to-self frame from the 802.11 code. The low-level is responsible 880 * the next CTS-to-self frame from the 802.11 code. The low-level is responsible
878 * for calling this function before and CTS-to-self frame is needed. 881 * for calling this function before and CTS-to-self frame is needed.
879 */ 882 */
880void ieee80211_ctstoself_get(struct ieee80211_hw *hw, 883void ieee80211_ctstoself_get(struct ieee80211_hw *hw, int if_id,
881 const void *frame, size_t frame_len, 884 const void *frame, size_t frame_len,
882 const struct ieee80211_tx_control *frame_txctl, 885 const struct ieee80211_tx_control *frame_txctl,
883 struct ieee80211_cts *cts); 886 struct ieee80211_cts *cts);
@@ -885,6 +888,7 @@ void ieee80211_ctstoself_get(struct ieee80211_hw *hw,
885/** 888/**
886 * ieee80211_ctstoself_duration - Get the duration field for a CTS-to-self frame 889 * ieee80211_ctstoself_duration - Get the duration field for a CTS-to-self frame
887 * @hw: pointer obtained from ieee80211_alloc_hw(). 890 * @hw: pointer obtained from ieee80211_alloc_hw().
891 * @if_id: interface ID from &struct ieee80211_if_init_conf.
888 * @frame_len: the length of the frame that is going to be protected by the CTS-to-self. 892 * @frame_len: the length of the frame that is going to be protected by the CTS-to-self.
889 * @frame_txctl: &struct ieee80211_tx_control of the frame. 893 * @frame_txctl: &struct ieee80211_tx_control of the frame.
890 * 894 *
@@ -892,20 +896,21 @@ void ieee80211_ctstoself_get(struct ieee80211_hw *hw,
892 * the duration field, the low-level driver uses this function to receive 896 * the duration field, the low-level driver uses this function to receive
893 * the duration field value in little-endian byteorder. 897 * the duration field value in little-endian byteorder.
894 */ 898 */
895__le16 ieee80211_ctstoself_duration(struct ieee80211_hw *hw, 899__le16 ieee80211_ctstoself_duration(struct ieee80211_hw *hw, int if_id,
896 size_t frame_len, 900 size_t frame_len,
897 const struct ieee80211_tx_control *frame_txctl); 901 const struct ieee80211_tx_control *frame_txctl);
898 902
899/** 903/**
900 * ieee80211_generic_frame_duration - Calculate the duration field for a frame 904 * ieee80211_generic_frame_duration - Calculate the duration field for a frame
901 * @hw: pointer obtained from ieee80211_alloc_hw(). 905 * @hw: pointer obtained from ieee80211_alloc_hw().
906 * @if_id: interface ID from &struct ieee80211_if_init_conf.
902 * @frame_len: the length of the frame. 907 * @frame_len: the length of the frame.
903 * @rate: the rate (in 100kbps) at which the frame is going to be transmitted. 908 * @rate: the rate (in 100kbps) at which the frame is going to be transmitted.
904 * 909 *
905 * Calculate the duration field of some generic frame, given its 910 * Calculate the duration field of some generic frame, given its
906 * length and transmission rate (in 100kbps). 911 * length and transmission rate (in 100kbps).
907 */ 912 */
908__le16 ieee80211_generic_frame_duration(struct ieee80211_hw *hw, 913__le16 ieee80211_generic_frame_duration(struct ieee80211_hw *hw, int if_id,
909 size_t frame_len, 914 size_t frame_len,
910 int rate); 915 int rate);
911 916