cachepc-linux

Fork of AMDESE/linux with modifications for CachePC side-channel attack
git clone https://git.sinitax.com/sinitax/cachepc-linux
Log | Files | Refs | README | LICENSE | sfeed.txt

nl80211.h (4756B)


      1/* SPDX-License-Identifier: GPL-2.0 */
      2/*
      3 * Portions of this file
      4 * Copyright (C) 2018, 2020-2021 Intel Corporation
      5 */
      6#ifndef __NET_WIRELESS_NL80211_H
      7#define __NET_WIRELESS_NL80211_H
      8
      9#include "core.h"
     10
     11int nl80211_init(void);
     12void nl80211_exit(void);
     13
     14void *nl80211hdr_put(struct sk_buff *skb, u32 portid, u32 seq,
     15		     int flags, u8 cmd);
     16bool nl80211_put_sta_rate(struct sk_buff *msg, struct rate_info *info,
     17			  int attr);
     18
     19static inline u64 wdev_id(struct wireless_dev *wdev)
     20{
     21	return (u64)wdev->identifier |
     22	       ((u64)wiphy_to_rdev(wdev->wiphy)->wiphy_idx << 32);
     23}
     24
     25int nl80211_parse_chandef(struct cfg80211_registered_device *rdev,
     26			  struct genl_info *info,
     27			  struct cfg80211_chan_def *chandef);
     28int nl80211_parse_random_mac(struct nlattr **attrs,
     29			     u8 *mac_addr, u8 *mac_addr_mask);
     30
     31void nl80211_notify_wiphy(struct cfg80211_registered_device *rdev,
     32			  enum nl80211_commands cmd);
     33void nl80211_notify_iface(struct cfg80211_registered_device *rdev,
     34			  struct wireless_dev *wdev,
     35			  enum nl80211_commands cmd);
     36void nl80211_send_scan_start(struct cfg80211_registered_device *rdev,
     37			     struct wireless_dev *wdev);
     38struct sk_buff *nl80211_build_scan_msg(struct cfg80211_registered_device *rdev,
     39				       struct wireless_dev *wdev, bool aborted);
     40void nl80211_send_scan_msg(struct cfg80211_registered_device *rdev,
     41			   struct sk_buff *msg);
     42void nl80211_send_sched_scan(struct cfg80211_sched_scan_request *req, u32 cmd);
     43void nl80211_common_reg_change_event(enum nl80211_commands cmd_id,
     44				     struct regulatory_request *request);
     45
     46static inline void
     47nl80211_send_reg_change_event(struct regulatory_request *request)
     48{
     49	nl80211_common_reg_change_event(NL80211_CMD_REG_CHANGE, request);
     50}
     51
     52static inline void
     53nl80211_send_wiphy_reg_change_event(struct regulatory_request *request)
     54{
     55	nl80211_common_reg_change_event(NL80211_CMD_WIPHY_REG_CHANGE, request);
     56}
     57
     58void nl80211_send_rx_auth(struct cfg80211_registered_device *rdev,
     59			  struct net_device *netdev,
     60			  const u8 *buf, size_t len, gfp_t gfp);
     61void nl80211_send_rx_assoc(struct cfg80211_registered_device *rdev,
     62			   struct net_device *netdev,
     63			   const u8 *buf, size_t len, gfp_t gfp,
     64			   int uapsd_queues,
     65			   const u8 *req_ies, size_t req_ies_len);
     66void nl80211_send_deauth(struct cfg80211_registered_device *rdev,
     67			 struct net_device *netdev,
     68			 const u8 *buf, size_t len,
     69			 bool reconnect, gfp_t gfp);
     70void nl80211_send_disassoc(struct cfg80211_registered_device *rdev,
     71			   struct net_device *netdev,
     72			   const u8 *buf, size_t len,
     73			   bool reconnect, gfp_t gfp);
     74void nl80211_send_auth_timeout(struct cfg80211_registered_device *rdev,
     75			       struct net_device *netdev,
     76			       const u8 *addr, gfp_t gfp);
     77void nl80211_send_assoc_timeout(struct cfg80211_registered_device *rdev,
     78				struct net_device *netdev,
     79				const u8 *addr, gfp_t gfp);
     80void nl80211_send_connect_result(struct cfg80211_registered_device *rdev,
     81				 struct net_device *netdev,
     82				 struct cfg80211_connect_resp_params *params,
     83				 gfp_t gfp);
     84void nl80211_send_roamed(struct cfg80211_registered_device *rdev,
     85			 struct net_device *netdev,
     86			 struct cfg80211_roam_info *info, gfp_t gfp);
     87void nl80211_send_port_authorized(struct cfg80211_registered_device *rdev,
     88				  struct net_device *netdev, const u8 *bssid);
     89void nl80211_send_disconnected(struct cfg80211_registered_device *rdev,
     90			       struct net_device *netdev, u16 reason,
     91			       const u8 *ie, size_t ie_len, bool from_ap);
     92
     93void
     94nl80211_michael_mic_failure(struct cfg80211_registered_device *rdev,
     95			    struct net_device *netdev, const u8 *addr,
     96			    enum nl80211_key_type key_type,
     97			    int key_id, const u8 *tsc, gfp_t gfp);
     98
     99void
    100nl80211_send_beacon_hint_event(struct wiphy *wiphy,
    101			       struct ieee80211_channel *channel_before,
    102			       struct ieee80211_channel *channel_after);
    103
    104void nl80211_send_ibss_bssid(struct cfg80211_registered_device *rdev,
    105			     struct net_device *netdev, const u8 *bssid,
    106			     gfp_t gfp);
    107
    108int nl80211_send_mgmt(struct cfg80211_registered_device *rdev,
    109		      struct wireless_dev *wdev, u32 nlpid,
    110		      int freq, int sig_dbm,
    111		      const u8 *buf, size_t len, u32 flags, gfp_t gfp);
    112
    113void
    114nl80211_radar_notify(struct cfg80211_registered_device *rdev,
    115		     const struct cfg80211_chan_def *chandef,
    116		     enum nl80211_radar_event event,
    117		     struct net_device *netdev, gfp_t gfp);
    118
    119void nl80211_send_ap_stopped(struct wireless_dev *wdev);
    120
    121void cfg80211_rdev_free_coalesce(struct cfg80211_registered_device *rdev);
    122
    123/* peer measurement */
    124int nl80211_pmsr_start(struct sk_buff *skb, struct genl_info *info);
    125int nl80211_pmsr_dump_results(struct sk_buff *skb, struct netlink_callback *cb);
    126
    127#endif /* __NET_WIRELESS_NL80211_H */