diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2009-12-23 07:15:45 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-12-28 16:55:07 -0500 |
commit | 1ed32e4fc8cfc9656cc1101e7f9617d485fcbe7b (patch) | |
tree | 81697637a36eb4776df39c81a77a9e09ec951a1a /include/net/mac80211.h | |
parent | 98b6218388e345064c3f2d3c161383a18274c638 (diff) |
mac80211: remove struct ieee80211_if_init_conf
All its members (vif, mac_addr, type) are now available
in the vif struct directly, so we can pass that instead
of the conf struct. I generated this patch (except the
mac80211 and header file changes) with this semantic
patch:
@@
identifier conf, fn, hw;
type tp;
@@
tp fn(struct ieee80211_hw *hw,
-struct ieee80211_if_init_conf *conf)
+struct ieee80211_vif *vif)
{
<...
(
-conf->type
+vif->type
|
-conf->mac_addr
+vif->addr
|
-conf->vif
+vif
)
...>
}
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'include/net/mac80211.h')
-rw-r--r-- | include/net/mac80211.h | 57 |
1 files changed, 15 insertions, 42 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 77ea34b03285..08d41357dcbe 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -702,33 +702,6 @@ static inline bool ieee80211_vif_is_mesh(struct ieee80211_vif *vif) | |||
702 | } | 702 | } |
703 | 703 | ||
704 | /** | 704 | /** |
705 | * struct ieee80211_if_init_conf - initial configuration of an interface | ||
706 | * | ||
707 | * @vif: pointer to a driver-use per-interface structure. The pointer | ||
708 | * itself is also used for various functions including | ||
709 | * ieee80211_beacon_get() and ieee80211_get_buffered_bc(). | ||
710 | * @type: one of &enum nl80211_iftype constants. Determines the type of | ||
711 | * added/removed interface. | ||
712 | * @mac_addr: pointer to MAC address of the interface. This pointer is valid | ||
713 | * until the interface is removed (i.e. it cannot be used after | ||
714 | * remove_interface() callback was called for this interface). | ||
715 | * | ||
716 | * This structure is used in add_interface() and remove_interface() | ||
717 | * callbacks of &struct ieee80211_hw. | ||
718 | * | ||
719 | * When you allow multiple interfaces to be added to your PHY, take care | ||
720 | * that the hardware can actually handle multiple MAC addresses. However, | ||
721 | * also take care that when there's no interface left with mac_addr != %NULL | ||
722 | * you remove the MAC address from the device to avoid acknowledging packets | ||
723 | * in pure monitor mode. | ||
724 | */ | ||
725 | struct ieee80211_if_init_conf { | ||
726 | enum nl80211_iftype type; | ||
727 | struct ieee80211_vif *vif; | ||
728 | void *mac_addr; | ||
729 | }; | ||
730 | |||
731 | /** | ||
732 | * enum ieee80211_key_alg - key algorithm | 705 | * enum ieee80211_key_alg - key algorithm |
733 | * @ALG_WEP: WEP40 or WEP104 | 706 | * @ALG_WEP: WEP40 or WEP104 |
734 | * @ALG_TKIP: TKIP | 707 | * @ALG_TKIP: TKIP |
@@ -1555,9 +1528,9 @@ struct ieee80211_ops { | |||
1555 | int (*start)(struct ieee80211_hw *hw); | 1528 | int (*start)(struct ieee80211_hw *hw); |
1556 | void (*stop)(struct ieee80211_hw *hw); | 1529 | void (*stop)(struct ieee80211_hw *hw); |
1557 | int (*add_interface)(struct ieee80211_hw *hw, | 1530 | int (*add_interface)(struct ieee80211_hw *hw, |
1558 | struct ieee80211_if_init_conf *conf); | 1531 | struct ieee80211_vif *vif); |
1559 | void (*remove_interface)(struct ieee80211_hw *hw, | 1532 | void (*remove_interface)(struct ieee80211_hw *hw, |
1560 | struct ieee80211_if_init_conf *conf); | 1533 | struct ieee80211_vif *vif); |
1561 | int (*config)(struct ieee80211_hw *hw, u32 changed); | 1534 | int (*config)(struct ieee80211_hw *hw, u32 changed); |
1562 | void (*bss_info_changed)(struct ieee80211_hw *hw, | 1535 | void (*bss_info_changed)(struct ieee80211_hw *hw, |
1563 | struct ieee80211_vif *vif, | 1536 | struct ieee80211_vif *vif, |
@@ -1845,7 +1818,7 @@ void ieee80211_tx_status_irqsafe(struct ieee80211_hw *hw, | |||
1845 | /** | 1818 | /** |
1846 | * ieee80211_beacon_get_tim - beacon generation function | 1819 | * ieee80211_beacon_get_tim - beacon generation function |
1847 | * @hw: pointer obtained from ieee80211_alloc_hw(). | 1820 | * @hw: pointer obtained from ieee80211_alloc_hw(). |
1848 | * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf. | 1821 | * @vif: &struct ieee80211_vif pointer from the add_interface callback. |
1849 | * @tim_offset: pointer to variable that will receive the TIM IE offset. | 1822 | * @tim_offset: pointer to variable that will receive the TIM IE offset. |
1850 | * Set to 0 if invalid (in non-AP modes). | 1823 | * Set to 0 if invalid (in non-AP modes). |
1851 | * @tim_length: pointer to variable that will receive the TIM IE length, | 1824 | * @tim_length: pointer to variable that will receive the TIM IE length, |
@@ -1873,7 +1846,7 @@ struct sk_buff *ieee80211_beacon_get_tim(struct ieee80211_hw *hw, | |||
1873 | /** | 1846 | /** |
1874 | * ieee80211_beacon_get - beacon generation function | 1847 | * ieee80211_beacon_get - beacon generation function |
1875 | * @hw: pointer obtained from ieee80211_alloc_hw(). | 1848 | * @hw: pointer obtained from ieee80211_alloc_hw(). |
1876 | * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf. | 1849 | * @vif: &struct ieee80211_vif pointer from the add_interface callback. |
1877 | * | 1850 | * |
1878 | * See ieee80211_beacon_get_tim(). | 1851 | * See ieee80211_beacon_get_tim(). |
1879 | */ | 1852 | */ |
@@ -1886,7 +1859,7 @@ static inline struct sk_buff *ieee80211_beacon_get(struct ieee80211_hw *hw, | |||
1886 | /** | 1859 | /** |
1887 | * ieee80211_rts_get - RTS frame generation function | 1860 | * ieee80211_rts_get - RTS frame generation function |
1888 | * @hw: pointer obtained from ieee80211_alloc_hw(). | 1861 | * @hw: pointer obtained from ieee80211_alloc_hw(). |
1889 | * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf. | 1862 | * @vif: &struct ieee80211_vif pointer from the add_interface callback. |
1890 | * @frame: pointer to the frame that is going to be protected by the RTS. | 1863 | * @frame: pointer to the frame that is going to be protected by the RTS. |
1891 | * @frame_len: the frame length (in octets). | 1864 | * @frame_len: the frame length (in octets). |
1892 | * @frame_txctl: &struct ieee80211_tx_info of the frame. | 1865 | * @frame_txctl: &struct ieee80211_tx_info of the frame. |
@@ -1905,7 +1878,7 @@ void ieee80211_rts_get(struct ieee80211_hw *hw, struct ieee80211_vif *vif, | |||
1905 | /** | 1878 | /** |
1906 | * ieee80211_rts_duration - Get the duration field for an RTS frame | 1879 | * ieee80211_rts_duration - Get the duration field for an RTS frame |
1907 | * @hw: pointer obtained from ieee80211_alloc_hw(). | 1880 | * @hw: pointer obtained from ieee80211_alloc_hw(). |
1908 | * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf. | 1881 | * @vif: &struct ieee80211_vif pointer from the add_interface callback. |
1909 | * @frame_len: the length of the frame that is going to be protected by the RTS. | 1882 | * @frame_len: the length of the frame that is going to be protected by the RTS. |
1910 | * @frame_txctl: &struct ieee80211_tx_info of the frame. | 1883 | * @frame_txctl: &struct ieee80211_tx_info of the frame. |
1911 | * | 1884 | * |
@@ -1920,7 +1893,7 @@ __le16 ieee80211_rts_duration(struct ieee80211_hw *hw, | |||
1920 | /** | 1893 | /** |
1921 | * ieee80211_ctstoself_get - CTS-to-self frame generation function | 1894 | * ieee80211_ctstoself_get - CTS-to-self frame generation function |
1922 | * @hw: pointer obtained from ieee80211_alloc_hw(). | 1895 | * @hw: pointer obtained from ieee80211_alloc_hw(). |
1923 | * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf. | 1896 | * @vif: &struct ieee80211_vif pointer from the add_interface callback. |
1924 | * @frame: pointer to the frame that is going to be protected by the CTS-to-self. | 1897 | * @frame: pointer to the frame that is going to be protected by the CTS-to-self. |
1925 | * @frame_len: the frame length (in octets). | 1898 | * @frame_len: the frame length (in octets). |
1926 | * @frame_txctl: &struct ieee80211_tx_info of the frame. | 1899 | * @frame_txctl: &struct ieee80211_tx_info of the frame. |
@@ -1940,7 +1913,7 @@ void ieee80211_ctstoself_get(struct ieee80211_hw *hw, | |||
1940 | /** | 1913 | /** |
1941 | * ieee80211_ctstoself_duration - Get the duration field for a CTS-to-self frame | 1914 | * ieee80211_ctstoself_duration - Get the duration field for a CTS-to-self frame |
1942 | * @hw: pointer obtained from ieee80211_alloc_hw(). | 1915 | * @hw: pointer obtained from ieee80211_alloc_hw(). |
1943 | * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf. | 1916 | * @vif: &struct ieee80211_vif pointer from the add_interface callback. |
1944 | * @frame_len: the length of the frame that is going to be protected by the CTS-to-self. | 1917 | * @frame_len: the length of the frame that is going to be protected by the CTS-to-self. |
1945 | * @frame_txctl: &struct ieee80211_tx_info of the frame. | 1918 | * @frame_txctl: &struct ieee80211_tx_info of the frame. |
1946 | * | 1919 | * |
@@ -1956,7 +1929,7 @@ __le16 ieee80211_ctstoself_duration(struct ieee80211_hw *hw, | |||
1956 | /** | 1929 | /** |
1957 | * ieee80211_generic_frame_duration - Calculate the duration field for a frame | 1930 | * ieee80211_generic_frame_duration - Calculate the duration field for a frame |
1958 | * @hw: pointer obtained from ieee80211_alloc_hw(). | 1931 | * @hw: pointer obtained from ieee80211_alloc_hw(). |
1959 | * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf. | 1932 | * @vif: &struct ieee80211_vif pointer from the add_interface callback. |
1960 | * @frame_len: the length of the frame. | 1933 | * @frame_len: the length of the frame. |
1961 | * @rate: the rate at which the frame is going to be transmitted. | 1934 | * @rate: the rate at which the frame is going to be transmitted. |
1962 | * | 1935 | * |
@@ -1971,7 +1944,7 @@ __le16 ieee80211_generic_frame_duration(struct ieee80211_hw *hw, | |||
1971 | /** | 1944 | /** |
1972 | * ieee80211_get_buffered_bc - accessing buffered broadcast and multicast frames | 1945 | * ieee80211_get_buffered_bc - accessing buffered broadcast and multicast frames |
1973 | * @hw: pointer as obtained from ieee80211_alloc_hw(). | 1946 | * @hw: pointer as obtained from ieee80211_alloc_hw(). |
1974 | * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf. | 1947 | * @vif: &struct ieee80211_vif pointer from the add_interface callback. |
1975 | * | 1948 | * |
1976 | * Function for accessing buffered broadcast and multicast frames. If | 1949 | * Function for accessing buffered broadcast and multicast frames. If |
1977 | * hardware/firmware does not implement buffering of broadcast/multicast | 1950 | * hardware/firmware does not implement buffering of broadcast/multicast |
@@ -2139,7 +2112,7 @@ int ieee80211_start_tx_ba_session(struct ieee80211_sta *sta, u16 tid); | |||
2139 | 2112 | ||
2140 | /** | 2113 | /** |
2141 | * ieee80211_start_tx_ba_cb - low level driver ready to aggregate. | 2114 | * ieee80211_start_tx_ba_cb - low level driver ready to aggregate. |
2142 | * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf | 2115 | * @vif: &struct ieee80211_vif pointer from the add_interface callback |
2143 | * @ra: receiver address of the BA session recipient. | 2116 | * @ra: receiver address of the BA session recipient. |
2144 | * @tid: the TID to BA on. | 2117 | * @tid: the TID to BA on. |
2145 | * | 2118 | * |
@@ -2150,7 +2123,7 @@ void ieee80211_start_tx_ba_cb(struct ieee80211_vif *vif, u8 *ra, u16 tid); | |||
2150 | 2123 | ||
2151 | /** | 2124 | /** |
2152 | * ieee80211_start_tx_ba_cb_irqsafe - low level driver ready to aggregate. | 2125 | * ieee80211_start_tx_ba_cb_irqsafe - low level driver ready to aggregate. |
2153 | * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf | 2126 | * @vif: &struct ieee80211_vif pointer from the add_interface callback |
2154 | * @ra: receiver address of the BA session recipient. | 2127 | * @ra: receiver address of the BA session recipient. |
2155 | * @tid: the TID to BA on. | 2128 | * @tid: the TID to BA on. |
2156 | * | 2129 | * |
@@ -2178,7 +2151,7 @@ int ieee80211_stop_tx_ba_session(struct ieee80211_sta *sta, u16 tid, | |||
2178 | 2151 | ||
2179 | /** | 2152 | /** |
2180 | * ieee80211_stop_tx_ba_cb - low level driver ready to stop aggregate. | 2153 | * ieee80211_stop_tx_ba_cb - low level driver ready to stop aggregate. |
2181 | * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf | 2154 | * @vif: &struct ieee80211_vif pointer from the add_interface callback |
2182 | * @ra: receiver address of the BA session recipient. | 2155 | * @ra: receiver address of the BA session recipient. |
2183 | * @tid: the desired TID to BA on. | 2156 | * @tid: the desired TID to BA on. |
2184 | * | 2157 | * |
@@ -2189,7 +2162,7 @@ void ieee80211_stop_tx_ba_cb(struct ieee80211_vif *vif, u8 *ra, u8 tid); | |||
2189 | 2162 | ||
2190 | /** | 2163 | /** |
2191 | * ieee80211_stop_tx_ba_cb_irqsafe - low level driver ready to stop aggregate. | 2164 | * ieee80211_stop_tx_ba_cb_irqsafe - low level driver ready to stop aggregate. |
2192 | * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf | 2165 | * @vif: &struct ieee80211_vif pointer from the add_interface callback |
2193 | * @ra: receiver address of the BA session recipient. | 2166 | * @ra: receiver address of the BA session recipient. |
2194 | * @tid: the desired TID to BA on. | 2167 | * @tid: the desired TID to BA on. |
2195 | * | 2168 | * |
@@ -2268,7 +2241,7 @@ void ieee80211_sta_block_awake(struct ieee80211_hw *hw, | |||
2268 | /** | 2241 | /** |
2269 | * ieee80211_beacon_loss - inform hardware does not receive beacons | 2242 | * ieee80211_beacon_loss - inform hardware does not receive beacons |
2270 | * | 2243 | * |
2271 | * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf. | 2244 | * @vif: &struct ieee80211_vif pointer from the add_interface callback. |
2272 | * | 2245 | * |
2273 | * When beacon filtering is enabled with IEEE80211_HW_BEACON_FILTERING and | 2246 | * When beacon filtering is enabled with IEEE80211_HW_BEACON_FILTERING and |
2274 | * IEEE80211_CONF_PS is set, the driver needs to inform whenever the | 2247 | * IEEE80211_CONF_PS is set, the driver needs to inform whenever the |