mac80211.h (2f6d7c1b34403b97fa57473edcb6749d1db5ace3) mac80211.h (42935ecaf4e784d0815afa9a7e5fe7e141157ca3)
1/*
2 * mac80211 <-> driver interface
3 *
4 * Copyright 2002-2005, Devicescape Software, Inc.
5 * Copyright 2006-2007 Jiri Benc <jbenc@suse.cz>
6 * Copyright 2007-2008 Johannes Berg <johannes@sipsolutions.net>
7 *
8 * This program is free software; you can redistribute it and/or modify

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

68 * the driver from mac80211 is the MSDU, not the MPDU.
69 *
70 * Finally, for received frames, the driver is able to indicate that it has
71 * filled a radiotap header and put that in front of the frame; if it does
72 * not do so then mac80211 may add this under certain circumstances.
73 */
74
75/**
1/*
2 * mac80211 <-> driver interface
3 *
4 * Copyright 2002-2005, Devicescape Software, Inc.
5 * Copyright 2006-2007 Jiri Benc <jbenc@suse.cz>
6 * Copyright 2007-2008 Johannes Berg <johannes@sipsolutions.net>
7 *
8 * This program is free software; you can redistribute it and/or modify

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

68 * the driver from mac80211 is the MSDU, not the MPDU.
69 *
70 * Finally, for received frames, the driver is able to indicate that it has
71 * filled a radiotap header and put that in front of the frame; if it does
72 * not do so then mac80211 may add this under certain circumstances.
73 */
74
75/**
76 * DOC: mac80211 workqueue
77 *
78 * mac80211 provides its own workqueue for drivers and internal mac80211 use.
79 * The workqueue is a single threaded workqueue and can only be accessed by
80 * helpers for sanity checking. Drivers must ensure all work added onto the
81 * mac80211 workqueue should be cancelled on the driver stop() callback.
82 *
83 * mac80211 will flushed the workqueue upon interface removal and during
84 * suspend.
85 *
86 * All work performed on the mac80211 workqueue must not acquire the RTNL lock.
87 *
88 */
89
90/**
76 * enum ieee80211_max_queues - maximum number of queues
77 *
78 * @IEEE80211_MAX_QUEUES: Maximum number of regular device queues.
79 */
80enum ieee80211_max_queues {
81 IEEE80211_MAX_QUEUES = 4,
82};
83

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

908 * @wiphy: This points to the &struct wiphy allocated for this
909 * 802.11 PHY. You must fill in the @perm_addr and @dev
910 * members of this structure using SET_IEEE80211_DEV()
911 * and SET_IEEE80211_PERM_ADDR(). Additionally, all supported
912 * bands (with channels, bitrates) are registered here.
913 *
914 * @conf: &struct ieee80211_conf, device configuration, don't use.
915 *
91 * enum ieee80211_max_queues - maximum number of queues
92 *
93 * @IEEE80211_MAX_QUEUES: Maximum number of regular device queues.
94 */
95enum ieee80211_max_queues {
96 IEEE80211_MAX_QUEUES = 4,
97};
98

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

923 * @wiphy: This points to the &struct wiphy allocated for this
924 * 802.11 PHY. You must fill in the @perm_addr and @dev
925 * members of this structure using SET_IEEE80211_DEV()
926 * and SET_IEEE80211_PERM_ADDR(). Additionally, all supported
927 * bands (with channels, bitrates) are registered here.
928 *
929 * @conf: &struct ieee80211_conf, device configuration, don't use.
930 *
916 * @workqueue: single threaded workqueue available for driver use,
917 * allocated by mac80211 on registration and flushed when an
918 * interface is removed.
919 * NOTICE: All work performed on this workqueue must not
920 * acquire the RTNL lock.
921 *
922 * @priv: pointer to private area that was allocated for driver use
923 * along with this structure.
924 *
925 * @flags: hardware flags, see &enum ieee80211_hw_flags.
926 *
927 * @extra_tx_headroom: headroom to reserve in each transmit skb
928 * for use by the driver (e.g. for transmit headers.)
929 *

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

949 * within &struct ieee80211_sta.
950 *
951 * @max_rates: maximum number of alternate rate retry stages
952 * @max_rate_tries: maximum number of tries for each stage
953 */
954struct ieee80211_hw {
955 struct ieee80211_conf conf;
956 struct wiphy *wiphy;
931 * @priv: pointer to private area that was allocated for driver use
932 * along with this structure.
933 *
934 * @flags: hardware flags, see &enum ieee80211_hw_flags.
935 *
936 * @extra_tx_headroom: headroom to reserve in each transmit skb
937 * for use by the driver (e.g. for transmit headers.)
938 *

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

958 * within &struct ieee80211_sta.
959 *
960 * @max_rates: maximum number of alternate rate retry stages
961 * @max_rate_tries: maximum number of tries for each stage
962 */
963struct ieee80211_hw {
964 struct ieee80211_conf conf;
965 struct wiphy *wiphy;
957 struct workqueue_struct *workqueue;
958 const char *rate_control_algorithm;
959 void *priv;
960 u32 flags;
961 unsigned int extra_tx_headroom;
962 int channel_change_time;
963 int vif_data_size;
964 int sta_data_size;
965 u16 queues;

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

1296 * to avoid acknowledging frames before a non-monitor device
1297 * is added.
1298 * Must be implemented.
1299 *
1300 * @stop: Called after last netdevice attached to the hardware
1301 * is disabled. This should turn off the hardware (at least
1302 * it must turn off frame reception.)
1303 * May be called right after add_interface if that rejects
966 const char *rate_control_algorithm;
967 void *priv;
968 u32 flags;
969 unsigned int extra_tx_headroom;
970 int channel_change_time;
971 int vif_data_size;
972 int sta_data_size;
973 u16 queues;

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

1304 * to avoid acknowledging frames before a non-monitor device
1305 * is added.
1306 * Must be implemented.
1307 *
1308 * @stop: Called after last netdevice attached to the hardware
1309 * is disabled. This should turn off the hardware (at least
1310 * it must turn off frame reception.)
1311 * May be called right after add_interface if that rejects
1304 * an interface.
1312 * an interface. If you added any work onto the mac80211 workqueue
1313 * you should ensure to cancel it on this callback.
1305 * Must be implemented.
1306 *
1307 * @add_interface: Called when a netdevice attached to the hardware is
1308 * enabled. Because it is not called for monitor mode devices, @start
1309 * and @stop must be implemented.
1310 * The driver should perform any initialization it needs before
1311 * the device can be enabled. The initial configuration for the
1312 * interface is given in the conf parameter.

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

1923 */
1924void ieee80211_iterate_active_interfaces_atomic(struct ieee80211_hw *hw,
1925 void (*iterator)(void *data,
1926 u8 *mac,
1927 struct ieee80211_vif *vif),
1928 void *data);
1929
1930/**
1314 * Must be implemented.
1315 *
1316 * @add_interface: Called when a netdevice attached to the hardware is
1317 * enabled. Because it is not called for monitor mode devices, @start
1318 * and @stop must be implemented.
1319 * The driver should perform any initialization it needs before
1320 * the device can be enabled. The initial configuration for the
1321 * interface is given in the conf parameter.

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

1932 */
1933void ieee80211_iterate_active_interfaces_atomic(struct ieee80211_hw *hw,
1934 void (*iterator)(void *data,
1935 u8 *mac,
1936 struct ieee80211_vif *vif),
1937 void *data);
1938
1939/**
1940 * ieee80211_queue_work - add work onto the mac80211 workqueue
1941 *
1942 * Drivers and mac80211 use this to add work onto the mac80211 workqueue.
1943 * This helper ensures drivers are not queueing work when they should not be.
1944 *
1945 * @hw: the hardware struct for the interface we are adding work for
1946 * @work: the work we want to add onto the mac80211 workqueue
1947 */
1948void ieee80211_queue_work(struct ieee80211_hw *hw, struct work_struct *work);
1949
1950/**
1951 * ieee80211_queue_delayed_work - add work onto the mac80211 workqueue
1952 *
1953 * Drivers and mac80211 use this to queue delayed work onto the mac80211
1954 * workqueue.
1955 *
1956 * @hw: the hardware struct for the interface we are adding work for
1957 * @dwork: delayable work to queue onto the mac80211 workqueue
1958 * @delay: number of jiffies to wait before queueing
1959 */
1960void ieee80211_queue_delayed_work(struct ieee80211_hw *hw,
1961 struct delayed_work *dwork,
1962 unsigned long delay);
1963
1964/**
1931 * ieee80211_start_tx_ba_session - Start a tx Block Ack session.
1932 * @hw: pointer as obtained from ieee80211_alloc_hw().
1933 * @ra: receiver address of the BA session recipient
1934 * @tid: the TID to BA on.
1935 *
1936 * Return: success if addBA request was sent, failure otherwise
1937 *
1938 * Although mac80211/low level driver/user space application can estimate

--- 250 unchanged lines hidden ---
1965 * ieee80211_start_tx_ba_session - Start a tx Block Ack session.
1966 * @hw: pointer as obtained from ieee80211_alloc_hw().
1967 * @ra: receiver address of the BA session recipient
1968 * @tid: the TID to BA on.
1969 *
1970 * Return: success if addBA request was sent, failure otherwise
1971 *
1972 * Although mac80211/low level driver/user space application can estimate

--- 250 unchanged lines hidden ---