aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2009-06-07 07:24:21 -0400
committerDavid S. Miller <davem@davemloft.net>2009-06-07 07:24:21 -0400
commitb1bc81a0ef86b86fa410dd303d84c8c7bd09a64d (patch)
treea0d2e6dd179e5d057776edd0ed865bc744dfa54d /include/net
parenta93958ac980f0ce594ad90657ecbc595ff157a40 (diff)
parent0c0c9e7076b69f93678e4ec711e2bf237398e623 (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6
Diffstat (limited to 'include/net')
-rw-r--r--include/net/cfg80211.h51
-rw-r--r--include/net/mac80211.h26
-rw-r--r--include/net/wimax.h8
3 files changed, 68 insertions, 17 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index f20da7d63b1e..1a21895b732b 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -752,6 +752,19 @@ enum wiphy_params_flags {
752}; 752};
753 753
754/** 754/**
755 * enum tx_power_setting - TX power adjustment
756 *
757 * @TX_POWER_AUTOMATIC: the dbm parameter is ignored
758 * @TX_POWER_LIMITED: limit TX power by the dbm parameter
759 * @TX_POWER_FIXED: fix TX power to the dbm parameter
760 */
761enum tx_power_setting {
762 TX_POWER_AUTOMATIC,
763 TX_POWER_LIMITED,
764 TX_POWER_FIXED,
765};
766
767/**
755 * struct cfg80211_ops - backend description for wireless configuration 768 * struct cfg80211_ops - backend description for wireless configuration
756 * 769 *
757 * This struct is registered by fullmac card drivers and/or wireless stacks 770 * This struct is registered by fullmac card drivers and/or wireless stacks
@@ -837,6 +850,13 @@ enum wiphy_params_flags {
837 * @changed bitfield (see &enum wiphy_params_flags) describes which values 850 * @changed bitfield (see &enum wiphy_params_flags) describes which values
838 * have changed. The actual parameter values are available in 851 * have changed. The actual parameter values are available in
839 * struct wiphy. If returning an error, no value should be changed. 852 * struct wiphy. If returning an error, no value should be changed.
853 *
854 * @set_tx_power: set the transmit power according to the parameters
855 * @get_tx_power: store the current TX power into the dbm variable;
856 * return 0 if successful
857 *
858 * @rfkill_poll: polls the hw rfkill line, use cfg80211 reporting
859 * functions to adjust rfkill hw state
840 */ 860 */
841struct cfg80211_ops { 861struct cfg80211_ops {
842 int (*suspend)(struct wiphy *wiphy); 862 int (*suspend)(struct wiphy *wiphy);
@@ -928,6 +948,12 @@ struct cfg80211_ops {
928 int (*leave_ibss)(struct wiphy *wiphy, struct net_device *dev); 948 int (*leave_ibss)(struct wiphy *wiphy, struct net_device *dev);
929 949
930 int (*set_wiphy_params)(struct wiphy *wiphy, u32 changed); 950 int (*set_wiphy_params)(struct wiphy *wiphy, u32 changed);
951
952 int (*set_tx_power)(struct wiphy *wiphy,
953 enum tx_power_setting type, int dbm);
954 int (*get_tx_power)(struct wiphy *wiphy, int *dbm);
955
956 void (*rfkill_poll)(struct wiphy *wiphy);
931}; 957};
932 958
933/* 959/*
@@ -1451,6 +1477,12 @@ int cfg80211_wext_siwencode(struct net_device *dev,
1451int cfg80211_wext_giwencode(struct net_device *dev, 1477int cfg80211_wext_giwencode(struct net_device *dev,
1452 struct iw_request_info *info, 1478 struct iw_request_info *info,
1453 struct iw_point *erq, char *keybuf); 1479 struct iw_point *erq, char *keybuf);
1480int cfg80211_wext_siwtxpower(struct net_device *dev,
1481 struct iw_request_info *info,
1482 union iwreq_data *data, char *keybuf);
1483int cfg80211_wext_giwtxpower(struct net_device *dev,
1484 struct iw_request_info *info,
1485 union iwreq_data *data, char *keybuf);
1454 1486
1455/* 1487/*
1456 * callbacks for asynchronous cfg80211 methods, notification 1488 * callbacks for asynchronous cfg80211 methods, notification
@@ -1636,4 +1668,23 @@ void cfg80211_michael_mic_failure(struct net_device *dev, const u8 *addr,
1636 */ 1668 */
1637void cfg80211_ibss_joined(struct net_device *dev, const u8 *bssid, gfp_t gfp); 1669void cfg80211_ibss_joined(struct net_device *dev, const u8 *bssid, gfp_t gfp);
1638 1670
1671/**
1672 * wiphy_rfkill_set_hw_state - notify cfg80211 about hw block state
1673 * @wiphy: the wiphy
1674 * @blocked: block status
1675 */
1676void wiphy_rfkill_set_hw_state(struct wiphy *wiphy, bool blocked);
1677
1678/**
1679 * wiphy_rfkill_start_polling - start polling rfkill
1680 * @wiphy: the wiphy
1681 */
1682void wiphy_rfkill_start_polling(struct wiphy *wiphy);
1683
1684/**
1685 * wiphy_rfkill_stop_polling - stop polling rfkill
1686 * @wiphy: the wiphy
1687 */
1688void wiphy_rfkill_stop_polling(struct wiphy *wiphy);
1689
1639#endif /* __NET_CFG80211_H */ 1690#endif /* __NET_CFG80211_H */
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index d72346ff3247..17d61d19d912 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -526,8 +526,7 @@ enum ieee80211_conf_flags {
526/** 526/**
527 * enum ieee80211_conf_changed - denotes which configuration changed 527 * enum ieee80211_conf_changed - denotes which configuration changed
528 * 528 *
529 * @IEEE80211_CONF_CHANGE_RADIO_ENABLED: the value of radio_enabled changed 529 * @_IEEE80211_CONF_CHANGE_RADIO_ENABLED: DEPRECATED
530 * @_IEEE80211_CONF_CHANGE_BEACON_INTERVAL: DEPRECATED
531 * @IEEE80211_CONF_CHANGE_LISTEN_INTERVAL: the listen interval changed 530 * @IEEE80211_CONF_CHANGE_LISTEN_INTERVAL: the listen interval changed
532 * @IEEE80211_CONF_CHANGE_RADIOTAP: the radiotap flag changed 531 * @IEEE80211_CONF_CHANGE_RADIOTAP: the radiotap flag changed
533 * @IEEE80211_CONF_CHANGE_PS: the PS flag or dynamic PS timeout changed 532 * @IEEE80211_CONF_CHANGE_PS: the PS flag or dynamic PS timeout changed
@@ -537,8 +536,7 @@ enum ieee80211_conf_flags {
537 * @IEEE80211_CONF_CHANGE_IDLE: Idle flag changed 536 * @IEEE80211_CONF_CHANGE_IDLE: Idle flag changed
538 */ 537 */
539enum ieee80211_conf_changed { 538enum ieee80211_conf_changed {
540 IEEE80211_CONF_CHANGE_RADIO_ENABLED = BIT(0), 539 _IEEE80211_CONF_CHANGE_RADIO_ENABLED = BIT(0),
541 _IEEE80211_CONF_CHANGE_BEACON_INTERVAL = BIT(1),
542 IEEE80211_CONF_CHANGE_LISTEN_INTERVAL = BIT(2), 540 IEEE80211_CONF_CHANGE_LISTEN_INTERVAL = BIT(2),
543 IEEE80211_CONF_CHANGE_RADIOTAP = BIT(3), 541 IEEE80211_CONF_CHANGE_RADIOTAP = BIT(3),
544 IEEE80211_CONF_CHANGE_PS = BIT(4), 542 IEEE80211_CONF_CHANGE_PS = BIT(4),
@@ -549,12 +547,12 @@ enum ieee80211_conf_changed {
549}; 547};
550 548
551static inline __deprecated enum ieee80211_conf_changed 549static inline __deprecated enum ieee80211_conf_changed
552__IEEE80211_CONF_CHANGE_BEACON_INTERVAL(void) 550__IEEE80211_CONF_CHANGE_RADIO_ENABLED(void)
553{ 551{
554 return _IEEE80211_CONF_CHANGE_BEACON_INTERVAL; 552 return _IEEE80211_CONF_CHANGE_RADIO_ENABLED;
555} 553}
556#define IEEE80211_CONF_CHANGE_BEACON_INTERVAL \ 554#define IEEE80211_CONF_CHANGE_RADIO_ENABLED \
557 __IEEE80211_CONF_CHANGE_BEACON_INTERVAL() 555 __IEEE80211_CONF_CHANGE_RADIO_ENABLED()
558 556
559/** 557/**
560 * struct ieee80211_conf - configuration of the device 558 * struct ieee80211_conf - configuration of the device
@@ -564,7 +562,7 @@ __IEEE80211_CONF_CHANGE_BEACON_INTERVAL(void)
564 * @flags: configuration flags defined above 562 * @flags: configuration flags defined above
565 * 563 *
566 * @radio_enabled: when zero, driver is required to switch off the radio. 564 * @radio_enabled: when zero, driver is required to switch off the radio.
567 * @beacon_int: beacon interval (TODO make interface config) 565 * @beacon_int: DEPRECATED, DO NOT USE
568 * 566 *
569 * @listen_interval: listen interval in units of beacon interval 567 * @listen_interval: listen interval in units of beacon interval
570 * @max_sleep_period: the maximum number of beacon intervals to sleep for 568 * @max_sleep_period: the maximum number of beacon intervals to sleep for
@@ -589,13 +587,13 @@ __IEEE80211_CONF_CHANGE_BEACON_INTERVAL(void)
589 * number of transmissions not the number of retries 587 * number of transmissions not the number of retries
590 */ 588 */
591struct ieee80211_conf { 589struct ieee80211_conf {
592 int beacon_int; 590 int __deprecated beacon_int;
593 u32 flags; 591 u32 flags;
594 int power_level, dynamic_ps_timeout; 592 int power_level, dynamic_ps_timeout;
595 int max_sleep_period; 593 int max_sleep_period;
596 594
597 u16 listen_interval; 595 u16 listen_interval;
598 bool radio_enabled; 596 bool __deprecated radio_enabled;
599 597
600 u8 long_frame_max_tx_count, short_frame_max_tx_count; 598 u8 long_frame_max_tx_count, short_frame_max_tx_count;
601 599
@@ -1406,6 +1404,10 @@ enum ieee80211_ampdu_mlme_action {
1406 * is the first frame we expect to perform the action on. Notice 1404 * is the first frame we expect to perform the action on. Notice
1407 * that TX/RX_STOP can pass NULL for this parameter. 1405 * that TX/RX_STOP can pass NULL for this parameter.
1408 * Returns a negative error code on failure. 1406 * Returns a negative error code on failure.
1407 *
1408 * @rfkill_poll: Poll rfkill hardware state. If you need this, you also
1409 * need to set wiphy->rfkill_poll to %true before registration,
1410 * and need to call wiphy_rfkill_set_hw_state() in the callback.
1409 */ 1411 */
1410struct ieee80211_ops { 1412struct ieee80211_ops {
1411 int (*tx)(struct ieee80211_hw *hw, struct sk_buff *skb); 1413 int (*tx)(struct ieee80211_hw *hw, struct sk_buff *skb);
@@ -1454,6 +1456,8 @@ struct ieee80211_ops {
1454 int (*ampdu_action)(struct ieee80211_hw *hw, 1456 int (*ampdu_action)(struct ieee80211_hw *hw,
1455 enum ieee80211_ampdu_mlme_action action, 1457 enum ieee80211_ampdu_mlme_action action,
1456 struct ieee80211_sta *sta, u16 tid, u16 *ssn); 1458 struct ieee80211_sta *sta, u16 tid, u16 *ssn);
1459
1460 void (*rfkill_poll)(struct ieee80211_hw *hw);
1457}; 1461};
1458 1462
1459/** 1463/**
diff --git a/include/net/wimax.h b/include/net/wimax.h
index 6b3824edb39e..2af7bf839f23 100644
--- a/include/net/wimax.h
+++ b/include/net/wimax.h
@@ -253,7 +253,6 @@
253struct net_device; 253struct net_device;
254struct genl_info; 254struct genl_info;
255struct wimax_dev; 255struct wimax_dev;
256struct input_dev;
257 256
258/** 257/**
259 * struct wimax_dev - Generic WiMAX device 258 * struct wimax_dev - Generic WiMAX device
@@ -293,8 +292,8 @@ struct input_dev;
293 * See wimax_reset()'s documentation. 292 * See wimax_reset()'s documentation.
294 * 293 *
295 * @name: [fill] A way to identify this device. We need to register a 294 * @name: [fill] A way to identify this device. We need to register a
296 * name with many subsystems (input for RFKILL, workqueue 295 * name with many subsystems (rfkill, workqueue creation, etc).
297 * creation, etc). We can't use the network device name as that 296 * We can't use the network device name as that
298 * might change and in some instances we don't know it yet (until 297 * might change and in some instances we don't know it yet (until
299 * we don't call register_netdev()). So we generate an unique one 298 * we don't call register_netdev()). So we generate an unique one
300 * using the driver name and device bus id, place it here and use 299 * using the driver name and device bus id, place it here and use
@@ -316,9 +315,6 @@ struct input_dev;
316 * 315 *
317 * @rfkill: [private] integration into the RF-Kill infrastructure. 316 * @rfkill: [private] integration into the RF-Kill infrastructure.
318 * 317 *
319 * @rfkill_input: [private] virtual input device to process the
320 * hardware RF Kill switches.
321 *
322 * @rf_sw: [private] State of the software radio switch (OFF/ON) 318 * @rf_sw: [private] State of the software radio switch (OFF/ON)
323 * 319 *
324 * @rf_hw: [private] State of the hardware radio switch (OFF/ON) 320 * @rf_hw: [private] State of the hardware radio switch (OFF/ON)