]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
iwlagn: remove common station priv
authorJohannes Berg <johannes.berg@intel.com>
Tue, 20 Sep 2011 22:37:21 +0000 (15:37 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 21 Sep 2011 20:19:42 +0000 (16:19 -0400)
Since the driver split there's no more need for
shared/non-shared private station data so remove
struct iwl_station_priv_common entirely.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/iwlwifi/iwl-agn-rs.c
drivers/net/wireless/iwlwifi/iwl-agn.c
drivers/net/wireless/iwlwifi/iwl-dev.h
drivers/net/wireless/iwlwifi/iwl-sta.c
drivers/net/wireless/iwlwifi/iwl-sta.h

index ffee15ba06a8a53abf6c051713d6950f4011cad2..c14f8d6fd7d8d36878f071ba907ebe0661f5c848 100644 (file)
@@ -346,7 +346,7 @@ static void rs_program_fix_rate(struct iwl_priv *priv,
 {
        struct iwl_station_priv *sta_priv =
                container_of(lq_sta, struct iwl_station_priv, lq_sta);
-       struct iwl_rxon_context *ctx = sta_priv->common.ctx;
+       struct iwl_rxon_context *ctx = sta_priv->ctx;
 
        lq_sta->active_legacy_rate = 0x0FFF;    /* 1 - 54 MBits, includes CCK */
        lq_sta->active_siso_rate   = 0x1FD0;    /* 6 - 60 MBits, no 9, no CCK */
@@ -710,7 +710,7 @@ static int rs_toggle_antenna(u32 valid_ant, u32 *rate_n_flags,
 static bool rs_use_green(struct ieee80211_sta *sta)
 {
        struct iwl_station_priv *sta_priv = (void *)sta->drv_priv;
-       struct iwl_rxon_context *ctx = sta_priv->common.ctx;
+       struct iwl_rxon_context *ctx = sta_priv->ctx;
 
        return (sta->ht_cap.cap & IEEE80211_HT_CAP_GRN_FLD) &&
                !(ctx->ht.non_gf_sta_present);
@@ -917,7 +917,7 @@ static void rs_tx_status(void *priv_r, struct ieee80211_supported_band *sband,
        struct iwl_scale_tbl_info tbl_type;
        struct iwl_scale_tbl_info *curr_tbl, *other_tbl, *tmp_tbl;
        struct iwl_station_priv *sta_priv = (void *)sta->drv_priv;
-       struct iwl_rxon_context *ctx = sta_priv->common.ctx;
+       struct iwl_rxon_context *ctx = sta_priv->ctx;
 
        IWL_DEBUG_RATE_LIMIT(priv, "get frame ack response, update rate scale window\n");
 
@@ -1283,7 +1283,7 @@ static int rs_switch_to_mimo2(struct iwl_priv *priv,
        s32 rate;
        s8 is_green = lq_sta->is_green;
        struct iwl_station_priv *sta_priv = (void *)sta->drv_priv;
-       struct iwl_rxon_context *ctx = sta_priv->common.ctx;
+       struct iwl_rxon_context *ctx = sta_priv->ctx;
 
        if (!conf_is_ht(conf) || !sta->ht_cap.ht_supported)
                return -1;
@@ -1339,7 +1339,7 @@ static int rs_switch_to_mimo3(struct iwl_priv *priv,
        s32 rate;
        s8 is_green = lq_sta->is_green;
        struct iwl_station_priv *sta_priv = (void *)sta->drv_priv;
-       struct iwl_rxon_context *ctx = sta_priv->common.ctx;
+       struct iwl_rxon_context *ctx = sta_priv->ctx;
 
        if (!conf_is_ht(conf) || !sta->ht_cap.ht_supported)
                return -1;
@@ -1396,7 +1396,7 @@ static int rs_switch_to_siso(struct iwl_priv *priv,
        u8 is_green = lq_sta->is_green;
        s32 rate;
        struct iwl_station_priv *sta_priv = (void *)sta->drv_priv;
-       struct iwl_rxon_context *ctx = sta_priv->common.ctx;
+       struct iwl_rxon_context *ctx = sta_priv->ctx;
 
        if (!conf_is_ht(conf) || !sta->ht_cap.ht_supported)
                return -1;
@@ -2263,7 +2263,7 @@ static void rs_rate_scale_perform(struct iwl_priv *priv,
        u8 tid = IWL_MAX_TID_COUNT;
        struct iwl_tid_data *tid_data;
        struct iwl_station_priv *sta_priv = (void *)sta->drv_priv;
-       struct iwl_rxon_context *ctx = sta_priv->common.ctx;
+       struct iwl_rxon_context *ctx = sta_priv->ctx;
 
        IWL_DEBUG_RATE(priv, "rate scale calculate new rate for skb\n");
 
@@ -2706,7 +2706,7 @@ static void rs_initialize_lq(struct iwl_priv *priv,
                return;
 
        sta_priv = (void *)sta->drv_priv;
-       ctx = sta_priv->common.ctx;
+       ctx = sta_priv->ctx;
 
        i = lq_sta->last_txrate_idx;
 
index 6def1c2727757f6ccb2aa4c33b416681e84b21e7..fcfb410aca903af2c0face7cc9a0c75baec30bb8 100644 (file)
@@ -2513,7 +2513,7 @@ static int iwlagn_mac_sta_add(struct ieee80211_hw *hw,
        mutex_lock(&priv->shrd->mutex);
        IWL_DEBUG_INFO(priv, "proceeding to add station %pM\n",
                        sta->addr);
-       sta_priv->common.sta_id = IWL_INVALID_STATION;
+       sta_priv->sta_id = IWL_INVALID_STATION;
 
        atomic_set(&sta_priv->pending_frames, 0);
        if (vif->type == NL80211_IFTYPE_AP)
@@ -2529,7 +2529,7 @@ static int iwlagn_mac_sta_add(struct ieee80211_hw *hw,
                return ret;
        }
 
-       sta_priv->common.sta_id = sta_id;
+       sta_priv->sta_id = sta_id;
 
        /* Initialize rate scaling */
        IWL_DEBUG_INFO(priv, "Initializing rate scaling for station %pM\n",
index f69e556bd3c2877fc46b5caceb345a71e69bb3d2..fabfc8bf497117791e71f817604877632158ad87 100644 (file)
@@ -202,11 +202,6 @@ struct iwl_station_entry {
        struct iwl_link_quality_cmd *lq;
 };
 
-struct iwl_station_priv_common {
-       struct iwl_rxon_context *ctx;
-       u8 sta_id;
-};
-
 /*
  * iwl_station_priv: Driver's private station information
  *
@@ -215,12 +210,13 @@ struct iwl_station_priv_common {
  * space.
  */
 struct iwl_station_priv {
-       struct iwl_station_priv_common common;
+       struct iwl_rxon_context *ctx;
        struct iwl_lq_sta lq_sta;
        atomic_t pending_frames;
        bool client;
        bool asleep;
        u8 max_agg_bufsize;
+       u8 sta_id;
 };
 
 /**
index e24135e7d37d78d45a2376e137da289ca614295b..f35cfa2fe5c5b241dae7ff0e78671e32abf1af0e 100644 (file)
@@ -305,7 +305,7 @@ u8 iwl_prep_station(struct iwl_priv *priv, struct iwl_rxon_context *ctx,
        station->ctxid = ctx->ctxid;
 
        if (sta) {
-               struct iwl_station_priv_common *sta_priv;
+               struct iwl_station_priv *sta_priv;
 
                sta_priv = (void *)sta->drv_priv;
                sta_priv->ctx = ctx;
@@ -821,7 +821,7 @@ int iwl_mac_sta_remove(struct ieee80211_hw *hw,
                       struct ieee80211_sta *sta)
 {
        struct iwl_priv *priv = hw->priv;
-       struct iwl_station_priv_common *sta_common = (void *)sta->drv_priv;
+       struct iwl_station_priv *sta_priv = (void *)sta->drv_priv;
        int ret;
 
        IWL_DEBUG_INFO(priv, "received request to remove station %pM\n",
@@ -829,7 +829,7 @@ int iwl_mac_sta_remove(struct ieee80211_hw *hw,
        mutex_lock(&priv->shrd->mutex);
        IWL_DEBUG_INFO(priv, "proceeding to remove station %pM\n",
                        sta->addr);
-       ret = iwl_remove_station(priv, sta_common->sta_id, sta->addr);
+       ret = iwl_remove_station(priv, sta_priv->sta_id, sta->addr);
        if (ret)
                IWL_ERR(priv, "Error removing station %pM\n",
                        sta->addr);
index 9641eb6b1d0afa435fed3803c6b95fbc289376cd..02491b930423ec2a7e9833bc5ae66778b34a8c8c 100644 (file)
@@ -102,7 +102,7 @@ static inline int iwl_sta_id(struct ieee80211_sta *sta)
        if (WARN_ON(!sta))
                return IWL_INVALID_STATION;
 
-       return ((struct iwl_station_priv_common *)sta->drv_priv)->sta_id;
+       return ((struct iwl_station_priv *)sta->drv_priv)->sta_id;
 }
 
 /**