net: hsr: remove camel case usage in the code
Current driver code uses camel case in many places. This is seen when ran checkpatch.pl -f on files under net/hsr. This patch fixes the code to remove camel case usage. Signed-off-by: Murali Karicheri <m-karicheri2@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
d131fcc690
commit
b1b4aa9140
@@ -48,40 +48,40 @@ struct hsr_frame_info {
|
||||
*/
|
||||
static bool is_supervision_frame(struct hsr_priv *hsr, struct sk_buff *skb)
|
||||
{
|
||||
struct ethhdr *ethHdr;
|
||||
struct hsr_sup_tag *hsrSupTag;
|
||||
struct hsrv1_ethhdr_sp *hsrV1Hdr;
|
||||
struct ethhdr *eth_hdr;
|
||||
struct hsr_sup_tag *hsr_sup_tag;
|
||||
struct hsrv1_ethhdr_sp *hsr_V1_hdr;
|
||||
|
||||
WARN_ON_ONCE(!skb_mac_header_was_set(skb));
|
||||
ethHdr = (struct ethhdr *)skb_mac_header(skb);
|
||||
eth_hdr = (struct ethhdr *)skb_mac_header(skb);
|
||||
|
||||
/* Correct addr? */
|
||||
if (!ether_addr_equal(ethHdr->h_dest,
|
||||
if (!ether_addr_equal(eth_hdr->h_dest,
|
||||
hsr->sup_multicast_addr))
|
||||
return false;
|
||||
|
||||
/* Correct ether type?. */
|
||||
if (!(ethHdr->h_proto == htons(ETH_P_PRP) ||
|
||||
ethHdr->h_proto == htons(ETH_P_HSR)))
|
||||
if (!(eth_hdr->h_proto == htons(ETH_P_PRP) ||
|
||||
eth_hdr->h_proto == htons(ETH_P_HSR)))
|
||||
return false;
|
||||
|
||||
/* Get the supervision header from correct location. */
|
||||
if (ethHdr->h_proto == htons(ETH_P_HSR)) { /* Okay HSRv1. */
|
||||
hsrV1Hdr = (struct hsrv1_ethhdr_sp *)skb_mac_header(skb);
|
||||
if (hsrV1Hdr->hsr.encap_proto != htons(ETH_P_PRP))
|
||||
if (eth_hdr->h_proto == htons(ETH_P_HSR)) { /* Okay HSRv1. */
|
||||
hsr_V1_hdr = (struct hsrv1_ethhdr_sp *)skb_mac_header(skb);
|
||||
if (hsr_V1_hdr->hsr.encap_proto != htons(ETH_P_PRP))
|
||||
return false;
|
||||
|
||||
hsrSupTag = &hsrV1Hdr->hsr_sup;
|
||||
hsr_sup_tag = &hsr_V1_hdr->hsr_sup;
|
||||
} else {
|
||||
hsrSupTag =
|
||||
hsr_sup_tag =
|
||||
&((struct hsrv0_ethhdr_sp *)skb_mac_header(skb))->hsr_sup;
|
||||
}
|
||||
|
||||
if (hsrSupTag->HSR_TLV_Type != HSR_TLV_ANNOUNCE &&
|
||||
hsrSupTag->HSR_TLV_Type != HSR_TLV_LIFE_CHECK)
|
||||
if (hsr_sup_tag->HSR_TLV_type != HSR_TLV_ANNOUNCE &&
|
||||
hsr_sup_tag->HSR_TLV_type != HSR_TLV_LIFE_CHECK)
|
||||
return false;
|
||||
if (hsrSupTag->HSR_TLV_Length != 12 &&
|
||||
hsrSupTag->HSR_TLV_Length != sizeof(struct hsr_sup_payload))
|
||||
if (hsr_sup_tag->HSR_TLV_length != 12 &&
|
||||
hsr_sup_tag->HSR_TLV_length != sizeof(struct hsr_sup_payload))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
@@ -125,7 +125,7 @@ static struct sk_buff *frame_get_stripped_skb(struct hsr_frame_info *frame,
|
||||
}
|
||||
|
||||
static void hsr_fill_tag(struct sk_buff *skb, struct hsr_frame_info *frame,
|
||||
struct hsr_port *port, u8 protoVersion)
|
||||
struct hsr_port *port, u8 proto_version)
|
||||
{
|
||||
struct hsr_ethhdr *hsr_ethhdr;
|
||||
int lane_id;
|
||||
@@ -146,7 +146,7 @@ static void hsr_fill_tag(struct sk_buff *skb, struct hsr_frame_info *frame,
|
||||
set_hsr_tag_LSDU_size(&hsr_ethhdr->hsr_tag, lsdu_size);
|
||||
hsr_ethhdr->hsr_tag.sequence_nr = htons(frame->sequence_nr);
|
||||
hsr_ethhdr->hsr_tag.encap_proto = hsr_ethhdr->ethhdr.h_proto;
|
||||
hsr_ethhdr->ethhdr.h_proto = htons(protoVersion ?
|
||||
hsr_ethhdr->ethhdr.h_proto = htons(proto_version ?
|
||||
ETH_P_HSR : ETH_P_PRP);
|
||||
}
|
||||
|
||||
@@ -176,7 +176,7 @@ static struct sk_buff *create_tagged_skb(struct sk_buff *skb_o,
|
||||
memmove(dst, src, movelen);
|
||||
skb_reset_mac_header(skb);
|
||||
|
||||
hsr_fill_tag(skb, frame, port, port->hsr->protVersion);
|
||||
hsr_fill_tag(skb, frame, port, port->hsr->prot_version);
|
||||
|
||||
return skb;
|
||||
}
|
||||
|
Reference in New Issue
Block a user