linux/drivers/net/wireless/st/cw1200/sta.h
<<
>>
Prefs
   1/* SPDX-License-Identifier: GPL-2.0-only */
   2/*
   3 * Mac80211 STA interface for ST-Ericsson CW1200 mac80211 drivers
   4 *
   5 * Copyright (c) 2010, ST-Ericsson
   6 * Author: Dmitry Tarnyagin <dmitry.tarnyagin@lockless.no>
   7 */
   8
   9#ifndef STA_H_INCLUDED
  10#define STA_H_INCLUDED
  11
  12/* ******************************************************************** */
  13/* mac80211 API                                                         */
  14
  15int cw1200_start(struct ieee80211_hw *dev);
  16void cw1200_stop(struct ieee80211_hw *dev);
  17int cw1200_add_interface(struct ieee80211_hw *dev,
  18                         struct ieee80211_vif *vif);
  19void cw1200_remove_interface(struct ieee80211_hw *dev,
  20                             struct ieee80211_vif *vif);
  21int cw1200_change_interface(struct ieee80211_hw *dev,
  22                            struct ieee80211_vif *vif,
  23                            enum nl80211_iftype new_type,
  24                            bool p2p);
  25int cw1200_config(struct ieee80211_hw *dev, u32 changed);
  26void cw1200_configure_filter(struct ieee80211_hw *dev,
  27                             unsigned int changed_flags,
  28                             unsigned int *total_flags,
  29                             u64 multicast);
  30int cw1200_conf_tx(struct ieee80211_hw *dev, struct ieee80211_vif *vif,
  31                   u16 queue, const struct ieee80211_tx_queue_params *params);
  32int cw1200_get_stats(struct ieee80211_hw *dev,
  33                     struct ieee80211_low_level_stats *stats);
  34int cw1200_set_key(struct ieee80211_hw *dev, enum set_key_cmd cmd,
  35                   struct ieee80211_vif *vif, struct ieee80211_sta *sta,
  36                   struct ieee80211_key_conf *key);
  37
  38int cw1200_set_rts_threshold(struct ieee80211_hw *hw, u32 value);
  39
  40void cw1200_flush(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
  41                  u32 queues, bool drop);
  42
  43u64 cw1200_prepare_multicast(struct ieee80211_hw *hw,
  44                             struct netdev_hw_addr_list *mc_list);
  45
  46int cw1200_set_pm(struct cw1200_common *priv, const struct wsm_set_pm *arg);
  47
  48/* ******************************************************************** */
  49/* WSM callbacks                                                        */
  50
  51void cw1200_join_complete_cb(struct cw1200_common *priv,
  52                                struct wsm_join_complete *arg);
  53
  54/* ******************************************************************** */
  55/* WSM events                                                           */
  56
  57void cw1200_free_event_queue(struct cw1200_common *priv);
  58void cw1200_event_handler(struct work_struct *work);
  59void cw1200_bss_loss_work(struct work_struct *work);
  60void cw1200_bss_params_work(struct work_struct *work);
  61void cw1200_keep_alive_work(struct work_struct *work);
  62void cw1200_tx_failure_work(struct work_struct *work);
  63
  64void __cw1200_cqm_bssloss_sm(struct cw1200_common *priv, int init, int good,
  65                             int bad);
  66static inline void cw1200_cqm_bssloss_sm(struct cw1200_common *priv,
  67                                         int init, int good, int bad)
  68{
  69        spin_lock(&priv->bss_loss_lock);
  70        __cw1200_cqm_bssloss_sm(priv, init, good, bad);
  71        spin_unlock(&priv->bss_loss_lock);
  72}
  73
  74/* ******************************************************************** */
  75/* Internal API                                                         */
  76
  77int cw1200_setup_mac(struct cw1200_common *priv);
  78void cw1200_join_timeout(struct work_struct *work);
  79void cw1200_unjoin_work(struct work_struct *work);
  80void cw1200_join_complete_work(struct work_struct *work);
  81void cw1200_wep_key_work(struct work_struct *work);
  82void cw1200_update_listening(struct cw1200_common *priv, bool enabled);
  83void cw1200_update_filtering(struct cw1200_common *priv);
  84void cw1200_update_filtering_work(struct work_struct *work);
  85void cw1200_set_beacon_wakeup_period_work(struct work_struct *work);
  86int cw1200_enable_listening(struct cw1200_common *priv);
  87int cw1200_disable_listening(struct cw1200_common *priv);
  88int cw1200_set_uapsd_param(struct cw1200_common *priv,
  89                                const struct wsm_edca_params *arg);
  90void cw1200_ba_work(struct work_struct *work);
  91void cw1200_ba_timer(unsigned long arg);
  92
  93/* AP stuffs */
  94int cw1200_set_tim(struct ieee80211_hw *dev, struct ieee80211_sta *sta,
  95                   bool set);
  96int cw1200_sta_add(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
  97                   struct ieee80211_sta *sta);
  98int cw1200_sta_remove(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
  99                      struct ieee80211_sta *sta);
 100void cw1200_sta_notify(struct ieee80211_hw *dev, struct ieee80211_vif *vif,
 101                       enum sta_notify_cmd notify_cmd,
 102                       struct ieee80211_sta *sta);
 103void cw1200_bss_info_changed(struct ieee80211_hw *dev,
 104                             struct ieee80211_vif *vif,
 105                             struct ieee80211_bss_conf *info,
 106                             u32 changed);
 107int cw1200_ampdu_action(struct ieee80211_hw *hw,
 108                        struct ieee80211_vif *vif,
 109                        struct ieee80211_ampdu_params *params);
 110
 111void cw1200_suspend_resume(struct cw1200_common *priv,
 112                          struct wsm_suspend_resume *arg);
 113void cw1200_set_tim_work(struct work_struct *work);
 114void cw1200_set_cts_work(struct work_struct *work);
 115void cw1200_multicast_start_work(struct work_struct *work);
 116void cw1200_multicast_stop_work(struct work_struct *work);
 117void cw1200_mcast_timeout(struct timer_list *t);
 118
 119#endif
 120