mac80211: add explicit AP/GO driver operations
[firefly-linux-kernel-4.4.55.git] / include / net / mac80211.h
index 71c2f9c2f5bea84bed7930668c26215f29fc96b4..5f5327452c9a03122af32b2bb75c67c978b23d8a 100644 (file)
@@ -2381,6 +2381,13 @@ enum ieee80211_rate_control_changed {
  *     to vif. Possible use is for hw queue remapping.
  * @unassign_vif_chanctx: Notifies device driver about channel context being
  *     unbound from vif.
+ * @start_ap: Start operation on the AP interface, this is called after all the
+ *     information in bss_conf is set and beacon can be retrieved. A channel
+ *     context is bound before this is called. Note that if the driver uses
+ *     software scan or ROC, this (and @stop_ap) isn't called when the AP is
+ *     just "paused" for scanning/ROC, which is indicated by the beacon being
+ *     disabled/enabled via @bss_info_changed.
+ * @stop_ap: Stop operation on the AP interface.
  */
 struct ieee80211_ops {
        void (*tx)(struct ieee80211_hw *hw,
@@ -2406,6 +2413,9 @@ struct ieee80211_ops {
                                 struct ieee80211_bss_conf *info,
                                 u32 changed);
 
+       int (*start_ap)(struct ieee80211_hw *hw, struct ieee80211_vif *vif);
+       void (*stop_ap)(struct ieee80211_hw *hw, struct ieee80211_vif *vif);
+
        u64 (*prepare_multicast)(struct ieee80211_hw *hw,
                                 struct netdev_hw_addr_list *mc_list);
        void (*configure_filter)(struct ieee80211_hw *hw,
@@ -3222,6 +3232,19 @@ void ieee80211_get_tkip_rx_p1k(struct ieee80211_key_conf *keyconf,
 void ieee80211_get_tkip_p2k(struct ieee80211_key_conf *keyconf,
                            struct sk_buff *skb, u8 *p2k);
 
+/**
+ * ieee80211_aes_cmac_calculate_k1_k2 - calculate the AES-CMAC sub keys
+ *
+ * This function computes the two AES-CMAC sub-keys, based on the
+ * previously installed master key.
+ *
+ * @keyconf: the parameter passed with the set key
+ * @k1: a buffer to be filled with the 1st sub-key
+ * @k2: a buffer to be filled with the 2nd sub-key
+ */
+void ieee80211_aes_cmac_calculate_k1_k2(struct ieee80211_key_conf *keyconf,
+                                       u8 *k1, u8 *k2);
+
 /**
  * struct ieee80211_key_seq - key sequence counter
  *