~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/net/mac80211/rate.h

Version: ~ [ linux-5.9 ] ~ [ linux-5.8.14 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.70 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.150 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.200 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.238 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.238 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.140 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.85 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0-only */
  2 /*
  3  * Copyright 2002-2005, Instant802 Networks, Inc.
  4  * Copyright 2005, Devicescape Software, Inc.
  5  * Copyright (c) 2006 Jiri Benc <jbenc@suse.cz>
  6  */
  7 
  8 #ifndef IEEE80211_RATE_H
  9 #define IEEE80211_RATE_H
 10 
 11 #include <linux/netdevice.h>
 12 #include <linux/skbuff.h>
 13 #include <linux/types.h>
 14 #include <net/mac80211.h>
 15 #include "ieee80211_i.h"
 16 #include "sta_info.h"
 17 #include "driver-ops.h"
 18 
 19 struct rate_control_ref {
 20         const struct rate_control_ops *ops;
 21         void *priv;
 22 };
 23 
 24 void rate_control_get_rate(struct ieee80211_sub_if_data *sdata,
 25                            struct sta_info *sta,
 26                            struct ieee80211_tx_rate_control *txrc);
 27 
 28 void rate_control_tx_status(struct ieee80211_local *local,
 29                             struct ieee80211_supported_band *sband,
 30                             struct ieee80211_tx_status *st);
 31 
 32 void rate_control_rate_init(struct sta_info *sta);
 33 void rate_control_rate_update(struct ieee80211_local *local,
 34                                     struct ieee80211_supported_band *sband,
 35                                     struct sta_info *sta, u32 changed);
 36 
 37 static inline void *rate_control_alloc_sta(struct rate_control_ref *ref,
 38                                            struct sta_info *sta, gfp_t gfp)
 39 {
 40         spin_lock_init(&sta->rate_ctrl_lock);
 41         return ref->ops->alloc_sta(ref->priv, &sta->sta, gfp);
 42 }
 43 
 44 static inline void rate_control_free_sta(struct sta_info *sta)
 45 {
 46         struct rate_control_ref *ref = sta->rate_ctrl;
 47         struct ieee80211_sta *ista = &sta->sta;
 48         void *priv_sta = sta->rate_ctrl_priv;
 49 
 50         ref->ops->free_sta(ref->priv, ista, priv_sta);
 51 }
 52 
 53 static inline void rate_control_add_sta_debugfs(struct sta_info *sta)
 54 {
 55 #ifdef CONFIG_MAC80211_DEBUGFS
 56         struct rate_control_ref *ref = sta->rate_ctrl;
 57         if (ref && sta->debugfs_dir && ref->ops->add_sta_debugfs)
 58                 ref->ops->add_sta_debugfs(ref->priv, sta->rate_ctrl_priv,
 59                                           sta->debugfs_dir);
 60 #endif
 61 }
 62 
 63 static inline void rate_control_remove_sta_debugfs(struct sta_info *sta)
 64 {
 65 #ifdef CONFIG_MAC80211_DEBUGFS
 66         struct rate_control_ref *ref = sta->rate_ctrl;
 67         if (ref && ref->ops->remove_sta_debugfs)
 68                 ref->ops->remove_sta_debugfs(ref->priv, sta->rate_ctrl_priv);
 69 #endif
 70 }
 71 
 72 void ieee80211_check_rate_mask(struct ieee80211_sub_if_data *sdata);
 73 
 74 /* Get a reference to the rate control algorithm. If `name' is NULL, get the
 75  * first available algorithm. */
 76 int ieee80211_init_rate_ctrl_alg(struct ieee80211_local *local,
 77                                  const char *name);
 78 void rate_control_deinitialize(struct ieee80211_local *local);
 79 
 80 
 81 /* Rate control algorithms */
 82 #ifdef CONFIG_MAC80211_RC_MINSTREL
 83 int rc80211_minstrel_init(void);
 84 void rc80211_minstrel_exit(void);
 85 #else
 86 static inline int rc80211_minstrel_init(void)
 87 {
 88         return 0;
 89 }
 90 static inline void rc80211_minstrel_exit(void)
 91 {
 92 }
 93 #endif
 94 
 95 
 96 #endif /* IEEE80211_RATE_H */
 97 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp