Commit cbea4761 authored by Alex Elder's avatar Alex Elder Committed by David S. Miller
Browse files

net: ipa: rename the NAT enumerated type



Rename the ipa_nat_en enumerated type to be ipa_nat_type, and rename
its symbols accordingly.  Add a comment indicating those values are
also used in the IPA status nat_type field.

Signed-off-by: default avatarAlex Elder <elder@linaro.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 8e71708b
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -68,6 +68,8 @@ enum ipa_status_mask {
	IPA_STATUS_MASK_BYTE_LIMIT		= BIT(15),
};

/** The IPA status nat_type field uses enum ipa_nat_type hardware values */

/* Status element provided by hardware */
struct ipa_status {
	u8 opcode;		/* enum ipa_status_opcode */
@@ -570,7 +572,7 @@ static void ipa_endpoint_init_nat(struct ipa_endpoint *endpoint)
		return;

	reg = ipa_reg(ipa, ENDP_INIT_NAT);
	val = ipa_reg_encode(reg, NAT_EN, IPA_NAT_BYPASS);
	val = ipa_reg_encode(reg, NAT_EN, IPA_NAT_TYPE_BYPASS);

	iowrite32(val, ipa->reg_virt + ipa_reg_n_offset(reg, endpoint_id));
}
+5 −5
Original line number Diff line number Diff line
@@ -382,11 +382,11 @@ enum ipa_reg_endp_init_nat_field_id {
	NAT_EN,
};

/** enum ipa_nat_en - ENDP_INIT_NAT register NAT_EN field value */
enum ipa_nat_en {
	IPA_NAT_BYPASS				= 0x0,
	IPA_NAT_SRC				= 0x1,
	IPA_NAT_DST				= 0x2,
/** enum ipa_nat_type - ENDP_INIT_NAT register NAT_EN field value */
enum ipa_nat_type {
	IPA_NAT_TYPE_BYPASS			= 0,
	IPA_NAT_TYPE_SRC			= 1,
	IPA_NAT_TYPE_DST			= 2,
};

/* ENDP_INIT_HDR register */