diff options
Diffstat (limited to 'include/net/mac80211.h')
-rw-r--r-- | include/net/mac80211.h | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index ea2c8c36477c..9259e97864d7 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -1586,6 +1586,20 @@ enum ieee80211_ampdu_mlme_action { | |||
1586 | }; | 1586 | }; |
1587 | 1587 | ||
1588 | /** | 1588 | /** |
1589 | * enum ieee80211_tx_sync_type - TX sync type | ||
1590 | * @IEEE80211_TX_SYNC_AUTH: sync TX for authentication | ||
1591 | * (and possibly also before direct probe) | ||
1592 | * @IEEE80211_TX_SYNC_ASSOC: sync TX for association | ||
1593 | * @IEEE80211_TX_SYNC_ACTION: sync TX for action frame | ||
1594 | * (not implemented yet) | ||
1595 | */ | ||
1596 | enum ieee80211_tx_sync_type { | ||
1597 | IEEE80211_TX_SYNC_AUTH, | ||
1598 | IEEE80211_TX_SYNC_ASSOC, | ||
1599 | IEEE80211_TX_SYNC_ACTION, | ||
1600 | }; | ||
1601 | |||
1602 | /** | ||
1589 | * struct ieee80211_ops - callbacks from mac80211 to the driver | 1603 | * struct ieee80211_ops - callbacks from mac80211 to the driver |
1590 | * | 1604 | * |
1591 | * This structure contains various callbacks that the driver may | 1605 | * This structure contains various callbacks that the driver may |
@@ -1674,6 +1688,26 @@ enum ieee80211_ampdu_mlme_action { | |||
1674 | * of the bss parameters has changed when a call is made. The callback | 1688 | * of the bss parameters has changed when a call is made. The callback |
1675 | * can sleep. | 1689 | * can sleep. |
1676 | * | 1690 | * |
1691 | * @tx_sync: Called before a frame is sent to an AP/GO. In the GO case, the | ||
1692 | * driver should sync with the GO's powersaving so the device doesn't | ||
1693 | * transmit the frame while the GO is asleep. In the regular AP case | ||
1694 | * it may be used by drivers for devices implementing other restrictions | ||
1695 | * on talking to APs, e.g. due to regulatory enforcement or just HW | ||
1696 | * restrictions. | ||
1697 | * This function is called for every authentication, association and | ||
1698 | * action frame separately since applications might attempt to auth | ||
1699 | * with multiple APs before chosing one to associate to. If it returns | ||
1700 | * an error, the corresponding authentication, association or frame | ||
1701 | * transmission is aborted and reported as having failed. It is always | ||
1702 | * called after tuning to the correct channel. | ||
1703 | * The callback might be called multiple times before @finish_tx_sync | ||
1704 | * (but @finish_tx_sync will be called once for each) but in practice | ||
1705 | * this is unlikely to happen. It can also refuse in that case if the | ||
1706 | * driver cannot handle that situation. | ||
1707 | * This callback can sleep. | ||
1708 | * @finish_tx_sync: Called as a counterpart to @tx_sync, unless that returned | ||
1709 | * an error. This callback can sleep. | ||
1710 | * | ||
1677 | * @prepare_multicast: Prepare for multicast filter configuration. | 1711 | * @prepare_multicast: Prepare for multicast filter configuration. |
1678 | * This callback is optional, and its return value is passed | 1712 | * This callback is optional, and its return value is passed |
1679 | * to configure_filter(). This callback must be atomic. | 1713 | * to configure_filter(). This callback must be atomic. |
@@ -1901,6 +1935,14 @@ struct ieee80211_ops { | |||
1901 | struct ieee80211_vif *vif, | 1935 | struct ieee80211_vif *vif, |
1902 | struct ieee80211_bss_conf *info, | 1936 | struct ieee80211_bss_conf *info, |
1903 | u32 changed); | 1937 | u32 changed); |
1938 | |||
1939 | int (*tx_sync)(struct ieee80211_hw *hw, struct ieee80211_vif *vif, | ||
1940 | const u8 *bssid, enum ieee80211_tx_sync_type type); | ||
1941 | void (*finish_tx_sync)(struct ieee80211_hw *hw, | ||
1942 | struct ieee80211_vif *vif, | ||
1943 | const u8 *bssid, | ||
1944 | enum ieee80211_tx_sync_type type); | ||
1945 | |||
1904 | u64 (*prepare_multicast)(struct ieee80211_hw *hw, | 1946 | u64 (*prepare_multicast)(struct ieee80211_hw *hw, |
1905 | struct netdev_hw_addr_list *mc_list); | 1947 | struct netdev_hw_addr_list *mc_list); |
1906 | void (*configure_filter)(struct ieee80211_hw *hw, | 1948 | void (*configure_filter)(struct ieee80211_hw *hw, |
@@ -2613,6 +2655,20 @@ static inline void ieee80211_get_tkip_p1k(struct ieee80211_key_conf *keyconf, | |||
2613 | } | 2655 | } |
2614 | 2656 | ||
2615 | /** | 2657 | /** |
2658 | * ieee80211_get_tkip_rx_p1k - get a TKIP phase 1 key for RX | ||
2659 | * | ||
2660 | * This function returns the TKIP phase 1 key for the given IV32 | ||
2661 | * and transmitter address. | ||
2662 | * | ||
2663 | * @keyconf: the parameter passed with the set key | ||
2664 | * @ta: TA that will be used with the key | ||
2665 | * @iv32: IV32 to get the P1K for | ||
2666 | * @p1k: a buffer to which the key will be written, as 5 u16 values | ||
2667 | */ | ||
2668 | void ieee80211_get_tkip_rx_p1k(struct ieee80211_key_conf *keyconf, | ||
2669 | const u8 *ta, u32 iv32, u16 *p1k); | ||
2670 | |||
2671 | /** | ||
2616 | * ieee80211_get_tkip_p2k - get a TKIP phase 2 key | 2672 | * ieee80211_get_tkip_p2k - get a TKIP phase 2 key |
2617 | * | 2673 | * |
2618 | * This function computes the TKIP RC4 key for the IV values | 2674 | * This function computes the TKIP RC4 key for the IV values |
@@ -2973,6 +3029,10 @@ void ieee80211_sta_block_awake(struct ieee80211_hw *hw, | |||
2973 | * needs reprogramming of the keys during suspend. Note that due | 3029 | * needs reprogramming of the keys during suspend. Note that due |
2974 | * to locking reasons, it is also only safe to call this at few | 3030 | * to locking reasons, it is also only safe to call this at few |
2975 | * spots since it must hold the RTNL and be able to sleep. | 3031 | * spots since it must hold the RTNL and be able to sleep. |
3032 | * | ||
3033 | * The order in which the keys are iterated matches the order | ||
3034 | * in which they were originally installed and handed to the | ||
3035 | * set_key callback. | ||
2976 | */ | 3036 | */ |
2977 | void ieee80211_iter_keys(struct ieee80211_hw *hw, | 3037 | void ieee80211_iter_keys(struct ieee80211_hw *hw, |
2978 | struct ieee80211_vif *vif, | 3038 | struct ieee80211_vif *vif, |