]> rtime.felk.cvut.cz Git - lisovros/linux_canprio.git/commitdiff
Unified can_id and can_mask variable names.
authorRostislav Lisovy <lisovy@gmail.com>
Tue, 30 Aug 2011 09:24:09 +0000 (11:24 +0200)
committerRostislav Lisovy <lisovy@gmail.com>
Tue, 30 Aug 2011 09:24:09 +0000 (11:24 +0200)
net/sched/cls_canprio.c

index 90ea58391a1f0e7c939274ee35678423801a400b..bba0f4dd4faed528ca835f7892f268ac21be53a4 100644 (file)
@@ -89,21 +89,21 @@ struct canprio_filter {
  * ----------------------------------------------------------------------------
  */
 
-static void canprio_sff_match_add(struct canprio_rules *rls, u32 canid, u32 mask)
+static void canprio_sff_match_add(struct canprio_rules *rls, u32 can_id, u32 can_mask)
 {
        int i;
 
        printk("%s() invoked\n", __FUNCTION__);
-       mask &= CAN_SFF_MASK;
-       canid &= mask;
+       can_mask &= CAN_SFF_MASK;
+       can_id &= can_mask;
 
-       if (mask == CAN_SFF_MASK) {
-               set_bit(canid, rls->match_sff);
+       if (can_mask == CAN_SFF_MASK) {
+               set_bit(can_id, rls->match_sff);
                return;
        }
        /* Add record (set bit to 1) for each ID that conforms particular rule */
        for (i = 0; i <= CAN_SFF_MASK; i++) {
-               if ((i & mask) == canid)
+               if ((i & can_mask) == can_id)
                        set_bit(i, rls->match_sff);
        }
 }
@@ -136,28 +136,28 @@ static int canprio_classify(struct sk_buff *skb, struct tcf_proto *tp,
 {
        struct canprio_head *head = (struct canprio_head *)tp->root;
        struct canprio_filter *f;
-       u32 canid;
+       u32 can_id;
        int i;
 
        printk(" canprio_classify() invoked\n");
-       canid = (u32)canprio_get_id(skb);
+       can_id = (u32)canprio_get_id(skb);
 
        list_for_each_entry(f, &head->flist, link) {
                bool match = false;
 
-               if (canid & CAN_EFF_FLAG) {
-                       canid &= CAN_EFF_MASK;
+               if (can_id & CAN_EFF_FLAG) {
+                       can_id &= CAN_EFF_MASK;
                        
                        for (i = 0; i < f->rules->eff_rules_count; i++) {
                                if ((f->rules->rules_raw[i].can_id & f->rules->rules_raw[i].can_mask & CAN_EFF_MASK) ==
-                                       (canid & f->rules->rules_raw[i].can_mask & CAN_EFF_MASK)) {
+                                       (can_id & f->rules->rules_raw[i].can_mask & CAN_EFF_MASK)) {
 
                                        match = true;
                                        break;
                                }
                        }
                } else {
-                       match = test_bit(canid, f->rules->match_sff);
+                       match = test_bit(can_id, f->rules->match_sff);
                }
 
                //if (f->rules->inv_match_en)
@@ -165,7 +165,7 @@ static int canprio_classify(struct sk_buff *skb, struct tcf_proto *tp,
 
                if (match) {
                        *res = f->res;
-                       printk( "   canprio_classify() match ok: ID 0x%x\n", canid);
+                       printk( "   canprio_classify() match ok: ID 0x%x\n", can_id);
                        return TC_POLICE_OK;
                }
        }