浏览代码

iwlwifi: store default station flags in context

Since the default context is initialised to zero,
and the default flags are zero, no more code is
needed to initialise them right now, but another
context can have different default flags.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Johannes Berg 15 年之前
父节点
当前提交
770e13bdda
共有 2 个文件被更改,包括 3 次插入1 次删除
  1. 2 0
      drivers/net/wireless/iwlwifi/iwl-dev.h
  2. 1 1
      drivers/net/wireless/iwlwifi/iwl-sta.c

+ 2 - 0
drivers/net/wireless/iwlwifi/iwl-dev.h

@@ -1137,6 +1137,8 @@ struct iwl_rxon_context {
 
 	struct iwl_wep_key wep_keys[WEP_KEYS_MAX];
 	u8 key_mapping_keys;
+
+	__le32 station_flags;
 };
 
 struct iwl_priv {

+ 1 - 1
drivers/net/wireless/iwlwifi/iwl-sta.c

@@ -289,7 +289,7 @@ static u8 iwl_prep_station(struct iwl_priv *priv, struct iwl_rxon_context *ctx,
 	memcpy(station->sta.sta.addr, addr, ETH_ALEN);
 	station->sta.mode = 0;
 	station->sta.sta.sta_id = sta_id;
-	station->sta.station_flags = 0;
+	station->sta.station_flags = ctx->station_flags;
 	station->ctxid = ctx->ctxid;
 
 	/*