Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fa8f130c authored by Wey-Yi Guy's avatar Wey-Yi Guy Committed by Reinette Chatre
Browse files

iwlwifi: code cleanup for connectivity recovery



Split the connectivity check and recovery routine into separated
functions based on the types
   1. iwl_good_ack_health() - check for ack count
   2. iwl_good_plcp_health() - check for plcp error

Based on the type of errors being detected, different recovery methods
will be used to bring the system back to normal operational state.

Because different NIC has different HW and uCode, the behavior is also
different; these functions thus now form part of the ops infrastructure,
so we can have more control on how to monitor and recover from error condition
case per device.

Signed-off-by: default avatarWey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: default avatarReinette Chatre <reinette.chatre@intel.com>
parent d5a0ffa3
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -213,7 +213,8 @@ static struct iwl_lib_ops iwl1000_lib = {
	 },
	.add_bcast_station = iwl_add_bcast_station,
	.recover_from_tx_stall = iwl_bg_monitor_recover,
	.recover_from_statistics = iwl_recover_from_statistics,
	.check_plcp_health = iwl_good_plcp_health,
	.check_ack_health = iwl_good_ack_health,
};

static const struct iwl_ops iwl1000_ops = {
+1 −1
Original line number Diff line number Diff line
@@ -2221,7 +2221,7 @@ static struct iwl_lib_ops iwl4965_lib = {
		.set_ct_kill = iwl4965_set_ct_threshold,
	},
	.add_bcast_station = iwl_add_bcast_station,
	.recover_from_statistics = iwl_recover_from_statistics,
	.check_plcp_health = iwl_good_plcp_health,
};

static const struct iwl_ops iwl4965_ops = {
+4 −2
Original line number Diff line number Diff line
@@ -1500,7 +1500,8 @@ struct iwl_lib_ops iwl5000_lib = {
	 },
	.add_bcast_station = iwl_add_bcast_station,
	.recover_from_tx_stall = iwl_bg_monitor_recover,
	.recover_from_statistics = iwl_recover_from_statistics,
	.check_plcp_health = iwl_good_plcp_health,
	.check_ack_health = iwl_good_ack_health,
};

static struct iwl_lib_ops iwl5150_lib = {
@@ -1556,7 +1557,8 @@ static struct iwl_lib_ops iwl5150_lib = {
	 },
	.add_bcast_station = iwl_add_bcast_station,
	.recover_from_tx_stall = iwl_bg_monitor_recover,
	.recover_from_statistics = iwl_recover_from_statistics,
	.check_plcp_health = iwl_good_plcp_health,
	.check_ack_health = iwl_good_ack_health,
};

static const struct iwl_ops iwl5000_ops = {
+4 −2
Original line number Diff line number Diff line
@@ -279,7 +279,8 @@ static struct iwl_lib_ops iwl6000_lib = {
	 },
	.add_bcast_station = iwl_add_bcast_station,
	.recover_from_tx_stall = iwl_bg_monitor_recover,
	.recover_from_statistics = iwl_recover_from_statistics,
	.check_plcp_health = iwl_good_plcp_health,
	.check_ack_health = iwl_good_ack_health,
};

static const struct iwl_ops iwl6000_ops = {
@@ -346,7 +347,8 @@ static struct iwl_lib_ops iwl6050_lib = {
	 },
	.add_bcast_station = iwl_add_bcast_station,
	.recover_from_tx_stall = iwl_bg_monitor_recover,
	.recover_from_statistics = iwl_recover_from_statistics,
	.check_plcp_health = iwl_good_plcp_health,
	.check_ack_health = iwl_good_ack_health,
};

static const struct iwl_ops iwl6050_ops = {
+8 −3
Original line number Diff line number Diff line
@@ -193,8 +193,11 @@ struct iwl_lib_ops {
	void (*add_bcast_station)(struct iwl_priv *priv);
	/* recover from tx queue stall */
	void (*recover_from_tx_stall)(unsigned long data);
	/* recover from errors showed in statistics */
	void (*recover_from_statistics)(struct iwl_priv *priv,
	/* check for plcp health */
	bool (*check_plcp_health)(struct iwl_priv *priv,
					struct iwl_rx_packet *pkt);
	/* check for ack health */
	bool (*check_ack_health)(struct iwl_priv *priv,
					struct iwl_rx_packet *pkt);
};

@@ -437,7 +440,9 @@ void iwl_rx_missed_beacon_notif(struct iwl_priv *priv,
			       struct iwl_rx_mem_buffer *rxb);
void iwl_rx_spectrum_measure_notif(struct iwl_priv *priv,
					  struct iwl_rx_mem_buffer *rxb);
void iwl_recover_from_statistics(struct iwl_priv *priv,
bool iwl_good_plcp_health(struct iwl_priv *priv,
				 struct iwl_rx_packet *pkt);
bool iwl_good_ack_health(struct iwl_priv *priv,
				 struct iwl_rx_packet *pkt);
void iwl_rx_statistics(struct iwl_priv *priv,
			      struct iwl_rx_mem_buffer *rxb);
Loading