diff options
author | John W. Linville <linville@tuxdriver.com> | 2012-11-16 13:59:51 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-11-16 13:59:51 -0500 |
commit | 0f62248501cbf5047486601d7e39d5ee36d478c2 (patch) | |
tree | 66119712683a8e1d4d4339d72864ceeb7e1806f0 /include/net | |
parent | b8d9e572cb8794335fb4ba63ff962acaa3c4473b (diff) | |
parent | 6352c87ff69daa2211419ec2c34ddb8bc116c505 (diff) |
Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/cfg80211.h | 38 | ||||
-rw-r--r-- | include/net/mac80211.h | 53 |
2 files changed, 83 insertions, 8 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index c6964572890f..81d725038f97 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
@@ -1545,13 +1545,19 @@ struct cfg80211_gtk_rekey_data { | |||
1545 | * to a merge. | 1545 | * to a merge. |
1546 | * @leave_ibss: Leave the IBSS. | 1546 | * @leave_ibss: Leave the IBSS. |
1547 | * | 1547 | * |
1548 | * @set_mcast_rate: Set the specified multicast rate (only if vif is in ADHOC or | ||
1549 | * MESH mode) | ||
1550 | * | ||
1548 | * @set_wiphy_params: Notify that wiphy parameters have changed; | 1551 | * @set_wiphy_params: Notify that wiphy parameters have changed; |
1549 | * @changed bitfield (see &enum wiphy_params_flags) describes which values | 1552 | * @changed bitfield (see &enum wiphy_params_flags) describes which values |
1550 | * have changed. The actual parameter values are available in | 1553 | * have changed. The actual parameter values are available in |
1551 | * struct wiphy. If returning an error, no value should be changed. | 1554 | * struct wiphy. If returning an error, no value should be changed. |
1552 | * | 1555 | * |
1553 | * @set_tx_power: set the transmit power according to the parameters, | 1556 | * @set_tx_power: set the transmit power according to the parameters, |
1554 | * the power passed is in mBm, to get dBm use MBM_TO_DBM(). | 1557 | * the power passed is in mBm, to get dBm use MBM_TO_DBM(). The |
1558 | * wdev may be %NULL if power was set for the wiphy, and will | ||
1559 | * always be %NULL unless the driver supports per-vif TX power | ||
1560 | * (as advertised by the nl80211 feature flag.) | ||
1555 | * @get_tx_power: store the current TX power into the dbm variable; | 1561 | * @get_tx_power: store the current TX power into the dbm variable; |
1556 | * return 0 if successful | 1562 | * return 0 if successful |
1557 | * | 1563 | * |
@@ -1746,11 +1752,15 @@ struct cfg80211_ops { | |||
1746 | struct cfg80211_ibss_params *params); | 1752 | struct cfg80211_ibss_params *params); |
1747 | int (*leave_ibss)(struct wiphy *wiphy, struct net_device *dev); | 1753 | int (*leave_ibss)(struct wiphy *wiphy, struct net_device *dev); |
1748 | 1754 | ||
1755 | int (*set_mcast_rate)(struct wiphy *wiphy, struct net_device *dev, | ||
1756 | int rate[IEEE80211_NUM_BANDS]); | ||
1757 | |||
1749 | int (*set_wiphy_params)(struct wiphy *wiphy, u32 changed); | 1758 | int (*set_wiphy_params)(struct wiphy *wiphy, u32 changed); |
1750 | 1759 | ||
1751 | int (*set_tx_power)(struct wiphy *wiphy, | 1760 | int (*set_tx_power)(struct wiphy *wiphy, struct wireless_dev *wdev, |
1752 | enum nl80211_tx_power_setting type, int mbm); | 1761 | enum nl80211_tx_power_setting type, int mbm); |
1753 | int (*get_tx_power)(struct wiphy *wiphy, int *dbm); | 1762 | int (*get_tx_power)(struct wiphy *wiphy, struct wireless_dev *wdev, |
1763 | int *dbm); | ||
1754 | 1764 | ||
1755 | int (*set_wds_peer)(struct wiphy *wiphy, struct net_device *dev, | 1765 | int (*set_wds_peer)(struct wiphy *wiphy, struct net_device *dev, |
1756 | const u8 *addr); | 1766 | const u8 *addr); |
@@ -3550,7 +3560,6 @@ void cfg80211_probe_status(struct net_device *dev, const u8 *addr, | |||
3550 | * @len: length of the frame | 3560 | * @len: length of the frame |
3551 | * @freq: frequency the frame was received on | 3561 | * @freq: frequency the frame was received on |
3552 | * @sig_dbm: signal strength in mBm, or 0 if unknown | 3562 | * @sig_dbm: signal strength in mBm, or 0 if unknown |
3553 | * @gfp: allocation flags | ||
3554 | * | 3563 | * |
3555 | * Use this function to report to userspace when a beacon was | 3564 | * Use this function to report to userspace when a beacon was |
3556 | * received. It is not useful to call this when there is no | 3565 | * received. It is not useful to call this when there is no |
@@ -3558,7 +3567,7 @@ void cfg80211_probe_status(struct net_device *dev, const u8 *addr, | |||
3558 | */ | 3567 | */ |
3559 | void cfg80211_report_obss_beacon(struct wiphy *wiphy, | 3568 | void cfg80211_report_obss_beacon(struct wiphy *wiphy, |
3560 | const u8 *frame, size_t len, | 3569 | const u8 *frame, size_t len, |
3561 | int freq, int sig_dbm, gfp_t gfp); | 3570 | int freq, int sig_dbm); |
3562 | 3571 | ||
3563 | /** | 3572 | /** |
3564 | * cfg80211_can_beacon_sec_chan - test if ht40 on extension channel can be used | 3573 | * cfg80211_can_beacon_sec_chan - test if ht40 on extension channel can be used |
@@ -3608,6 +3617,25 @@ u32 cfg80211_calculate_bitrate(struct rate_info *rate); | |||
3608 | */ | 3617 | */ |
3609 | void cfg80211_unregister_wdev(struct wireless_dev *wdev); | 3618 | void cfg80211_unregister_wdev(struct wireless_dev *wdev); |
3610 | 3619 | ||
3620 | /** | ||
3621 | * cfg80211_get_p2p_attr - find and copy a P2P attribute from IE buffer | ||
3622 | * @ies: the input IE buffer | ||
3623 | * @len: the input length | ||
3624 | * @attr: the attribute ID to find | ||
3625 | * @buf: output buffer, can be %NULL if the data isn't needed, e.g. | ||
3626 | * if the function is only called to get the needed buffer size | ||
3627 | * @bufsize: size of the output buffer | ||
3628 | * | ||
3629 | * The function finds a given P2P attribute in the (vendor) IEs and | ||
3630 | * copies its contents to the given buffer. | ||
3631 | * | ||
3632 | * The return value is a negative error code (-%EILSEQ or -%ENOENT) if | ||
3633 | * the data is malformed or the attribute can't be found (respectively), | ||
3634 | * or the length of the found attribute (which can be zero). | ||
3635 | */ | ||
3636 | unsigned int cfg80211_get_p2p_attr(const u8 *ies, unsigned int len, | ||
3637 | u8 attr, u8 *buf, unsigned int bufsize); | ||
3638 | |||
3611 | /* Logging, debugging and troubleshooting/diagnostic helpers. */ | 3639 | /* Logging, debugging and troubleshooting/diagnostic helpers. */ |
3612 | 3640 | ||
3613 | /* wiphy_printk helpers, similar to dev_printk */ | 3641 | /* wiphy_printk helpers, similar to dev_printk */ |
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 00b7204708bd..a789dd1d4c10 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -207,6 +207,9 @@ struct ieee80211_chanctx_conf { | |||
207 | * @BSS_CHANGED_SSID: SSID changed for this BSS (AP mode) | 207 | * @BSS_CHANGED_SSID: SSID changed for this BSS (AP mode) |
208 | * @BSS_CHANGED_AP_PROBE_RESP: Probe Response changed for this BSS (AP mode) | 208 | * @BSS_CHANGED_AP_PROBE_RESP: Probe Response changed for this BSS (AP mode) |
209 | * @BSS_CHANGED_PS: PS changed for this BSS (STA mode) | 209 | * @BSS_CHANGED_PS: PS changed for this BSS (STA mode) |
210 | * @BSS_CHANGED_TXPOWER: TX power setting changed for this interface | ||
211 | * @BSS_CHANGED_P2P_PS: P2P powersave settings (CTWindow, opportunistic PS) | ||
212 | * changed (currently only in P2P client mode, GO mode will be later) | ||
210 | */ | 213 | */ |
211 | enum ieee80211_bss_change { | 214 | enum ieee80211_bss_change { |
212 | BSS_CHANGED_ASSOC = 1<<0, | 215 | BSS_CHANGED_ASSOC = 1<<0, |
@@ -227,6 +230,8 @@ enum ieee80211_bss_change { | |||
227 | BSS_CHANGED_SSID = 1<<15, | 230 | BSS_CHANGED_SSID = 1<<15, |
228 | BSS_CHANGED_AP_PROBE_RESP = 1<<16, | 231 | BSS_CHANGED_AP_PROBE_RESP = 1<<16, |
229 | BSS_CHANGED_PS = 1<<17, | 232 | BSS_CHANGED_PS = 1<<17, |
233 | BSS_CHANGED_TXPOWER = 1<<18, | ||
234 | BSS_CHANGED_P2P_PS = 1<<19, | ||
230 | 235 | ||
231 | /* when adding here, make sure to change ieee80211_reconfig */ | 236 | /* when adding here, make sure to change ieee80211_reconfig */ |
232 | }; | 237 | }; |
@@ -309,6 +314,9 @@ enum ieee80211_rssi_event { | |||
309 | * @ssid: The SSID of the current vif. Only valid in AP-mode. | 314 | * @ssid: The SSID of the current vif. Only valid in AP-mode. |
310 | * @ssid_len: Length of SSID given in @ssid. | 315 | * @ssid_len: Length of SSID given in @ssid. |
311 | * @hidden_ssid: The SSID of the current vif is hidden. Only valid in AP-mode. | 316 | * @hidden_ssid: The SSID of the current vif is hidden. Only valid in AP-mode. |
317 | * @txpower: TX power in dBm | ||
318 | * @p2p_ctwindow: P2P CTWindow, only for P2P client interfaces | ||
319 | * @p2p_oppps: P2P opportunistic PS is enabled | ||
312 | */ | 320 | */ |
313 | struct ieee80211_bss_conf { | 321 | struct ieee80211_bss_conf { |
314 | const u8 *bssid; | 322 | const u8 *bssid; |
@@ -341,6 +349,9 @@ struct ieee80211_bss_conf { | |||
341 | u8 ssid[IEEE80211_MAX_SSID_LEN]; | 349 | u8 ssid[IEEE80211_MAX_SSID_LEN]; |
342 | size_t ssid_len; | 350 | size_t ssid_len; |
343 | bool hidden_ssid; | 351 | bool hidden_ssid; |
352 | int txpower; | ||
353 | u8 p2p_ctwindow; | ||
354 | bool p2p_oppps; | ||
344 | }; | 355 | }; |
345 | 356 | ||
346 | /** | 357 | /** |
@@ -884,7 +895,8 @@ enum ieee80211_smps_mode { | |||
884 | * powersave documentation below. This variable is valid only when | 895 | * powersave documentation below. This variable is valid only when |
885 | * the CONF_PS flag is set. | 896 | * the CONF_PS flag is set. |
886 | * | 897 | * |
887 | * @power_level: requested transmit power (in dBm) | 898 | * @power_level: requested transmit power (in dBm), backward compatibility |
899 | * value only that is set to the minimum of all interfaces | ||
888 | * | 900 | * |
889 | * @channel: the channel to tune to | 901 | * @channel: the channel to tune to |
890 | * @channel_type: the channel (HT) type | 902 | * @channel_type: the channel (HT) type |
@@ -2381,6 +2393,17 @@ enum ieee80211_rate_control_changed { | |||
2381 | * to vif. Possible use is for hw queue remapping. | 2393 | * to vif. Possible use is for hw queue remapping. |
2382 | * @unassign_vif_chanctx: Notifies device driver about channel context being | 2394 | * @unassign_vif_chanctx: Notifies device driver about channel context being |
2383 | * unbound from vif. | 2395 | * unbound from vif. |
2396 | * @start_ap: Start operation on the AP interface, this is called after all the | ||
2397 | * information in bss_conf is set and beacon can be retrieved. A channel | ||
2398 | * context is bound before this is called. Note that if the driver uses | ||
2399 | * software scan or ROC, this (and @stop_ap) isn't called when the AP is | ||
2400 | * just "paused" for scanning/ROC, which is indicated by the beacon being | ||
2401 | * disabled/enabled via @bss_info_changed. | ||
2402 | * @stop_ap: Stop operation on the AP interface. | ||
2403 | * | ||
2404 | * @restart_complete: Called after a call to ieee80211_restart_hw(), when the | ||
2405 | * reconfiguration has completed. This can help the driver implement the | ||
2406 | * reconfiguration step. This callback may sleep. | ||
2384 | */ | 2407 | */ |
2385 | struct ieee80211_ops { | 2408 | struct ieee80211_ops { |
2386 | void (*tx)(struct ieee80211_hw *hw, | 2409 | void (*tx)(struct ieee80211_hw *hw, |
@@ -2406,6 +2429,9 @@ struct ieee80211_ops { | |||
2406 | struct ieee80211_bss_conf *info, | 2429 | struct ieee80211_bss_conf *info, |
2407 | u32 changed); | 2430 | u32 changed); |
2408 | 2431 | ||
2432 | int (*start_ap)(struct ieee80211_hw *hw, struct ieee80211_vif *vif); | ||
2433 | void (*stop_ap)(struct ieee80211_hw *hw, struct ieee80211_vif *vif); | ||
2434 | |||
2409 | u64 (*prepare_multicast)(struct ieee80211_hw *hw, | 2435 | u64 (*prepare_multicast)(struct ieee80211_hw *hw, |
2410 | struct netdev_hw_addr_list *mc_list); | 2436 | struct netdev_hw_addr_list *mc_list); |
2411 | void (*configure_filter)(struct ieee80211_hw *hw, | 2437 | void (*configure_filter)(struct ieee80211_hw *hw, |
@@ -2539,6 +2565,8 @@ struct ieee80211_ops { | |||
2539 | void (*unassign_vif_chanctx)(struct ieee80211_hw *hw, | 2565 | void (*unassign_vif_chanctx)(struct ieee80211_hw *hw, |
2540 | struct ieee80211_vif *vif, | 2566 | struct ieee80211_vif *vif, |
2541 | struct ieee80211_chanctx_conf *ctx); | 2567 | struct ieee80211_chanctx_conf *ctx); |
2568 | |||
2569 | void (*restart_complete)(struct ieee80211_hw *hw); | ||
2542 | }; | 2570 | }; |
2543 | 2571 | ||
2544 | /** | 2572 | /** |
@@ -3385,6 +3413,21 @@ void ieee80211_sched_scan_results(struct ieee80211_hw *hw); | |||
3385 | void ieee80211_sched_scan_stopped(struct ieee80211_hw *hw); | 3413 | void ieee80211_sched_scan_stopped(struct ieee80211_hw *hw); |
3386 | 3414 | ||
3387 | /** | 3415 | /** |
3416 | * enum ieee80211_interface_iteration_flags - interface iteration flags | ||
3417 | * @IEEE80211_IFACE_ITER_NORMAL: Iterate over all interfaces that have | ||
3418 | * been added to the driver; However, note that during hardware | ||
3419 | * reconfiguration (after restart_hw) it will iterate over a new | ||
3420 | * interface and over all the existing interfaces even if they | ||
3421 | * haven't been re-added to the driver yet. | ||
3422 | * @IEEE80211_IFACE_ITER_RESUME_ALL: During resume, iterate over all | ||
3423 | * interfaces, even if they haven't been re-added to the driver yet. | ||
3424 | */ | ||
3425 | enum ieee80211_interface_iteration_flags { | ||
3426 | IEEE80211_IFACE_ITER_NORMAL = 0, | ||
3427 | IEEE80211_IFACE_ITER_RESUME_ALL = BIT(0), | ||
3428 | }; | ||
3429 | |||
3430 | /** | ||
3388 | * ieee80211_iterate_active_interfaces - iterate active interfaces | 3431 | * ieee80211_iterate_active_interfaces - iterate active interfaces |
3389 | * | 3432 | * |
3390 | * This function iterates over the interfaces associated with a given | 3433 | * This function iterates over the interfaces associated with a given |
@@ -3392,13 +3435,15 @@ void ieee80211_sched_scan_stopped(struct ieee80211_hw *hw); | |||
3392 | * This function allows the iterator function to sleep, when the iterator | 3435 | * This function allows the iterator function to sleep, when the iterator |
3393 | * function is atomic @ieee80211_iterate_active_interfaces_atomic can | 3436 | * function is atomic @ieee80211_iterate_active_interfaces_atomic can |
3394 | * be used. | 3437 | * be used. |
3395 | * Does not iterate over a new interface during add_interface() | 3438 | * Does not iterate over a new interface during add_interface(). |
3396 | * | 3439 | * |
3397 | * @hw: the hardware struct of which the interfaces should be iterated over | 3440 | * @hw: the hardware struct of which the interfaces should be iterated over |
3441 | * @iter_flags: iteration flags, see &enum ieee80211_interface_iteration_flags | ||
3398 | * @iterator: the iterator function to call | 3442 | * @iterator: the iterator function to call |
3399 | * @data: first argument of the iterator function | 3443 | * @data: first argument of the iterator function |
3400 | */ | 3444 | */ |
3401 | void ieee80211_iterate_active_interfaces(struct ieee80211_hw *hw, | 3445 | void ieee80211_iterate_active_interfaces(struct ieee80211_hw *hw, |
3446 | u32 iter_flags, | ||
3402 | void (*iterator)(void *data, u8 *mac, | 3447 | void (*iterator)(void *data, u8 *mac, |
3403 | struct ieee80211_vif *vif), | 3448 | struct ieee80211_vif *vif), |
3404 | void *data); | 3449 | void *data); |
@@ -3410,13 +3455,15 @@ void ieee80211_iterate_active_interfaces(struct ieee80211_hw *hw, | |||
3410 | * hardware that are currently active and calls the callback for them. | 3455 | * hardware that are currently active and calls the callback for them. |
3411 | * This function requires the iterator callback function to be atomic, | 3456 | * This function requires the iterator callback function to be atomic, |
3412 | * if that is not desired, use @ieee80211_iterate_active_interfaces instead. | 3457 | * if that is not desired, use @ieee80211_iterate_active_interfaces instead. |
3413 | * Does not iterate over a new interface during add_interface() | 3458 | * Does not iterate over a new interface during add_interface(). |
3414 | * | 3459 | * |
3415 | * @hw: the hardware struct of which the interfaces should be iterated over | 3460 | * @hw: the hardware struct of which the interfaces should be iterated over |
3461 | * @iter_flags: iteration flags, see &enum ieee80211_interface_iteration_flags | ||
3416 | * @iterator: the iterator function to call, cannot sleep | 3462 | * @iterator: the iterator function to call, cannot sleep |
3417 | * @data: first argument of the iterator function | 3463 | * @data: first argument of the iterator function |
3418 | */ | 3464 | */ |
3419 | void ieee80211_iterate_active_interfaces_atomic(struct ieee80211_hw *hw, | 3465 | void ieee80211_iterate_active_interfaces_atomic(struct ieee80211_hw *hw, |
3466 | u32 iter_flags, | ||
3420 | void (*iterator)(void *data, | 3467 | void (*iterator)(void *data, |
3421 | u8 *mac, | 3468 | u8 *mac, |
3422 | struct ieee80211_vif *vif), | 3469 | struct ieee80211_vif *vif), |