aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlegacy/iwl-sta.h
diff options
context:
space:
mode:
authorStanislaw Gruszka <sgruszka@redhat.com>2011-10-24 09:41:30 -0400
committerStanislaw Gruszka <sgruszka@redhat.com>2011-11-15 05:16:58 -0500
commite2ebc8337d116acdc25469ec8547ae665f50a4c1 (patch)
treecf4401fdbf6dabbd2731d90e3105c1ebbf60f87d /drivers/net/wireless/iwlegacy/iwl-sta.h
parentfee005e5dd82a43546c1b1beb187e82415360940 (diff)
iwlegacy: rename iwl to il
iwl_legacy prefix result in long function names, what cause that we have frequent line split and not readable code. Also iwl_foo symbols are duplicated in iwlwifi driver, what is annoying when editing kernel tree with cscope. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Diffstat (limited to 'drivers/net/wireless/iwlegacy/iwl-sta.h')
-rw-r--r--drivers/net/wireless/iwlegacy/iwl-sta.h78
1 files changed, 39 insertions, 39 deletions
diff --git a/drivers/net/wireless/iwlegacy/iwl-sta.h b/drivers/net/wireless/iwlegacy/iwl-sta.h
index 67bd75fe01a1..555b0602cea0 100644
--- a/drivers/net/wireless/iwlegacy/iwl-sta.h
+++ b/drivers/net/wireless/iwlegacy/iwl-sta.h
@@ -26,65 +26,65 @@
26 * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 26 * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
27 * 27 *
28 *****************************************************************************/ 28 *****************************************************************************/
29#ifndef __iwl_legacy_sta_h__ 29#ifndef __il_sta_h__
30#define __iwl_legacy_sta_h__ 30#define __il_sta_h__
31 31
32#include "iwl-dev.h" 32#include "iwl-dev.h"
33 33
34#define HW_KEY_DYNAMIC 0 34#define HW_KEY_DYNAMIC 0
35#define HW_KEY_DEFAULT 1 35#define HW_KEY_DEFAULT 1
36 36
37#define IWL_STA_DRIVER_ACTIVE BIT(0) /* driver entry is active */ 37#define IL_STA_DRIVER_ACTIVE BIT(0) /* driver entry is active */
38#define IWL_STA_UCODE_ACTIVE BIT(1) /* ucode entry is active */ 38#define IL_STA_UCODE_ACTIVE BIT(1) /* ucode entry is active */
39#define IWL_STA_UCODE_INPROGRESS BIT(2) /* ucode entry is in process of 39#define IL_STA_UCODE_INPROGRESS BIT(2) /* ucode entry is in process of
40 being activated */ 40 being activated */
41#define IWL_STA_LOCAL BIT(3) /* station state not directed by mac80211; 41#define IL_STA_LOCAL BIT(3) /* station state not directed by mac80211;
42 (this is for the IBSS BSSID stations) */ 42 (this is for the IBSS BSSID stations) */
43#define IWL_STA_BCAST BIT(4) /* this station is the special bcast station */ 43#define IL_STA_BCAST BIT(4) /* this station is the special bcast station */
44 44
45 45
46void iwl_legacy_restore_stations(struct iwl_priv *priv, 46void il_restore_stations(struct il_priv *priv,
47 struct iwl_rxon_context *ctx); 47 struct il_rxon_context *ctx);
48void iwl_legacy_clear_ucode_stations(struct iwl_priv *priv, 48void il_clear_ucode_stations(struct il_priv *priv,
49 struct iwl_rxon_context *ctx); 49 struct il_rxon_context *ctx);
50void iwl_legacy_dealloc_bcast_stations(struct iwl_priv *priv); 50void il_dealloc_bcast_stations(struct il_priv *priv);
51int iwl_legacy_get_free_ucode_key_index(struct iwl_priv *priv); 51int il_get_free_ucode_key_index(struct il_priv *priv);
52int iwl_legacy_send_add_sta(struct iwl_priv *priv, 52int il_send_add_sta(struct il_priv *priv,
53 struct iwl_legacy_addsta_cmd *sta, u8 flags); 53 struct il_addsta_cmd *sta, u8 flags);
54int iwl_legacy_add_station_common(struct iwl_priv *priv, 54int il_add_station_common(struct il_priv *priv,
55 struct iwl_rxon_context *ctx, 55 struct il_rxon_context *ctx,
56 const u8 *addr, bool is_ap, 56 const u8 *addr, bool is_ap,
57 struct ieee80211_sta *sta, u8 *sta_id_r); 57 struct ieee80211_sta *sta, u8 *sta_id_r);
58int iwl_legacy_remove_station(struct iwl_priv *priv, 58int il_remove_station(struct il_priv *priv,
59 const u8 sta_id, 59 const u8 sta_id,
60 const u8 *addr); 60 const u8 *addr);
61int iwl_legacy_mac_sta_remove(struct ieee80211_hw *hw, 61int il_mac_sta_remove(struct ieee80211_hw *hw,
62 struct ieee80211_vif *vif, 62 struct ieee80211_vif *vif,
63 struct ieee80211_sta *sta); 63 struct ieee80211_sta *sta);
64 64
65u8 iwl_legacy_prep_station(struct iwl_priv *priv, 65u8 il_prep_station(struct il_priv *priv,
66 struct iwl_rxon_context *ctx, 66 struct il_rxon_context *ctx,
67 const u8 *addr, bool is_ap, 67 const u8 *addr, bool is_ap,
68 struct ieee80211_sta *sta); 68 struct ieee80211_sta *sta);
69 69
70int iwl_legacy_send_lq_cmd(struct iwl_priv *priv, 70int il_send_lq_cmd(struct il_priv *priv,
71 struct iwl_rxon_context *ctx, 71 struct il_rxon_context *ctx,
72 struct iwl_link_quality_cmd *lq, 72 struct il_link_quality_cmd *lq,
73 u8 flags, bool init); 73 u8 flags, bool init);
74 74
75/** 75/**
76 * iwl_legacy_clear_driver_stations - clear knowledge of all stations from driver 76 * il_clear_driver_stations - clear knowledge of all stations from driver
77 * @priv: iwl priv struct 77 * @priv: iwl priv struct
78 * 78 *
79 * This is called during iwl_down() to make sure that in the case 79 * This is called during il_down() to make sure that in the case
80 * we're coming there from a hardware restart mac80211 will be 80 * we're coming there from a hardware restart mac80211 will be
81 * able to reconfigure stations -- if we're getting there in the 81 * able to reconfigure stations -- if we're getting there in the
82 * normal down flow then the stations will already be cleared. 82 * normal down flow then the stations will already be cleared.
83 */ 83 */
84static inline void iwl_legacy_clear_driver_stations(struct iwl_priv *priv) 84static inline void il_clear_driver_stations(struct il_priv *priv)
85{ 85{
86 unsigned long flags; 86 unsigned long flags;
87 struct iwl_rxon_context *ctx; 87 struct il_rxon_context *ctx;
88 88
89 spin_lock_irqsave(&priv->sta_lock, flags); 89 spin_lock_irqsave(&priv->sta_lock, flags);
90 memset(priv->stations, 0, sizeof(priv->stations)); 90 memset(priv->stations, 0, sizeof(priv->stations));
@@ -107,16 +107,16 @@ static inline void iwl_legacy_clear_driver_stations(struct iwl_priv *priv)
107 spin_unlock_irqrestore(&priv->sta_lock, flags); 107 spin_unlock_irqrestore(&priv->sta_lock, flags);
108} 108}
109 109
110static inline int iwl_legacy_sta_id(struct ieee80211_sta *sta) 110static inline int il_sta_id(struct ieee80211_sta *sta)
111{ 111{
112 if (WARN_ON(!sta)) 112 if (WARN_ON(!sta))
113 return IWL_INVALID_STATION; 113 return IL_INVALID_STATION;
114 114
115 return ((struct iwl_station_priv_common *)sta->drv_priv)->sta_id; 115 return ((struct il_station_priv_common *)sta->drv_priv)->sta_id;
116} 116}
117 117
118/** 118/**
119 * iwl_legacy_sta_id_or_broadcast - return sta_id or broadcast sta 119 * il_sta_id_or_broadcast - return sta_id or broadcast sta
120 * @priv: iwl priv 120 * @priv: iwl priv
121 * @context: the current context 121 * @context: the current context
122 * @sta: mac80211 station 122 * @sta: mac80211 station
@@ -126,8 +126,8 @@ static inline int iwl_legacy_sta_id(struct ieee80211_sta *sta)
126 * that case, we need to use the broadcast station, so this 126 * that case, we need to use the broadcast station, so this
127 * inline wraps that pattern. 127 * inline wraps that pattern.
128 */ 128 */
129static inline int iwl_legacy_sta_id_or_broadcast(struct iwl_priv *priv, 129static inline int il_sta_id_or_broadcast(struct il_priv *priv,
130 struct iwl_rxon_context *context, 130 struct il_rxon_context *context,
131 struct ieee80211_sta *sta) 131 struct ieee80211_sta *sta)
132{ 132{
133 int sta_id; 133 int sta_id;
@@ -135,14 +135,14 @@ static inline int iwl_legacy_sta_id_or_broadcast(struct iwl_priv *priv,
135 if (!sta) 135 if (!sta)
136 return context->bcast_sta_id; 136 return context->bcast_sta_id;
137 137
138 sta_id = iwl_legacy_sta_id(sta); 138 sta_id = il_sta_id(sta);
139 139
140 /* 140 /*
141 * mac80211 should not be passing a partially 141 * mac80211 should not be passing a partially
142 * initialised station! 142 * initialised station!
143 */ 143 */
144 WARN_ON(sta_id == IWL_INVALID_STATION); 144 WARN_ON(sta_id == IL_INVALID_STATION);
145 145
146 return sta_id; 146 return sta_id;
147} 147}
148#endif /* __iwl_legacy_sta_h__ */ 148#endif /* __il_sta_h__ */