diff options
| author | John W. Linville <linville@tuxdriver.com> | 2010-10-08 15:39:28 -0400 |
|---|---|---|
| committer | John W. Linville <linville@tuxdriver.com> | 2010-10-08 15:39:28 -0400 |
| commit | e9a68707d736f4f73d7e209885d7b4c5c452b1dc (patch) | |
| tree | d9f76964c77c1059483b08436ed060b702b8e25d /include/net | |
| parent | dd53df265b1ee7a1fbbc76bb62c3bec2383bbd44 (diff) | |
| parent | 15a6321d1c0f8db561932cd99e1b9897981da71f (diff) | |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem
Conflicts:
Documentation/feature-removal-schedule.txt
drivers/net/wireless/ipw2x00/ipw2200.c
Diffstat (limited to 'include/net')
| -rw-r--r-- | include/net/cfg80211.h | 25 | ||||
| -rw-r--r-- | include/net/genetlink.h | 18 | ||||
| -rw-r--r-- | include/net/mac80211.h | 30 |
3 files changed, 64 insertions, 9 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index a0613ff62c97..0778d04b3bbe 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
| @@ -293,12 +293,14 @@ struct key_params { | |||
| 293 | * enum survey_info_flags - survey information flags | 293 | * enum survey_info_flags - survey information flags |
| 294 | * | 294 | * |
| 295 | * @SURVEY_INFO_NOISE_DBM: noise (in dBm) was filled in | 295 | * @SURVEY_INFO_NOISE_DBM: noise (in dBm) was filled in |
| 296 | * @SURVEY_INFO_IN_USE: channel is currently being used | ||
| 296 | * | 297 | * |
| 297 | * Used by the driver to indicate which info in &struct survey_info | 298 | * Used by the driver to indicate which info in &struct survey_info |
| 298 | * it has filled in during the get_survey(). | 299 | * it has filled in during the get_survey(). |
| 299 | */ | 300 | */ |
| 300 | enum survey_info_flags { | 301 | enum survey_info_flags { |
| 301 | SURVEY_INFO_NOISE_DBM = 1<<0, | 302 | SURVEY_INFO_NOISE_DBM = 1<<0, |
| 303 | SURVEY_INFO_IN_USE = 1<<1, | ||
| 302 | }; | 304 | }; |
| 303 | 305 | ||
| 304 | /** | 306 | /** |
| @@ -399,6 +401,8 @@ struct station_parameters { | |||
| 399 | * (tx_bitrate, tx_bitrate_flags and tx_bitrate_mcs) | 401 | * (tx_bitrate, tx_bitrate_flags and tx_bitrate_mcs) |
| 400 | * @STATION_INFO_RX_PACKETS: @rx_packets filled | 402 | * @STATION_INFO_RX_PACKETS: @rx_packets filled |
| 401 | * @STATION_INFO_TX_PACKETS: @tx_packets filled | 403 | * @STATION_INFO_TX_PACKETS: @tx_packets filled |
| 404 | * @STATION_INFO_TX_RETRIES: @tx_retries filled | ||
| 405 | * @STATION_INFO_TX_FAILED: @tx_failed filled | ||
| 402 | */ | 406 | */ |
| 403 | enum station_info_flags { | 407 | enum station_info_flags { |
| 404 | STATION_INFO_INACTIVE_TIME = 1<<0, | 408 | STATION_INFO_INACTIVE_TIME = 1<<0, |
| @@ -411,6 +415,8 @@ enum station_info_flags { | |||
| 411 | STATION_INFO_TX_BITRATE = 1<<7, | 415 | STATION_INFO_TX_BITRATE = 1<<7, |
| 412 | STATION_INFO_RX_PACKETS = 1<<8, | 416 | STATION_INFO_RX_PACKETS = 1<<8, |
| 413 | STATION_INFO_TX_PACKETS = 1<<9, | 417 | STATION_INFO_TX_PACKETS = 1<<9, |
| 418 | STATION_INFO_TX_RETRIES = 1<<10, | ||
| 419 | STATION_INFO_TX_FAILED = 1<<11, | ||
| 414 | }; | 420 | }; |
| 415 | 421 | ||
| 416 | /** | 422 | /** |
| @@ -460,6 +466,8 @@ struct rate_info { | |||
| 460 | * @txrate: current unicast bitrate to this station | 466 | * @txrate: current unicast bitrate to this station |
| 461 | * @rx_packets: packets received from this station | 467 | * @rx_packets: packets received from this station |
| 462 | * @tx_packets: packets transmitted to this station | 468 | * @tx_packets: packets transmitted to this station |
| 469 | * @tx_retries: cumulative retry counts | ||
| 470 | * @tx_failed: number of failed transmissions (retries exceeded, no ACK) | ||
| 463 | * @generation: generation number for nl80211 dumps. | 471 | * @generation: generation number for nl80211 dumps. |
| 464 | * This number should increase every time the list of stations | 472 | * This number should increase every time the list of stations |
| 465 | * changes, i.e. when a station is added or removed, so that | 473 | * changes, i.e. when a station is added or removed, so that |
| @@ -477,6 +485,8 @@ struct station_info { | |||
| 477 | struct rate_info txrate; | 485 | struct rate_info txrate; |
| 478 | u32 rx_packets; | 486 | u32 rx_packets; |
| 479 | u32 tx_packets; | 487 | u32 tx_packets; |
| 488 | u32 tx_retries; | ||
| 489 | u32 tx_failed; | ||
| 480 | 490 | ||
| 481 | int generation; | 491 | int generation; |
| 482 | }; | 492 | }; |
| @@ -1128,13 +1138,14 @@ struct cfg80211_ops { | |||
| 1128 | struct vif_params *params); | 1138 | struct vif_params *params); |
| 1129 | 1139 | ||
| 1130 | int (*add_key)(struct wiphy *wiphy, struct net_device *netdev, | 1140 | int (*add_key)(struct wiphy *wiphy, struct net_device *netdev, |
| 1131 | u8 key_index, const u8 *mac_addr, | 1141 | u8 key_index, bool pairwise, const u8 *mac_addr, |
| 1132 | struct key_params *params); | 1142 | struct key_params *params); |
| 1133 | int (*get_key)(struct wiphy *wiphy, struct net_device *netdev, | 1143 | int (*get_key)(struct wiphy *wiphy, struct net_device *netdev, |
| 1134 | u8 key_index, const u8 *mac_addr, void *cookie, | 1144 | u8 key_index, bool pairwise, const u8 *mac_addr, |
| 1145 | void *cookie, | ||
| 1135 | void (*callback)(void *cookie, struct key_params*)); | 1146 | void (*callback)(void *cookie, struct key_params*)); |
| 1136 | int (*del_key)(struct wiphy *wiphy, struct net_device *netdev, | 1147 | int (*del_key)(struct wiphy *wiphy, struct net_device *netdev, |
| 1137 | u8 key_index, const u8 *mac_addr); | 1148 | u8 key_index, bool pairwise, const u8 *mac_addr); |
| 1138 | int (*set_default_key)(struct wiphy *wiphy, | 1149 | int (*set_default_key)(struct wiphy *wiphy, |
| 1139 | struct net_device *netdev, | 1150 | struct net_device *netdev, |
| 1140 | u8 key_index); | 1151 | u8 key_index); |
| @@ -1218,7 +1229,7 @@ struct cfg80211_ops { | |||
| 1218 | int (*get_tx_power)(struct wiphy *wiphy, int *dbm); | 1229 | int (*get_tx_power)(struct wiphy *wiphy, int *dbm); |
| 1219 | 1230 | ||
| 1220 | int (*set_wds_peer)(struct wiphy *wiphy, struct net_device *dev, | 1231 | int (*set_wds_peer)(struct wiphy *wiphy, struct net_device *dev, |
| 1221 | u8 *addr); | 1232 | const u8 *addr); |
| 1222 | 1233 | ||
| 1223 | void (*rfkill_poll)(struct wiphy *wiphy); | 1234 | void (*rfkill_poll)(struct wiphy *wiphy); |
| 1224 | 1235 | ||
| @@ -1302,6 +1313,7 @@ struct cfg80211_ops { | |||
| 1302 | * @WIPHY_FLAG_CONTROL_PORT_PROTOCOL: This device supports setting the | 1313 | * @WIPHY_FLAG_CONTROL_PORT_PROTOCOL: This device supports setting the |
| 1303 | * control port protocol ethertype. The device also honours the | 1314 | * control port protocol ethertype. The device also honours the |
| 1304 | * control_port_no_encrypt flag. | 1315 | * control_port_no_encrypt flag. |
| 1316 | * @WIPHY_FLAG_IBSS_RSN: The device supports IBSS RSN. | ||
| 1305 | */ | 1317 | */ |
| 1306 | enum wiphy_flags { | 1318 | enum wiphy_flags { |
| 1307 | WIPHY_FLAG_CUSTOM_REGULATORY = BIT(0), | 1319 | WIPHY_FLAG_CUSTOM_REGULATORY = BIT(0), |
| @@ -1312,6 +1324,7 @@ enum wiphy_flags { | |||
| 1312 | WIPHY_FLAG_4ADDR_AP = BIT(5), | 1324 | WIPHY_FLAG_4ADDR_AP = BIT(5), |
| 1313 | WIPHY_FLAG_4ADDR_STATION = BIT(6), | 1325 | WIPHY_FLAG_4ADDR_STATION = BIT(6), |
| 1314 | WIPHY_FLAG_CONTROL_PORT_PROTOCOL = BIT(7), | 1326 | WIPHY_FLAG_CONTROL_PORT_PROTOCOL = BIT(7), |
| 1327 | WIPHY_FLAG_IBSS_RSN = BIT(7), | ||
| 1315 | }; | 1328 | }; |
| 1316 | 1329 | ||
| 1317 | struct mac_address { | 1330 | struct mac_address { |
| @@ -2551,8 +2564,6 @@ void cfg80211_cqm_rssi_notify(struct net_device *dev, | |||
| 2551 | enum nl80211_cqm_rssi_threshold_event rssi_event, | 2564 | enum nl80211_cqm_rssi_threshold_event rssi_event, |
| 2552 | gfp_t gfp); | 2565 | gfp_t gfp); |
| 2553 | 2566 | ||
| 2554 | #ifdef __KERNEL__ | ||
| 2555 | |||
| 2556 | /* Logging, debugging and troubleshooting/diagnostic helpers. */ | 2567 | /* Logging, debugging and troubleshooting/diagnostic helpers. */ |
| 2557 | 2568 | ||
| 2558 | /* wiphy_printk helpers, similar to dev_printk */ | 2569 | /* wiphy_printk helpers, similar to dev_printk */ |
| @@ -2599,6 +2610,4 @@ void cfg80211_cqm_rssi_notify(struct net_device *dev, | |||
| 2599 | #define wiphy_WARN(wiphy, format, args...) \ | 2610 | #define wiphy_WARN(wiphy, format, args...) \ |
| 2600 | WARN(1, "wiphy: %s\n" format, wiphy_name(wiphy), ##args); | 2611 | WARN(1, "wiphy: %s\n" format, wiphy_name(wiphy), ##args); |
| 2601 | 2612 | ||
| 2602 | #endif | ||
| 2603 | |||
| 2604 | #endif /* __NET_CFG80211_H */ | 2613 | #endif /* __NET_CFG80211_H */ |
diff --git a/include/net/genetlink.h b/include/net/genetlink.h index f7dcd2c70412..8a64b811a39a 100644 --- a/include/net/genetlink.h +++ b/include/net/genetlink.h | |||
| @@ -20,6 +20,9 @@ struct genl_multicast_group { | |||
| 20 | u32 id; | 20 | u32 id; |
| 21 | }; | 21 | }; |
| 22 | 22 | ||
| 23 | struct genl_ops; | ||
| 24 | struct genl_info; | ||
| 25 | |||
| 23 | /** | 26 | /** |
| 24 | * struct genl_family - generic netlink family | 27 | * struct genl_family - generic netlink family |
| 25 | * @id: protocol family idenfitier | 28 | * @id: protocol family idenfitier |
| @@ -29,6 +32,10 @@ struct genl_multicast_group { | |||
| 29 | * @maxattr: maximum number of attributes supported | 32 | * @maxattr: maximum number of attributes supported |
| 30 | * @netnsok: set to true if the family can handle network | 33 | * @netnsok: set to true if the family can handle network |
| 31 | * namespaces and should be presented in all of them | 34 | * namespaces and should be presented in all of them |
| 35 | * @pre_doit: called before an operation's doit callback, it may | ||
| 36 | * do additional, common, filtering and return an error | ||
| 37 | * @post_doit: called after an operation's doit callback, it may | ||
| 38 | * undo operations done by pre_doit, for example release locks | ||
| 32 | * @attrbuf: buffer to store parsed attributes | 39 | * @attrbuf: buffer to store parsed attributes |
| 33 | * @ops_list: list of all assigned operations | 40 | * @ops_list: list of all assigned operations |
| 34 | * @family_list: family list | 41 | * @family_list: family list |
| @@ -41,6 +48,12 @@ struct genl_family { | |||
| 41 | unsigned int version; | 48 | unsigned int version; |
| 42 | unsigned int maxattr; | 49 | unsigned int maxattr; |
| 43 | bool netnsok; | 50 | bool netnsok; |
| 51 | int (*pre_doit)(struct genl_ops *ops, | ||
| 52 | struct sk_buff *skb, | ||
| 53 | struct genl_info *info); | ||
| 54 | void (*post_doit)(struct genl_ops *ops, | ||
| 55 | struct sk_buff *skb, | ||
| 56 | struct genl_info *info); | ||
| 44 | struct nlattr ** attrbuf; /* private */ | 57 | struct nlattr ** attrbuf; /* private */ |
| 45 | struct list_head ops_list; /* private */ | 58 | struct list_head ops_list; /* private */ |
| 46 | struct list_head family_list; /* private */ | 59 | struct list_head family_list; /* private */ |
| @@ -55,6 +68,8 @@ struct genl_family { | |||
| 55 | * @genlhdr: generic netlink message header | 68 | * @genlhdr: generic netlink message header |
| 56 | * @userhdr: user specific header | 69 | * @userhdr: user specific header |
| 57 | * @attrs: netlink attributes | 70 | * @attrs: netlink attributes |
| 71 | * @_net: network namespace | ||
| 72 | * @user_ptr: user pointers | ||
| 58 | */ | 73 | */ |
| 59 | struct genl_info { | 74 | struct genl_info { |
| 60 | u32 snd_seq; | 75 | u32 snd_seq; |
| @@ -66,6 +81,7 @@ struct genl_info { | |||
| 66 | #ifdef CONFIG_NET_NS | 81 | #ifdef CONFIG_NET_NS |
| 67 | struct net * _net; | 82 | struct net * _net; |
| 68 | #endif | 83 | #endif |
| 84 | void * user_ptr[2]; | ||
| 69 | }; | 85 | }; |
| 70 | 86 | ||
| 71 | static inline struct net *genl_info_net(struct genl_info *info) | 87 | static inline struct net *genl_info_net(struct genl_info *info) |
| @@ -81,6 +97,7 @@ static inline void genl_info_net_set(struct genl_info *info, struct net *net) | |||
| 81 | /** | 97 | /** |
| 82 | * struct genl_ops - generic netlink operations | 98 | * struct genl_ops - generic netlink operations |
| 83 | * @cmd: command identifier | 99 | * @cmd: command identifier |
| 100 | * @internal_flags: flags used by the family | ||
| 84 | * @flags: flags | 101 | * @flags: flags |
| 85 | * @policy: attribute validation policy | 102 | * @policy: attribute validation policy |
| 86 | * @doit: standard command callback | 103 | * @doit: standard command callback |
| @@ -90,6 +107,7 @@ static inline void genl_info_net_set(struct genl_info *info, struct net *net) | |||
| 90 | */ | 107 | */ |
| 91 | struct genl_ops { | 108 | struct genl_ops { |
| 92 | u8 cmd; | 109 | u8 cmd; |
| 110 | u8 internal_flags; | ||
| 93 | unsigned int flags; | 111 | unsigned int flags; |
| 94 | const struct nla_policy *policy; | 112 | const struct nla_policy *policy; |
| 95 | int (*doit)(struct sk_buff *skb, | 113 | int (*doit)(struct sk_buff *skb, |
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index fe8b9dae4dee..33aa2e39147b 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
| @@ -1041,6 +1041,13 @@ enum ieee80211_tkip_key_type { | |||
| 1041 | * @IEEE80211_HW_NEED_DTIM_PERIOD: | 1041 | * @IEEE80211_HW_NEED_DTIM_PERIOD: |
| 1042 | * This device needs to know the DTIM period for the BSS before | 1042 | * This device needs to know the DTIM period for the BSS before |
| 1043 | * associating. | 1043 | * associating. |
| 1044 | * | ||
| 1045 | * @IEEE80211_HW_SUPPORTS_PER_STA_GTK: The device's crypto engine supports | ||
| 1046 | * per-station GTKs as used by IBSS RSN or during fast transition. If | ||
| 1047 | * the device doesn't support per-station GTKs, but can be asked not | ||
| 1048 | * to decrypt group addressed frames, then IBSS RSN support is still | ||
| 1049 | * possible but software crypto will be used. Advertise the wiphy flag | ||
| 1050 | * only in that case. | ||
| 1044 | */ | 1051 | */ |
| 1045 | enum ieee80211_hw_flags { | 1052 | enum ieee80211_hw_flags { |
| 1046 | IEEE80211_HW_HAS_RATE_CONTROL = 1<<0, | 1053 | IEEE80211_HW_HAS_RATE_CONTROL = 1<<0, |
| @@ -1064,6 +1071,7 @@ enum ieee80211_hw_flags { | |||
| 1064 | IEEE80211_HW_REPORTS_TX_ACK_STATUS = 1<<18, | 1071 | IEEE80211_HW_REPORTS_TX_ACK_STATUS = 1<<18, |
| 1065 | IEEE80211_HW_CONNECTION_MONITOR = 1<<19, | 1072 | IEEE80211_HW_CONNECTION_MONITOR = 1<<19, |
| 1066 | IEEE80211_HW_SUPPORTS_CQM_RSSI = 1<<20, | 1073 | IEEE80211_HW_SUPPORTS_CQM_RSSI = 1<<20, |
| 1074 | IEEE80211_HW_SUPPORTS_PER_STA_GTK = 1<<21, | ||
| 1067 | }; | 1075 | }; |
| 1068 | 1076 | ||
| 1069 | /** | 1077 | /** |
| @@ -1109,7 +1117,10 @@ enum ieee80211_hw_flags { | |||
| 1109 | * @sta_data_size: size (in bytes) of the drv_priv data area | 1117 | * @sta_data_size: size (in bytes) of the drv_priv data area |
| 1110 | * within &struct ieee80211_sta. | 1118 | * within &struct ieee80211_sta. |
| 1111 | * | 1119 | * |
| 1112 | * @max_rates: maximum number of alternate rate retry stages | 1120 | * @max_rates: maximum number of alternate rate retry stages the hw |
| 1121 | * can handle. | ||
| 1122 | * @max_report_rates: maximum number of alternate rate retry stages | ||
| 1123 | * the hw can report back. | ||
| 1113 | * @max_rate_tries: maximum number of tries for each stage | 1124 | * @max_rate_tries: maximum number of tries for each stage |
| 1114 | * | 1125 | * |
| 1115 | * @napi_weight: weight used for NAPI polling. You must specify an | 1126 | * @napi_weight: weight used for NAPI polling. You must specify an |
| @@ -1131,6 +1142,7 @@ struct ieee80211_hw { | |||
| 1131 | u16 max_listen_interval; | 1142 | u16 max_listen_interval; |
| 1132 | s8 max_signal; | 1143 | s8 max_signal; |
| 1133 | u8 max_rates; | 1144 | u8 max_rates; |
| 1145 | u8 max_report_rates; | ||
| 1134 | u8 max_rate_tries; | 1146 | u8 max_rate_tries; |
| 1135 | }; | 1147 | }; |
| 1136 | 1148 | ||
| @@ -2578,6 +2590,22 @@ void ieee80211_chswitch_done(struct ieee80211_vif *vif, bool success); | |||
| 2578 | void ieee80211_request_smps(struct ieee80211_vif *vif, | 2590 | void ieee80211_request_smps(struct ieee80211_vif *vif, |
| 2579 | enum ieee80211_smps_mode smps_mode); | 2591 | enum ieee80211_smps_mode smps_mode); |
| 2580 | 2592 | ||
| 2593 | /** | ||
| 2594 | * ieee80211_key_removed - disable hw acceleration for key | ||
| 2595 | * @key_conf: The key hw acceleration should be disabled for | ||
| 2596 | * | ||
| 2597 | * This allows drivers to indicate that the given key has been | ||
| 2598 | * removed from hardware acceleration, due to a new key that | ||
| 2599 | * was added. Don't use this if the key can continue to be used | ||
| 2600 | * for TX, if the key restriction is on RX only it is permitted | ||
| 2601 | * to keep the key for TX only and not call this function. | ||
| 2602 | * | ||
| 2603 | * Due to locking constraints, it may only be called during | ||
| 2604 | * @set_key. This function must be allowed to sleep, and the | ||
| 2605 | * key it tries to disable may still be used until it returns. | ||
| 2606 | */ | ||
| 2607 | void ieee80211_key_removed(struct ieee80211_key_conf *key_conf); | ||
| 2608 | |||
| 2581 | /* Rate control API */ | 2609 | /* Rate control API */ |
| 2582 | 2610 | ||
| 2583 | /** | 2611 | /** |
