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

Commit 3ac7f146 authored by Tomas Winkler's avatar Tomas Winkler Committed by John W. Linville
Browse files

iwlwifi: fix checkpatch.pl errors



This patch fixes errors reported by checkpatch in iwlwifi drivers

Signed-off-by: default avatarTomas Winkler <tomas.winkler@intel.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 25bc2ded
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -795,8 +795,7 @@ static void iwl3945_rx_reply_rx(struct iwl3945_priv *priv,
					struct ieee80211_mgmt *mgmt =
					    (struct ieee80211_mgmt *)header;
					__le32 *pos;
					pos =
					    (__le32 *) & mgmt->u.beacon.
					pos = (__le32 *)&mgmt->u.beacon.
					    timestamp;
					priv->timestamp0 = le32_to_cpu(pos[0]);
					priv->timestamp1 = le32_to_cpu(pos[1]);
@@ -1509,7 +1508,7 @@ static int iwl3945_hw_reg_adjust_power_by_temp(int new_reading, int old_reading)
 */
static inline int iwl3945_hw_reg_temp_out_of_range(int temperature)
{
	return (((temperature < -260) || (temperature > 25)) ? 1 : 0);
	return ((temperature < -260) || (temperature > 25)) ? 1 : 0;
}

int iwl3945_hw_get_temperature(struct iwl3945_priv *priv)
@@ -2630,7 +2629,7 @@ unsigned int iwl3945_hw_get_beacon_cmd(struct iwl3945_priv *priv,
	tx_beacon_cmd->tx.supp_rates[1] =
		(IWL_CCK_BASIC_RATES_MASK & 0xF);

	return (sizeof(struct iwl3945_tx_beacon_cmd) + frame_size);
	return sizeof(struct iwl3945_tx_beacon_cmd) + frame_size;
}

void iwl3945_hw_rx_handler_setup(struct iwl3945_priv *priv)
+8 −8
Original line number Diff line number Diff line
@@ -245,7 +245,7 @@ static void rs_rate_scale_clear_window(struct iwl_rate_scale_data *window)

static inline u8 rs_is_valid_ant(u8 valid_antenna, u8 ant_type)
{
	return ((ant_type & valid_antenna) == ant_type);
	return (ant_type & valid_antenna) == ant_type;
}

/*
@@ -384,9 +384,9 @@ static void rs_tl_turn_on_agg(struct iwl_priv *priv, u8 tid,

static inline int get_num_of_ant_from_rate(u32 rate_n_flags)
{
	return (!!(rate_n_flags & RATE_MCS_ANT_A_MSK) +
	return !!(rate_n_flags & RATE_MCS_ANT_A_MSK) +
	       !!(rate_n_flags & RATE_MCS_ANT_B_MSK) +
		!!(rate_n_flags & RATE_MCS_ANT_C_MSK));
	       !!(rate_n_flags & RATE_MCS_ANT_C_MSK);
}

/**
@@ -620,9 +620,9 @@ static int rs_toggle_antenna(u32 valid_ant, u32 *rate_n_flags,
#if 0
static inline u8 rs_use_green(struct iwl_priv *priv, struct ieee80211_conf *conf)
{
	return ((conf->flags & IEEE80211_CONF_SUPPORT_HT_MODE) &&
	return (conf->flags & IEEE80211_CONF_SUPPORT_HT_MODE) &&
		priv->current_ht_config.is_green_field &&
		!priv->current_ht_config.non_GF_STA_present);
		!priv->current_ht_config.non_GF_STA_present;
}
#endif
static inline u8 rs_use_green(struct iwl_priv *priv, struct ieee80211_conf *conf)
@@ -2157,7 +2157,7 @@ static void *rs_alloc_sta(void *priv_rate, gfp_t gfp)

	for (j = 0; j < LQ_SIZE; j++)
		for (i = 0; i < IWL_RATE_COUNT; i++)
			rs_rate_scale_clear_window(&(lq_sta->lq_info[j].win[i]));
			rs_rate_scale_clear_window(&lq_sta->lq_info[j].win[i]);

	return lq_sta;
}
@@ -2179,7 +2179,7 @@ static void rs_rate_init(void *priv_rate, void *priv_sta,
	sta->txrate_idx = 3;
	for (j = 0; j < LQ_SIZE; j++)
		for (i = 0; i < IWL_RATE_COUNT; i++)
			rs_rate_scale_clear_window(&(lq_sta->lq_info[j].win[i]));
			rs_rate_scale_clear_window(&lq_sta->lq_info[j].win[i]);

	IWL_DEBUG_RATE("LQ: *** rate scale global init ***\n");
	/* TODO: what is a good starting rate for STA? About middle? Maybe not
+5 −5
Original line number Diff line number Diff line
@@ -2476,7 +2476,7 @@ static void iwl4965_post_associate(struct iwl_priv *priv)
	unsigned long flags;

	if (priv->iw_mode == IEEE80211_IF_TYPE_AP) {
		IWL_ERROR("%s Should not be called in AP mode\n", __FUNCTION__);
		IWL_ERROR("%s Should not be called in AP mode\n", __func__);
		return;
	}

@@ -2552,7 +2552,7 @@ static void iwl4965_post_associate(struct iwl_priv *priv)

	default:
		IWL_ERROR("%s Should not be called in %d mode\n",
				__FUNCTION__, priv->iw_mode);
			  __func__, priv->iw_mode);
		break;
	}

@@ -3934,7 +3934,7 @@ static ssize_t show_power_level(struct device *d,
	p += sprintf(p, "\tMODE:%s", (mode < IWL_POWER_AUTO)?"fixed":"auto");
	p += sprintf(p, "\tINDEX:%d", level);
	p += sprintf(p, "\n");
	return (p - buf + 1);
	return p - buf + 1;
}

static DEVICE_ATTR(power_level, S_IWUSR | S_IRUSR, show_power_level,
+2 −2
Original line number Diff line number Diff line
@@ -383,8 +383,8 @@ void iwl_reset_qos(struct iwl_priv *priv)
}
EXPORT_SYMBOL(iwl_reset_qos);

#define MAX_BIT_RATE_40_MHZ 0x96; /* 150 Mbps */
#define MAX_BIT_RATE_20_MHZ 0x48; /* 72 Mbps */
#define MAX_BIT_RATE_40_MHZ 0x96 /* 150 Mbps */
#define MAX_BIT_RATE_20_MHZ 0x48 /* 72 Mbps */
static void iwlcore_init_ht_hw_capab(const struct iwl_priv *priv,
			      struct ieee80211_ht_info *ht_info,
			      enum ieee80211_band band)
+2 −2
Original line number Diff line number Diff line
@@ -33,12 +33,12 @@
#define IWL_DEBUG(level, fmt, args...) \
do { if (priv->debug_level & (level)) \
  dev_printk(KERN_ERR, &(priv->hw->wiphy->dev), "%c %s " fmt, \
	 in_interrupt() ? 'I' : 'U', __FUNCTION__ , ## args); } while (0)
	 in_interrupt() ? 'I' : 'U', __func__ , ## args); } while (0)

#define IWL_DEBUG_LIMIT(level, fmt, args...) \
do { if ((priv->debug_level & (level)) && net_ratelimit()) \
  dev_printk(KERN_ERR, &(priv->hw->wiphy->dev), "%c %s " fmt, \
	 in_interrupt() ? 'I' : 'U', __FUNCTION__ , ## args); } while (0)
	 in_interrupt() ? 'I' : 'U', __func__ , ## args); } while (0)

#ifdef CONFIG_IWLWIFI_DEBUGFS
struct iwl_debugfs {
Loading