summaryrefslogtreecommitdiff
path: root/target/linux
diff options
context:
space:
mode:
authornoz <noz@3c298f89-4303-0410-b956-a3cf2f4a3e73>2007-06-21 21:51:07 +0000
committernoz <noz@3c298f89-4303-0410-b956-a3cf2f4a3e73>2007-06-21 21:51:07 +0000
commit847af1b04307637e7c4e994c572eb73814fb5971 (patch)
tree291e59ff4a2baf8c923d6152c5813d857b4b531c /target/linux
parentf8f8b2a8495428b7b6a560f00d9a0d4d4d9f1dad (diff)
Extra bits from wireless-dev for the mac80211 stack - should just be additions
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@7695 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux')
-rw-r--r--target/linux/generic-2.6/patches-2.6.22/210-mac80211_include_wireless_dev.patch801
1 files changed, 801 insertions, 0 deletions
diff --git a/target/linux/generic-2.6/patches-2.6.22/210-mac80211_include_wireless_dev.patch b/target/linux/generic-2.6/patches-2.6.22/210-mac80211_include_wireless_dev.patch
new file mode 100644
index 0000000000..c7f3fd54d0
--- /dev/null
+++ b/target/linux/generic-2.6/patches-2.6.22/210-mac80211_include_wireless_dev.patch
@@ -0,0 +1,801 @@
+Index: linux-2.6.22-rc4/include/linux/ieee80211.h
+===================================================================
+--- linux-2.6.22-rc4.orig/include/linux/ieee80211.h 2007-06-10 21:32:10.000000000 +0100
++++ linux-2.6.22-rc4/include/linux/ieee80211.h 2007-06-10 21:33:26.000000000 +0100
+@@ -106,6 +106,69 @@
+ } __attribute__ ((packed));
+
+
++struct ieee80211_ht_capability {
++ __le16 capabilities_info;
++ u8 mac_ht_params_info;
++ u8 supported_mcs_set[16];
++ __le16 extended_ht_capability_info;
++ __le32 tx_BF_capability_info;
++ u8 antenna_selection_info;
++}__attribute__ ((packed));
++
++struct ieee80211_ht_additional_info {
++ u8 control_chan;
++ u8 ht_param;
++ __le16 operation_mode;
++ __le16 stbc_param;
++ u8 basic_set[16];
++}__attribute__ ((packed));
++
++
++#define IEEE80211_TSINFO_TYPE(a) ((a.short1 & 0x0001) >> 0)
++#define IEEE80211_TSINFO_TSID(a) ((a.short1 & 0x001E) >> 1)
++#define IEEE80211_TSINFO_DIR(a) ((a.short1 & 0x0060) >> 5)
++#define IEEE80211_TSINFO_POLICY(a) ((a.short1 & 0x0180) >> 7)
++#define IEEE80211_TSINFO_AGG(a) ((a.short1 & 0x0200) >> 9)
++#define IEEE80211_TSINFO_APSD(a) ((a.short1 & 0x0400) >> 10)
++#define IEEE80211_TSINFO_UP(a) ((a.short1 & 0x3800) >> 11)
++#define IEEE80211_TSINFO_ACK(a) ((a.short1 & 0xC000) >> 14)
++#define IEEE80211_TSINFO_SCHEDULE(a) ((a.byte3 & 0x01) >> 0)
++
++#define SET_TSINFO_TYPE(i, d) (i.short1 |= (d << 0) & 0x0001)
++#define SET_TSINFO_TSID(i, d) (i.short1 |= (d << 1) & 0x001E)
++#define SET_TSINFO_DIR(i, d) (i.short1 |= (d << 5) & 0x0060)
++#define SET_TSINFO_POLICY(i, d) (i.short1 |= (d << 7) & 0x0180)
++#define SET_TSINFO_AGG(i, d) (i.short1 |= (d << 9) & 0x0200)
++#define SET_TSINFO_APSD(i, d) (i.short1 |= (d << 10) & 0x0400)
++#define SET_TSINFO_UP(i, d) (i.short1 |= (d << 11) & 0x3800)
++#define SET_TSINFO_ACK(i, d) (i.short1 |= (d << 14) & 0xC000)
++#define SET_TSINFO_SCHEDULE(i, d) (i.byte3 |= (d << 0) & 0x01)
++
++struct ieee80211_ts_info {
++ __le16 short1;
++ u8 byte3;
++} __attribute__ ((packed));
++
++struct ieee80211_elem_tspec {
++ struct ieee80211_ts_info ts_info;
++ __le16 nominal_msdu_size;
++ __le16 max_msdu_size;
++ __le32 min_service_interval;
++ __le32 max_service_interval;
++ __le32 inactivity_interval;
++ __le32 suspension_interval;
++ __le32 service_start_time;
++ __le32 min_data_rate;
++ __le32 mean_data_rate;
++ __le32 peak_data_rate;
++ __le32 burst_size;
++ __le32 delay_bound;
++ __le32 min_phy_rate;
++ __le16 surplus_band_allow;
++ __le16 medium_time;
++} __attribute__ ((packed));
++
++
+ struct ieee80211_mgmt {
+ __le16 frame_control;
+ __le16 duration;
+@@ -173,9 +236,51 @@
+ struct {
+ u8 action_code;
+ u8 dialog_token;
++ u8 variable[0];
++ } __attribute__ ((packed)) addts_req;
++ struct {
++ u8 action_code;
++ u8 dialog_token;
++ __le16 status_code;
++ u8 variable[0];
++ } __attribute__ ((packed)) addts_resp;
++ struct {
++ u8 action_code;
++ struct ieee80211_ts_info ts_info;
++ __le16 reason_code;
++ } __attribute__ ((packed)) delts;
++ struct {
++ u8 action_code;
++ u8 dialog_token;
+ u8 status_code;
+ u8 variable[0];
+ } __attribute__ ((packed)) wme_action;
++ struct {
++ u8 action_code;
++ u8 dest[6];
++ u8 src[6];
++ __le16 capab_info;
++ __le16 timeout;
++ /* Followed by Supported Rates and
++ * Extended Supported Rates */
++ u8 variable[0];
++ } __attribute__ ((packed)) dls_req;
++ struct {
++ u8 action_code;
++ __le16 status_code;
++ u8 dest[6];
++ u8 src[6];
++ /* Followed by Capability Information,
++ * Supported Rates and Extended
++ * Supported Rates */
++ u8 variable[0];
++ } __attribute__ ((packed)) dls_resp;
++ struct {
++ u8 action_code;
++ u8 dest[6];
++ u8 src[6];
++ __le16 reason_code;
++ } __attribute__ ((packed)) dls_teardown;
+ struct{
+ u8 action_code;
+ u8 element_id;
+@@ -184,6 +289,25 @@
+ u8 new_chan;
+ u8 switch_count;
+ } __attribute__((packed)) chan_switch;
++ struct{
++ u8 action_code;
++ u8 dialog_token;
++ __le16 capab;
++ __le16 timeout;
++ __le16 start_seq_num;
++ } __attribute__((packed)) addba_req;
++ struct{
++ u8 action_code;
++ u8 dialog_token;
++ __le16 status;
++ __le16 capab;
++ __le16 timeout;
++ } __attribute__((packed)) addba_resp;
++ struct{
++ u8 action_code;
++ __le16 params;
++ __le16 reason_code;
++ }__attribute__((packed)) delba;
+ } u;
+ } __attribute__ ((packed)) action;
+ } u;
+@@ -259,6 +383,18 @@
+ WLAN_STATUS_UNSUPP_RSN_VERSION = 44,
+ WLAN_STATUS_INVALID_RSN_IE_CAP = 45,
+ WLAN_STATUS_CIPHER_SUITE_REJECTED = 46,
++ /* 802.11e */
++ WLAN_STATUS_UNSPECIFIED_QOS = 32,
++ WLAN_STATUS_ASSOC_DENIED_NOBANDWIDTH = 33,
++ WLAN_STATUS_ASSOC_DENIED_LOWACK = 34,
++ WLAN_STATUS_ASSOC_DENIED_UNSUPP_QOS = 35,
++ WLAN_STATUS_REQUEST_DECLINED = 37,
++ WLAN_STATUS_INVALID_QOS_PARAM = 38,
++ WLAN_STATUS_CHANGE_TSPEC = 39,
++ WLAN_STATUS_WAIT_TS_DELAY = 47,
++ WLAN_STATUS_NO_DIRECT_LINK = 48,
++ WLAN_STATUS_STA_NOT_PRESENT = 49,
++ WLAN_STATUS_STA_NOT_QSTA = 50,
+ };
+
+
+@@ -289,9 +425,50 @@
+ WLAN_REASON_INVALID_RSN_IE_CAP = 22,
+ WLAN_REASON_IEEE8021X_FAILED = 23,
+ WLAN_REASON_CIPHER_SUITE_REJECTED = 24,
++ /* 802.11e */
++ WLAN_REASON_DISASSOC_UNSPECIFIED_QOS = 32,
++ WLAN_REASON_DISASSOC_QAP_NO_BANDWIDTH = 33,
++ WLAN_REASON_DISASSOC_LOW_ACK = 34,
++ WLAN_REASON_DISASSOC_QAP_EXCEED_TXOP = 35,
++ WLAN_REASON_QSTA_LEAVE_QBSS = 36,
++ WLAN_REASON_QSTA_NOT_USE = 37,
++ WLAN_REASON_QSTA_REQUIRE_SETUP = 38,
++ WLAN_REASON_QSTA_TIMEOUT = 39,
++ WLAN_REASON_QSTA_CIPHER_NOT_SUPP = 45,
+ };
+
+
++/* Category Code */
++enum ieee80211_category {
++ WLAN_CATEGORY_SPECTRUM_MGMT = 0,
++ WLAN_CATEGORY_QOS = 1,
++ WLAN_CATEGORY_DLS = 2,
++ WLAN_CATEGORY_BACK = 3,
++ WLAN_CATEGORY_WMM = 17,
++};
++
++/* QoS Action Code */
++enum ieee80211_qos_actioncode {
++ WLAN_ACTION_QOS_ADDTS_REQ = 0,
++ WLAN_ACTION_QOS_ADDTS_RESP = 1,
++ WLAN_ACTION_QOS_DELTS = 2,
++ WLAN_ACTION_QOS_SCHEDULE = 3,
++};
++
++/* DLS Action Code */
++enum ieee80211_dls_actioncode {
++ WLAN_ACTION_DLS_REQ = 0,
++ WLAN_ACTION_DLS_RESP = 1,
++ WLAN_ACTION_DLS_TEARDOWN = 2,
++};
++
++/* BACK Action Code */
++enum ieee80211_back_actioncode {
++ WLAN_ACTION_ADDBA_REQ = 0,
++ WLAN_ACTION_ADDBA_RESP = 1,
++ WLAN_ACTION_DELBA = 2,
++};
++
+ /* Information Element IDs */
+ enum ieee80211_eid {
+ WLAN_EID_SSID = 0,
+@@ -307,6 +484,15 @@
+ WLAN_EID_HP_PARAMS = 8,
+ WLAN_EID_HP_TABLE = 9,
+ WLAN_EID_REQUEST = 10,
++ /* 802.11e */
++ WLAN_EID_QBSS_LOAD = 11,
++ WLAN_EID_EDCA_PARAM_SET = 12,
++ WLAN_EID_TSPEC = 13,
++ WLAN_EID_TCLAS = 14,
++ WLAN_EID_SCHEDULE = 15,
++ WLAN_EID_TS_DELAY = 43,
++ WLAN_EID_TCLAS_PROCESSING = 44,
++ WLAN_EID_QOS_CAPA = 46,
+ /* 802.11h */
+ WLAN_EID_PWR_CONSTRAINT = 32,
+ WLAN_EID_PWR_CAPABILITY = 33,
+@@ -321,6 +507,9 @@
+ /* 802.11g */
+ WLAN_EID_ERP_INFO = 42,
+ WLAN_EID_EXT_SUPP_RATES = 50,
++ /* 802.11n */
++ WLAN_EID_HT_CAPABILITY = 45,
++ WLAN_EID_HT_EXTRA_INFO = 61,
+ /* 802.11i */
+ WLAN_EID_RSN = 48,
+ WLAN_EID_WPA = 221,
+@@ -329,6 +518,9 @@
+ WLAN_EID_QOS_PARAMETER = 222
+ };
+
++/* 80211n */
++#define IEEE80211_QOS_CONTROL_A_MSDU_PRESENT 0x0080
++
+ /* cipher suite selectors */
+ #define WLAN_CIPHER_SUITE_USE_GROUP 0x000FAC00
+ #define WLAN_CIPHER_SUITE_WEP40 0x000FAC01
+@@ -339,4 +531,37 @@
+
+ #define WLAN_MAX_KEY_LEN 32
+
++enum ieee80211_tsinfo_direction {
++ WLAN_TSINFO_UPLINK = 0,
++ WLAN_TSINFO_DOWNLINK = 1,
++ WLAN_TSINFO_DIRECTLINK = 2,
++ WLAN_TSINFO_BIDIRECTIONAL = 3,
++};
++
++enum ieee80211_tsinfo_access {
++ WLAN_TSINFO_EDCA = 1,
++ WLAN_TSINFO_HCCA = 2,
++ WLAN_TSINFO_HEMM = 3,
++};
++
++enum ieee80211_tsinfo_psb {
++ WLAN_TSINFO_PSB_LEGACY = 0,
++ WLAN_TSINFO_PSB_APSD = 1,
++};
++
++
++/* WI-FI Alliance OUI Type and Subtype */
++enum wifi_oui_type {
++ WIFI_OUI_TYPE_WPA = 1,
++ WIFI_OUI_TYPE_WMM = 2,
++ WIFI_OUI_TYPE_WSC = 4,
++ WIFI_OUI_TYPE_PSD = 6,
++};
++
++enum wifi_oui_stype_wmm {
++ WIFI_OUI_STYPE_WMM_INFO = 0,
++ WIFI_OUI_STYPE_WMM_PARAM = 1,
++ WIFI_OUI_STYPE_WMM_TSPEC = 2,
++};
++
+ #endif /* IEEE80211_H */
+Index: linux-2.6.22-rc4/include/linux/nl80211.h
+===================================================================
+--- linux-2.6.22-rc4.orig/include/linux/nl80211.h 2007-06-10 21:32:10.000000000 +0100
++++ linux-2.6.22-rc4/include/linux/nl80211.h 2007-06-10 21:33:26.000000000 +0100
+@@ -7,6 +7,217 @@
+ */
+
+ /**
++ * enum nl80211_commands - supported nl80211 commands
++ * @NL80211_CMD_UNSPEC: unspecified command to catch errors
++ * @NL80211_CMD_RENAME_WIPHY: rename a wiphy, needs
++ * %NL80211_ATTR_WIPHY and %NL80211_ATTR_WIPHY_NAME
++ * @NL80211_CMD_WIPHY_NEWNAME: rename notification
++ * @NL80211_CMD_GET_CMDLIST: TO BE DEFINED PROPERLY. currently the code makes
++ * it depend on the wiphy only but it really should depend on the
++ * interface type too....
++ * @NL80211_CMD_NEW_CMDLIST: command list result
++ * @NL80211_CMD_ADD_VIRTUAL_INTERFACE: create a virtual interface for the
++ * wiphy identified by an %NL80211_ATTR_WIPHY attribute with the given
++ * %NL80211_ATTR_IFTYPE and %NL80211_ATTR_IFNAME.
++ * @NL80211_CMD_DEL_VIRTUAL_INTERFACE: destroy a virtual interface identified
++ * by %NL80211_ATTR_IFINDEX.
++ * @NL80211_CMD_CHANGE_VIRTUAL_INTERFACE: change type of virtual interface to
++ * the type given by %NL80211_ATTR_IFTYPE, the interface is identified by
++ * %NL80211_ATTR_IFINDEX.
++ * @NL80211_CMD_GET_WIPHYS: request a list of all wiphys present in the system
++ * @NL80211_CMD_NEW_WIPHYS: returned list of all wiphys
++ * @NL80211_CMD_GET_INTERFACES: request a list of all interfaces belonging to
++ * the wiphy identified by %NL80211_ATTR_WIPHY
++ * @NL80211_CMD_NEW_INTERFACES: result for %NL80211_CMD_GET_INTERFACES
++ * @NL80211_CMD_INITIATE_SCAN: initiate a scan with the passed parameters. THe
++ * parameters may contain %NL80211_ATTR_FLAG_SCAN_ACTIVE,
++ * %NL80211_ATTR_PHYMODE and a list of channels in an
++ * %NL80211_ATTR_CHANNEL_LIST attribute (an array of nested attributes)
++ * containing %NL80211_ATTR_CHANNEL, %NL80211_ATTR_PHYMODE, and possibly
++ * %NL80211_ATTR_FLAG_SCAN_ACTIVE. The outer %NL80211_ATTR_FLAG_SCAN_ACTIVE
++ * is ignored when a channel list is present.
++ * @NL80211_CMD_SCAN_RESULT: scan result, contains an array in
++ * %NL80211_ATTR_BSS_LIST.
++ * @NL80211_CMD_ASSOCIATE: associate with the given parameters
++ * (%NL80211_ATTR_SSID is mandatory, %NL80211_ATTR_TIMEOUT_TU,
++ * %NL80211_ATTR_BSSID, %NL80211_ATTR_CHANNEL, %NL80211_ATTR_PHYMODE,
++ * and %NL80211_ATTR_IE may be given)
++ * @NL80211_CMD_ADD_KEY: add a key with given %NL80211_ATTR_KEY_DATA,
++ * %NL80211_ATTR_KEY_ID, %NL80211_ATTR_KEY_TYPE, %NL80211_ATTR_MAC and
++ * %NL80211_ATTR_KEY_CIPHER attributes.
++ * @NL80211_CMD_DEL_KEY: delete a key identified by %NL80211_ATTR_KEY_ID,
++ * %NL80211_ATTR_KEY_TYPE and %NL80211_ATTR_MAC or all keys.
++ * @__NL80211_CMD_AFTER_LAST: internal use
++ */
++enum nl80211_commands {
++/* don't change the order or add anything inbetween, this is ABI! */
++ NL80211_CMD_UNSPEC,
++ /* %input: wiphy, wiphy_name */
++ NL80211_CMD_RENAME_WIPHY,
++ NL80211_CMD_WIPHY_NEWNAME,
++ /* %input: wiphy|ifindex */
++ NL80211_CMD_GET_CMDLIST,
++ NL80211_CMD_NEW_CMDLIST,
++ /* %input: wiphy, ifname, {iftype} */
++ NL80211_CMD_ADD_VIRTUAL_INTERFACE,
++ /* %input: wiphy, ifindex */
++ NL80211_CMD_DEL_VIRTUAL_INTERFACE,
++ /* %input: ifindex, iftype */
++ NL80211_CMD_CHANGE_VIRTUAL_INTERFACE,
++ /* %input: */
++ NL80211_CMD_GET_WIPHYS,
++ NL80211_CMD_NEW_WIPHYS,
++ /* %input: wiphy */
++ NL80211_CMD_GET_INTERFACES,
++ NL80211_CMD_NEW_INTERFACES,
++ NL80211_CMD_INITIATE_SCAN,
++ NL80211_CMD_SCAN_RESULT,
++ NL80211_CMD_GET_ASSOCIATION,
++ NL80211_CMD_ASSOCIATION_CHANGED,
++ NL80211_CMD_ASSOCIATE,
++ NL80211_CMD_DISASSOCIATE,
++ NL80211_CMD_DEAUTH,
++ NL80211_CMD_GET_AUTH_LIST,
++ NL80211_CMD_NEW_AUTH_LIST,
++ NL80211_CMD_AUTHENTICATION_CHANGED,
++ NL80211_CMD_AP_SET_BEACON,
++ NL80211_CMD_AP_ADD_STA,
++ NL80211_CMD_AP_UPDATE_STA,
++ NL80211_CMD_AP_GET_STA_INFO,
++ NL80211_CMD_AP_SET_RATESETS,
++ NL80211_CMD_ADD_KEY,
++ NL80211_CMD_DEL_KEY,
++
++ /* add commands here */
++
++ /* used to define NL80211_CMD_MAX below */
++ __NL80211_CMD_AFTER_LAST
++};
++#define NL80211_CMD_MAX (__NL80211_CMD_AFTER_LAST - 1)
++
++
++/**
++ * enum nl80211_attrs - nl80211 netlink attributes
++ * @NL80211_ATTR_UNSPEC: unspecified attribute to catch errors
++ * @NL80211_ATTR_IFINDEX: network interface index of the device to operate on
++ * @NL80211_ATTR_IFNAME: network interface name
++ * @NL80211_ATTR_WIPHY: index of wiphy to operate on, cf.
++ * /sys/class/ieee80211/<phyname>/index
++ * @NL80211_ATTR_WIPHY_NAME: wiphy name (used for renaming)
++ * @NL80211_ATTR_CMDS: list of u8's identifying commands a device supports
++ * @NL80211_ATTR_IFTYPE: type of virtual interface, see &enum nl80211_iftype
++ * @NL80211_ATTR_INTERFACE_LIST: interface array, nested netlink attribute
++ * @NL80211_ATTR_WIPHY_LIST: wiphy array, nested netlink attribute
++ * @NL80211_ATTR_BSSID: BSSID (must be 6 bytes)
++ * @NL80211_ATTR_SSID: SSID (1-32 bytes)
++ * @NL80211_ATTR_CHANNEL: channel number
++ * @NL80211_ATTR_PHYMODE: PHY mode, see &enum nl80211_phymode
++ * @NL80211_ATTR_CHANNEL_LIST: netlink nested attribute array containing scan
++ * parameters for channels
++ * @NL80211_ATTR_BSS_LIST: nested attribute containing an array
++ * @NL80211_ATTR_BSSTYPE: BSS type, see &enum nl80211_bsstype
++ * @NL80211_ATTR_BEACON_PERIOD: beacon period
++ * @NL80211_ATTR_DTIM_PERIOD: DTIM period
++ * @NL80211_ATTR_TIMESTAMP: 64-bit timestamp of received beacon/probe response
++ * @NL80211_ATTR_IE: information element(s), maximum length %NL80211_MAX_IE_LEN
++ * @NL80211_ATTR_AUTH_ALGORITHM: authentication algorithm
++ * @NL80211_ATTR_TIMEOUT_TU: timeout in TU (TO BE USED)
++ * @NL80211_ATTR_REASON_CODE: 802.11 reason code
++ * @NL80211_ATTR_ASSOCIATION_ID: association ID (u16, 1-2007)
++ * @NL80211_ATTR_DEAUTHENTICATED: TO BE USED
++ * @NL80211_ATTR_RX_SENSITIVITY: receiver sensitivity in dBm
++ * @NL80211_ATTR_TRANSMIT_POWER: transmit power in mW
++ * @NL80211_ATTR_FRAG_THRESHOLD: fragmentation threshold (bytes)
++ * @NL80211_ATTR_FLAG_SCAN_ACTIVE: netlink flag indiciating active scan
++ * @NL80211_ATTR_KEY_DATA: temporal key data
++ * @NL80211_ATTR_KEY_ID: key ID (u8, 0-3)
++ * @NL80211_ATTR_KEY_TYPE: key type (see &enum nl80211_keytype)
++ * @NL80211_ATTR_MAC: MAC address
++ * @NL80211_ATTR_KEY_CIPHER: key cipher suite (u32)
++ * @__NL80211_ATTR_AFTER_LAST: internal use
++ */
++enum nl80211_attrs {
++/* don't change the order or add anything inbetween, this is ABI! */
++ NL80211_ATTR_UNSPEC,
++ /* %type: u32 */
++ NL80211_ATTR_IFINDEX,
++ /* %type: nulstring */
++ NL80211_ATTR_IFNAME,
++ /* %type: u32 */
++ NL80211_ATTR_WIPHY,
++ /* %type: nulstring */
++ NL80211_ATTR_WIPHY_NAME,
++ NL80211_ATTR_CMDS,
++ /* %type: u32 */
++ NL80211_ATTR_IFTYPE,
++ NL80211_ATTR_INTERFACE_LIST,
++ NL80211_ATTR_WIPHY_LIST,
++ NL80211_ATTR_BSSID,
++ NL80211_ATTR_SSID,
++ NL80211_ATTR_CHANNEL,
++ NL80211_ATTR_PHYMODE,
++ NL80211_ATTR_CHANNEL_LIST,
++ NL80211_ATTR_BSS_LIST,
++ NL80211_ATTR_BSSTYPE,
++ NL80211_ATTR_BEACON_PERIOD,
++ NL80211_ATTR_DTIM_PERIOD,
++ NL80211_ATTR_TIMESTAMP,
++ NL80211_ATTR_IE,
++ NL80211_ATTR_AUTH_ALGORITHM,
++ NL80211_ATTR_TIMEOUT_TU,
++ NL80211_ATTR_REASON_CODE,
++ NL80211_ATTR_ASSOCIATION_ID,
++ NL80211_ATTR_DEAUTHENTICATED,
++ NL80211_ATTR_RX_SENSITIVITY,
++ NL80211_ATTR_TRANSMIT_POWER,
++ NL80211_ATTR_FRAG_THRESHOLD,
++ NL80211_ATTR_FLAG_SCAN_ACTIVE,
++
++ NL80211_ATTR_KEY_DATA,
++ NL80211_ATTR_KEY_ID,
++ NL80211_ATTR_KEY_TYPE,
++ NL80211_ATTR_MAC,
++ NL80211_ATTR_KEY_CIPHER,
++
++ NL80211_ATTR_BEACON_HEAD,
++ NL80211_ATTR_BEACON_TAIL,
++
++ /* add attributes here, update the policy in nl80211.c */
++
++ /* used to define NL80211_ATTR_MAX below */
++ __NL80211_ATTR_AFTER_LAST,
++};
++#define NL80211_ATTR_MAX (__NL80211_ATTR_AFTER_LAST - 1)
++
++/**
++ * enum nl80211_multicast_groups - multicast groups for nl80211
++ * @NL80211_GROUP_CONFIG: members of this group are notified of
++ * configuration changes
++ */
++enum nl80211_multicast_groups {
++ /* be notified of configuration changes like wiphy renames */
++ NL80211_GROUP_CONFIG,
++
++ /* add groups here */
++
++ /* keep last */
++ __NL80211_GROUP_AFTER_LAST
++};
++#define NL80211_GROUP_MAX (__NL80211_GROUP_AFTER_LAST - 1)
++
++/*
++ * maximum length of IE(s) passed in an NL80211_ATTR_IE.
++ * this is an arbitrary limit, 774 means three full-length
++ * IEs would fit... increase if necessary */
++#define NL80211_MAX_IE_LEN 774
++
++/*
++ * maximum number of items in an ATTR_CHANNEL_LIST,
++ * just to avoid too large allocations
++ */
++#define NL80211_MAX_CHANNEL_LIST_ITEM 200
++
++/**
+ * enum nl80211_iftype - (virtual) interface types
+ * @NL80211_IFTYPE_UNSPECIFIED: unspecified type, driver decides
+ * @NL80211_IFTYPE_ADHOC: independent BSS member
+@@ -35,4 +246,56 @@
+ };
+ #define NL80211_IFTYPE_MAX (__NL80211_IFTYPE_AFTER_LAST - 1)
+
++/**
++ * enum nl80211_phymode - PHY modes
++ * @NL80211_PHYMODE_A: 5 GHz PHY
++ * @NL80211_PHYMODE_B: 2.4 GHz PHY (B mode)
++ * @NL80211_PHYMODE_G: 2.4 GHz PHY (G, compatible with B)
++ * @__NL80211_PHYMODE_AFTER_LAST: internal use
++ *
++ * These values are used for %NL80211_ATTR_PHYMODE.
++ */
++enum nl80211_phymode {
++ NL80211_PHYMODE_A,
++ NL80211_PHYMODE_B,
++ NL80211_PHYMODE_G,
++
++ /* keep last */
++ __NL80211_PHYMODE_AFTER_LAST
++};
++#define NL80211_PHYMODE_MAX (__NL80211_PHYMODE_AFTER_LAST - 1)
++
++/**
++ * enum nl80211_bsstype - BSS types
++ * @NL80211_BSSTYPE_INFRASTRUCTURE: infrastructure BSS
++ * @NL80211_BSSTYPE_INDEPENDENT: independent BSS (ad-hoc network)
++ * @__NL80211_BSSTYPE_AFTER_LAST: internal use
++ *
++ * These values are used for %NL80211_ATTR_BSSTYPE.
++ */
++enum nl80211_bsstype {
++ NL80211_BSSTYPE_INFRASTRUCTURE,
++ NL80211_BSSTYPE_INDEPENDENT,
++
++ /* keep last */
++ __NL80211_BSSTYPE_AFTER_LAST
++};
++#define NL80211_BSSTYPE_MAX (__NL80211_BSSTYPE_AFTER_LAST - 1)
++
++/**
++ * enum nl80211_keytype - key types
++ * @NL80211_KEYTYPE_GROUP: group key
++ * @NL80211_KEYTYPE_PAIRWISE: pairwise key
++ * @NL80211_KEYTYPE_PEER: peer key
++ */
++enum nl80211_keytype {
++ NL80211_KEYTYPE_GROUP,
++ NL80211_KEYTYPE_PAIRWISE,
++ NL80211_KEYTYPE_PEER,
++
++ /* keep last */
++ __NL80211_KEYTYPE_AFTER_LAST
++};
++#define NL80211_KEYTYPE_MAX (__NL80211_KEYTYPE_AFTER_LAST - 1)
++
+ #endif /* __LINUX_NL80211_H */
+Index: linux-2.6.22-rc4/include/net/cfg80211.h
+===================================================================
+--- linux-2.6.22-rc4.orig/include/net/cfg80211.h 2007-06-10 21:32:10.000000000 +0100
++++ linux-2.6.22-rc4/include/net/cfg80211.h 2007-06-10 21:33:26.000000000 +0100
+@@ -11,6 +11,69 @@
+ * Copyright 2006 Johannes Berg <johannes@sipsolutions.net>
+ */
+
++/**
++ * struct scan_channel - describes a single channel to scan
++ * @phymode: PHY mode for this channel
++ * @channel: channel number (1-14, ...)
++ * @active: scan actively or passively on this channel
++ */
++struct scan_channel {
++ int phymode;
++ u32 channel;
++ int active;
++};
++
++/**
++ * struct scan_params - describes scan parameters
++ * @n_channels: number of items in @channels array or -1 to indicate all
++ * channels should be scanned (in that case @channels will be %NULL)
++ * @active: when n_channels is -1 this determines active/passive scanning.
++ * @phymode: when n_channels is -1 this determines PHY mode to scan. It is
++ * not possible to scan different PHY modes in one request w/o giving
++ * a channel list.
++ * @channels: array containing @n_channels &struct scan_channel items
++ */
++struct scan_params {
++ int n_channels;
++ int active;
++ int phymode;
++ struct scan_channel *channels;
++};
++
++/**
++ * struct association_params - describes association parameters
++ * @valid: this member contains flags which items are valid
++ * @bssid: the BSSID of the BSS to associate [%ASSOC_PARAMS_BSSID]
++ * @timeout: timeout (in TU) [%ASSOC_PARAMS_TIMEOUT]
++ * @ie: information element(s) to include in the association frames [%ASSOC_PARAMS_IE]
++ * @ie_len: length of the information element(s)
++ * @ssid: the SSID, always valid.
++ * @ssid_len: length of the SSID
++ */
++struct association_params {
++ u8 *bssid;
++ u32 timeout;
++ u8 *ie;
++ int ie_len;
++ u8 *ssid;
++ int ssid_len;
++
++ unsigned int valid;
++};
++#define ASSOC_PARAMS_TIMEOUT (1<<0)
++
++/**
++ * struct key_params - key information
++ */
++struct key_params {
++ u8 *key;
++ int key_len;
++ int key_id;
++ u32 key_type;
++ u8 *macaddress;
++ u32 cipher;
++};
++
+ /* from net/wireless.h */
+ struct wiphy;
+
+@@ -30,11 +93,62 @@
+ * @add_virtual_intf: create a new virtual interface with the given name
+ *
+ * @del_virtual_intf: remove the virtual interface determined by ifindex.
++ *
++ * @change_virtual_intf: change type of virtual interface
++ *
++ * @associate: associate with given parameters
++ *
++ * @disassociate: disassociate from current AP
++ *
++ * @deauth: deauth from current AP
++ *
++ * @initiate_scan: scan with the given information (see &struct scan_params above)
++ *
++ * @get_association: get BSSID of the BSS that the device is currently
++ * associated to and return 1, or return 0 if not
++ * associated (or a negative error code)
++ * @get_auth_list: get list of BSSIDs of all BSSs the device has
++ * authenticated with, must call next_bssid for each,
++ * next_bssid returns non-zero on error, the given data
++ * is to be passed to that callback
++ * @add_key: add a key using &struct key_params
++ * @del_key: delete a key using info from &struct key_params
+ */
+ struct cfg80211_ops {
+ int (*add_virtual_intf)(struct wiphy *wiphy, char *name,
+ unsigned int type);
+ int (*del_virtual_intf)(struct wiphy *wiphy, int ifindex);
++ int (*change_virtual_intf)(struct wiphy *wiphy, int ifindex,
++ unsigned int type);
++
++ int (*associate)(struct wiphy *wiphy, struct net_device *dev,
++ struct association_params *params);
++ int (*disassociate)(struct wiphy *wiphy, struct net_device *dev);
++ int (*deauth)(struct wiphy *wiphy, struct net_device *dev);
++
++
++ int (*initiate_scan)(struct wiphy *wiphy, struct net_device *dev,
++ struct scan_params *params);
++
++
++ int (*get_association)(struct wiphy *wiphy, struct net_device *dev,
++ u8 *bssid);
++
++ int (*get_auth_list)(struct wiphy *wiphy, struct net_device *dev,
++ void *data,
++ int (*next_bssid)(void *data, u8 *bssid));
++
++ int (*add_key)(struct wiphy *wiphy, struct net_device *dev,
++ struct key_params *params);
++ int (*del_key)(struct wiphy *wiphy, struct net_device *dev,
++ struct key_params *params);
+ };
+
++
++/* helper functions specific to nl80211 */
++extern void *nl80211hdr_put(struct sk_buff *skb, u32 pid,
++ u32 seq, int flags, u8 cmd);
++extern void *nl80211msg_new(struct sk_buff **skb, u32 pid,
++ u32 seq, int flags, u8 cmd);
++
+ #endif /* __NET_CFG80211_H */
+Index: linux-2.6.22-rc4/include/net/iw_handler.h
+===================================================================
+--- linux-2.6.22-rc4.orig/include/net/iw_handler.h 2007-06-10 21:32:10.000000000 +0100
++++ linux-2.6.22-rc4/include/net/iw_handler.h 2007-06-10 21:33:26.000000000 +0100
+@@ -431,7 +431,13 @@
+ * Those may be called only within the kernel.
+ */
+
+-/* functions that may be called by driver modules */
++/* First : function strictly used inside the kernel */
++
++/* Handle /proc/net/wireless, called in net/code/dev.c */
++extern int dev_get_wireless_info(char * buffer, char **start, off_t offset,
++ int length);
++
++/* Second : functions that may be called by driver modules */
+
+ /* Send a single event to user space */
+ extern void wireless_send_event(struct net_device * dev,
+Index: linux-2.6.22-rc4/include/net/mac80211.h
+===================================================================
+--- linux-2.6.22-rc4.orig/include/net/mac80211.h 2007-06-10 21:32:10.000000000 +0100
++++ linux-2.6.22-rc4/include/net/mac80211.h 2007-06-10 21:33:26.000000000 +0100
+@@ -300,7 +300,6 @@
+ /* Following five fields are used for IEEE 802.11H */
+ unsigned int radar_detect;
+ unsigned int spect_mgmt;
+- /* All following fields are currently unused. */
+ unsigned int quiet_duration; /* duration of quiet period */
+ unsigned int quiet_offset; /* how far into the beacon is the quiet
+ * period */
+@@ -514,6 +513,9 @@
+ * per-packet RC4 key with each TX frame when doing hwcrypto */
+ #define IEEE80211_HW_TKIP_REQ_PHASE2_KEY (1<<14)
+
++ /* The device capable of supporting 11n */
++#define IEEE80211_HW_SUPPORT_HT_MODE (1<<15)
++
+ u32 flags; /* hardware flags defined above */
+
+ /* Set to the size of a needed device specific skb headroom for TX skbs. */
+@@ -641,8 +643,7 @@
+ * used if the wlan hardware or low-level driver implements PAE.
+ * 80211.o module will anyway filter frames based on authorization
+ * state, so this function pointer can be NULL if low-level driver does
+- * not require event notification about port state changes.
+- * Currently unused. */
++ * not require event notification about port state changes. */
+ int (*set_port_auth)(struct ieee80211_hw *hw, u8 *addr,
+ int authorized);
+
+@@ -694,8 +695,9 @@
+ /* Get statistics of the current TX queue status. This is used to get
+ * number of currently queued packets (queue length), maximum queue
+ * size (limit), and total number of packets sent using each TX queue
+- * (count).
+- * Currently unused. */
++ * (count). This information is used for WMM to find out which TX
++ * queues have room for more packets and by hostapd to provide
++ * statistics about the current queueing state to external programs. */
+ int (*get_tx_stats)(struct ieee80211_hw *hw,
+ struct ieee80211_tx_queue_stats *stats);
+
+@@ -705,12 +707,25 @@
+ * Must be atomic. */
+ u64 (*get_tsf)(struct ieee80211_hw *hw);
+
++ /* Call low level driver with 11n Block Ack action */
++ int (*handle_ba_action)(struct ieee80211_hw *hw,
++ struct ieee80211_mgmt *mgmt);
++
+ /* Reset the TSF timer and allow firmware/hardware to synchronize with
+ * other STAs in the IBSS. This is only used in IBSS mode. This
+ * function is optional if the firmware/hardware takes full care of
+ * TSF synchronization. */
+ void (*reset_tsf)(struct ieee80211_hw *hw);
+
++ /* Configure ht parameters. */
++ int (*conf_ht)(struct ieee80211_hw *hw,
++ struct ieee80211_ht_capability *ht_cap_param,
++ struct ieee80211_ht_additional_info *ht_extra_param);
++
++ /* Get ht capabilities from the device */
++ void (*get_ht_capab)(struct ieee80211_hw *hw,
++ struct ieee80211_ht_capability *ht_cap_param);
++
+ /* Setup beacon data for IBSS beacons. Unlike access point (Master),
+ * IBSS uses a fixed beacon frame which is configured using this
+ * function. This handler is required only for IBSS mode. */