Commit afc1e3b4 authored by Avraham Stern's avatar Avraham Stern Committed by Luca Coelho
Browse files

iwlwifi: mvm: use correct GP2 register address for 22000 family



The device time register address has changed for 22000 devices.
Add a util function for getting the GP2 time and use the correct
register address depending on the device family.

Signed-off-by: default avatarAvraham Stern <avraham.stern@intel.com>
Signed-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
parent 56fe12d2
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -194,7 +194,8 @@ static const struct iwl_ht_params iwl_22000_ht_params = {
	IWL_DEVICE_22000_COMMON,					\
	.device_family = IWL_DEVICE_FAMILY_22000,			\
	.base_params = &iwl_22000_base_params,				\
	.csr = &iwl_csr_v1
	.csr = &iwl_csr_v1,						\
	.gp2_reg_addr = 0xa02c68

#define IWL_DEVICE_22560						\
	IWL_DEVICE_22000_COMMON,					\
@@ -207,7 +208,8 @@ static const struct iwl_ht_params iwl_22000_ht_params = {
	.device_family = IWL_DEVICE_FAMILY_AX210,			\
	.base_params = &iwl_22000_base_params,				\
	.csr = &iwl_csr_v1,						\
	.min_txq_size = 128
	.min_txq_size = 128,						\
	.gp2_reg_addr = 0xd02c68

const struct iwl_cfg iwl22000_2ac_cfg_hr = {
	.name = "Intel(R) Dual Band Wireless AC 22000",
+1 −0
Original line number Diff line number Diff line
@@ -456,6 +456,7 @@ struct iwl_cfg {
	u32 fw_mon_smem_write_ptr_msk;
	u32 fw_mon_smem_cycle_cnt_ptr_addr;
	u32 fw_mon_smem_cycle_cnt_ptr_msk;
	u32 gp2_reg_addr;
};

extern const struct iwl_csr_params iwl_csr_v1;
+1 −3
Original line number Diff line number Diff line
@@ -1113,9 +1113,7 @@ static void iwl_mvm_mac_ctxt_cmd_fill_ap(struct iwl_mvm *mvm,
				ieee80211_tu_to_usec(data.beacon_int * rand /
						     100);
		} else {
			mvmvif->ap_beacon_time =
				iwl_read_prph(mvm->trans,
					      DEVICE_SYSTEM_TIME_REG);
			mvmvif->ap_beacon_time = iwl_mvm_get_systime(mvm);
		}
	}

+2 −2
Original line number Diff line number Diff line
@@ -3730,7 +3730,7 @@ static int iwl_mvm_send_aux_roc_cmd(struct iwl_mvm *mvm,
				    struct ieee80211_vif *vif,
				    int duration)
{
	int res, time_reg = DEVICE_SYSTEM_TIME_REG;
	int res;
	struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
	struct iwl_mvm_time_event_data *te_data = &mvmvif->hs_time_event_data;
	static const u16 time_event_response[] = { HOT_SPOT_CMD };
@@ -3756,7 +3756,7 @@ static int iwl_mvm_send_aux_roc_cmd(struct iwl_mvm *mvm,
			      0);

	/* Set the time and duration */
	tail->apply_time = cpu_to_le32(iwl_read_prph(mvm->trans, time_reg));
	tail->apply_time = cpu_to_le32(iwl_mvm_get_systime(mvm));

	delay = AUX_ROC_MIN_DELAY;
	req_dur = MSEC_TO_TU(duration);
+1 −0
Original line number Diff line number Diff line
@@ -1539,6 +1539,7 @@ void iwl_mvm_dump_nic_error_log(struct iwl_mvm *mvm);
u8 first_antenna(u8 mask);
u8 iwl_mvm_next_antenna(struct iwl_mvm *mvm, u8 valid, u8 last_idx);
void iwl_mvm_get_sync_time(struct iwl_mvm *mvm, u32 *gp2, u64 *boottime);
u32 iwl_mvm_get_systime(struct iwl_mvm *mvm);

/* Tx / Host Commands */
int __must_check iwl_mvm_send_cmd(struct iwl_mvm *mvm,
Loading