diff options
author | Macpaul Lin <macpaul@gmail.com> | 2012-09-11 15:55:31 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-09-11 12:09:31 -0700 |
commit | 13b2663c95f6f30f835ef92ef51c9aff0b3f09d6 (patch) | |
tree | 398ba3ed4c4086aace6a204ec7458d901b2367d2 | |
parent | c37a1747acbfc83641338a29952fff99bff6deb0 (diff) | |
download | linux-3.10-13b2663c95f6f30f835ef92ef51c9aff0b3f09d6.tar.gz linux-3.10-13b2663c95f6f30f835ef92ef51c9aff0b3f09d6.tar.bz2 linux-3.10-13b2663c95f6f30f835ef92ef51c9aff0b3f09d6.zip |
staging/gdm72xx: remove camel-case vars in gdm_qos
Remove camel-case variables in gdm_qos.h and gdm_qos.c
Signed-off-by: Macpaul Lin <macpaul@gmail.com>
Cc: Paul Stewart <pstew@chromium.org>
Cc: Ben Chan <benchan@chromium.org>
Cc: Sage Ahn <syahn@gctsemi.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/gdm72xx/gdm_qos.c | 118 | ||||
-rw-r--r-- | drivers/staging/gdm72xx/gdm_qos.h | 58 |
2 files changed, 88 insertions, 88 deletions
diff --git a/drivers/staging/gdm72xx/gdm_qos.c b/drivers/staging/gdm72xx/gdm_qos.c index 80bde053fbc..e26c6a8b262 100644 --- a/drivers/staging/gdm72xx/gdm_qos.c +++ b/drivers/staging/gdm72xx/gdm_qos.c @@ -106,8 +106,8 @@ void gdm_qos_init(void *nic_ptr) for (i = 0 ; i < QOS_MAX; i++) { INIT_LIST_HEAD(&qcb->qos_list[i]); - qcb->csr[i].QoSBufCount = 0; - qcb->csr[i].Enabled = 0; + qcb->csr[i].qos_buf_count = 0; + qcb->csr[i].enabled = 0; } qcb->qos_list_cnt = 0; @@ -133,8 +133,8 @@ void gdm_qos_release_list(void *nic_ptr) spin_lock_irqsave(&qcb->qos_lock, flags); for (i = 0; i < QOS_MAX; i++) { - qcb->csr[i].QoSBufCount = 0; - qcb->csr[i].Enabled = 0; + qcb->csr[i].qos_buf_count = 0; + qcb->csr[i].enabled = 0; } qcb->qos_list_cnt = 0; @@ -153,42 +153,42 @@ static u32 chk_ipv4_rule(struct gdm_wimax_csr_s *csr, u8 *Stream, u8 *port) { int i; - if (csr->ClassifierRuleEnable&IPTYPEOFSERVICE) { - if (((Stream[1] & csr->IPToSMask) < csr->IPToSLow) || - ((Stream[1] & csr->IPToSMask) > csr->IPToSHigh)) + if (csr->classifier_rule_en&IPTYPEOFSERVICE) { + if (((Stream[1] & csr->ip2s_mask) < csr->ip2s_lo) || + ((Stream[1] & csr->ip2s_mask) > csr->ip2s_hi)) return 1; } - if (csr->ClassifierRuleEnable&PROTOCOL) { - if (Stream[9] != csr->Protocol) + if (csr->classifier_rule_en&PROTOCOL) { + if (Stream[9] != csr->protocol) return 1; } - if (csr->ClassifierRuleEnable&IPMASKEDSRCADDRESS) { + if (csr->classifier_rule_en&IPMASKEDSRCADDRESS) { for (i = 0; i < 4; i++) { - if ((Stream[12 + i] & csr->IPSrcAddrMask[i]) != - (csr->IPSrcAddr[i] & csr->IPSrcAddrMask[i])) + if ((Stream[12 + i] & csr->ipsrc_addrmask[i]) != + (csr->ipsrc_addr[i] & csr->ipsrc_addrmask[i])) return 1; } } - if (csr->ClassifierRuleEnable&IPMASKEDDSTADDRESS) { + if (csr->classifier_rule_en&IPMASKEDDSTADDRESS) { for (i = 0; i < 4; i++) { - if ((Stream[16 + i] & csr->IPDstAddrMask[i]) != - (csr->IPDstAddr[i] & csr->IPDstAddrMask[i])) + if ((Stream[16 + i] & csr->ipdst_addrmask[i]) != + (csr->ipdst_addr[i] & csr->ipdst_addrmask[i])) return 1; } } - if (csr->ClassifierRuleEnable&PROTOCOLSRCPORTRANGE) { + if (csr->classifier_rule_en&PROTOCOLSRCPORTRANGE) { i = ((port[0]<<8)&0xff00)+port[1]; - if ((i < csr->SrcPortLow) || (i > csr->SrcPortHigh)) + if ((i < csr->srcport_lo) || (i > csr->srcport_hi)) return 1; } - if (csr->ClassifierRuleEnable&PROTOCOLDSTPORTRANGE) { + if (csr->classifier_rule_en&PROTOCOLDSTPORTRANGE) { i = ((port[2]<<8)&0xff00)+port[3]; - if ((i < csr->DstPortLow) || (i > csr->DstPortHigh)) + if ((i < csr->dstport_lo) || (i > csr->dstport_hi)) return 1; } @@ -208,8 +208,8 @@ static u32 get_qos_index(struct nic *nic, u8 *iph, u8 *tcpudph) if (IP_Ver == 4) { for (i = 0; i < QOS_MAX; i++) { - if (qcb->csr[i].Enabled) { - if (qcb->csr[i].ClassifierRuleEnable) { + if (qcb->csr[i].enabled) { + if (qcb->csr[i].classifier_rule_en) { if (chk_ipv4_rule(&qcb->csr[i], iph, tcpudph) == 0) return i; @@ -230,14 +230,14 @@ static u32 extract_qos_list(struct nic *nic, struct list_head *head) INIT_LIST_HEAD(head); for (i = 0; i < QOS_MAX; i++) { - if (qcb->csr[i].Enabled) { - if (qcb->csr[i].QoSBufCount < qcb->qos_limit_size) { + if (qcb->csr[i].enabled) { + if (qcb->csr[i].qos_buf_count < qcb->qos_limit_size) { if (!list_empty(&qcb->qos_list[i])) { entry = list_entry( qcb->qos_list[i].prev, struct qos_entry_s, list); list_move_tail(&entry->list, head); - qcb->csr[i].QoSBufCount++; + qcb->csr[i].qos_buf_count++; if (!list_empty(&qcb->qos_list[i])) wprintk("QoS Index(%d) is piled!!\n", i); @@ -322,8 +322,8 @@ static u32 get_csr(struct qos_cb_s *qcb, u32 SFID, int mode) if (mode) { for (i = 0; i < QOS_MAX; i++) { - if (qcb->csr[i].Enabled == 0) { - qcb->csr[i].Enabled = 1; + if (qcb->csr[i].enabled == 0) { + qcb->csr[i].enabled = 1; qcb->qos_list_cnt++; return i; } @@ -365,7 +365,7 @@ void gdm_recv_qos_hci_packet(void *nic_ptr, u8 *buf, int size) eprintk("QoS ERROR: No SF\n"); return; } - qcb->csr[index].QoSBufCount = buf[(i*5)+10]; + qcb->csr[index].qos_buf_count = buf[(i*5)+10]; } extract_qos_list(nic, &send_list); @@ -391,38 +391,38 @@ void gdm_recv_qos_hci_packet(void *nic_ptr, u8 *buf, int size) spin_lock_irqsave(&qcb->qos_lock, flags); qcb->csr[index].SFID = SFID; - qcb->csr[index].ClassifierRuleEnable = ((buf[pos++]<<8)&0xff00); - qcb->csr[index].ClassifierRuleEnable += buf[pos++]; - if (qcb->csr[index].ClassifierRuleEnable == 0) + qcb->csr[index].classifier_rule_en = ((buf[pos++]<<8)&0xff00); + qcb->csr[index].classifier_rule_en += buf[pos++]; + if (qcb->csr[index].classifier_rule_en == 0) qcb->qos_null_idx = index; - qcb->csr[index].IPToSMask = buf[pos++]; - qcb->csr[index].IPToSLow = buf[pos++]; - qcb->csr[index].IPToSHigh = buf[pos++]; - qcb->csr[index].Protocol = buf[pos++]; - qcb->csr[index].IPSrcAddrMask[0] = buf[pos++]; - qcb->csr[index].IPSrcAddrMask[1] = buf[pos++]; - qcb->csr[index].IPSrcAddrMask[2] = buf[pos++]; - qcb->csr[index].IPSrcAddrMask[3] = buf[pos++]; - qcb->csr[index].IPSrcAddr[0] = buf[pos++]; - qcb->csr[index].IPSrcAddr[1] = buf[pos++]; - qcb->csr[index].IPSrcAddr[2] = buf[pos++]; - qcb->csr[index].IPSrcAddr[3] = buf[pos++]; - qcb->csr[index].IPDstAddrMask[0] = buf[pos++]; - qcb->csr[index].IPDstAddrMask[1] = buf[pos++]; - qcb->csr[index].IPDstAddrMask[2] = buf[pos++]; - qcb->csr[index].IPDstAddrMask[3] = buf[pos++]; - qcb->csr[index].IPDstAddr[0] = buf[pos++]; - qcb->csr[index].IPDstAddr[1] = buf[pos++]; - qcb->csr[index].IPDstAddr[2] = buf[pos++]; - qcb->csr[index].IPDstAddr[3] = buf[pos++]; - qcb->csr[index].SrcPortLow = ((buf[pos++]<<8)&0xff00); - qcb->csr[index].SrcPortLow += buf[pos++]; - qcb->csr[index].SrcPortHigh = ((buf[pos++]<<8)&0xff00); - qcb->csr[index].SrcPortHigh += buf[pos++]; - qcb->csr[index].DstPortLow = ((buf[pos++]<<8)&0xff00); - qcb->csr[index].DstPortLow += buf[pos++]; - qcb->csr[index].DstPortHigh = ((buf[pos++]<<8)&0xff00); - qcb->csr[index].DstPortHigh += buf[pos++]; + qcb->csr[index].ip2s_mask = buf[pos++]; + qcb->csr[index].ip2s_lo = buf[pos++]; + qcb->csr[index].ip2s_hi = buf[pos++]; + qcb->csr[index].protocol = buf[pos++]; + qcb->csr[index].ipsrc_addrmask[0] = buf[pos++]; + qcb->csr[index].ipsrc_addrmask[1] = buf[pos++]; + qcb->csr[index].ipsrc_addrmask[2] = buf[pos++]; + qcb->csr[index].ipsrc_addrmask[3] = buf[pos++]; + qcb->csr[index].ipsrc_addr[0] = buf[pos++]; + qcb->csr[index].ipsrc_addr[1] = buf[pos++]; + qcb->csr[index].ipsrc_addr[2] = buf[pos++]; + qcb->csr[index].ipsrc_addr[3] = buf[pos++]; + qcb->csr[index].ipdst_addrmask[0] = buf[pos++]; + qcb->csr[index].ipdst_addrmask[1] = buf[pos++]; + qcb->csr[index].ipdst_addrmask[2] = buf[pos++]; + qcb->csr[index].ipdst_addrmask[3] = buf[pos++]; + qcb->csr[index].ipdst_addr[0] = buf[pos++]; + qcb->csr[index].ipdst_addr[1] = buf[pos++]; + qcb->csr[index].ipdst_addr[2] = buf[pos++]; + qcb->csr[index].ipdst_addr[3] = buf[pos++]; + qcb->csr[index].srcport_lo = ((buf[pos++]<<8)&0xff00); + qcb->csr[index].srcport_lo += buf[pos++]; + qcb->csr[index].srcport_hi = ((buf[pos++]<<8)&0xff00); + qcb->csr[index].srcport_hi += buf[pos++]; + qcb->csr[index].dstport_lo = ((buf[pos++]<<8)&0xff00); + qcb->csr[index].dstport_lo += buf[pos++]; + qcb->csr[index].dstport_hi = ((buf[pos++]<<8)&0xff00); + qcb->csr[index].dstport_hi += buf[pos++]; qcb->qos_limit_size = 254/qcb->qos_list_cnt; spin_unlock_irqrestore(&qcb->qos_lock, flags); @@ -444,7 +444,7 @@ void gdm_recv_qos_hci_packet(void *nic_ptr, u8 *buf, int size) INIT_LIST_HEAD(&free_list); spin_lock_irqsave(&qcb->qos_lock, flags); - qcb->csr[index].Enabled = 0; + qcb->csr[index].enabled = 0; qcb->qos_list_cnt--; qcb->qos_limit_size = 254/qcb->qos_list_cnt; diff --git a/drivers/staging/gdm72xx/gdm_qos.h b/drivers/staging/gdm72xx/gdm_qos.h index 33f2bd4cee3..8f18119d22a 100644 --- a/drivers/staging/gdm72xx/gdm_qos.h +++ b/drivers/staging/gdm72xx/gdm_qos.h @@ -20,18 +20,18 @@ #define BOOLEAN u8 -#define QOS_MAX 16 -#define IPTYPEOFSERVICE 0x8000 -#define PROTOCOL 0x4000 -#define IPMASKEDSRCADDRESS 0x2000 -#define IPMASKEDDSTADDRESS 0x1000 +#define QOS_MAX 16 +#define IPTYPEOFSERVICE 0x8000 +#define PROTOCOL 0x4000 +#define IPMASKEDSRCADDRESS 0x2000 +#define IPMASKEDDSTADDRESS 0x1000 #define PROTOCOLSRCPORTRANGE 0x800 #define PROTOCOLDSTPORTRANGE 0x400 -#define DSTMACADDR 0x200 -#define SRCMACADDR 0x100 -#define ETHERTYPE 0x80 +#define DSTMACADDR 0x200 +#define SRCMACADDR 0x100 +#define ETHERTYPE 0x80 #define IEEE802_1DUSERPRIORITY 0x40 -#define IEEE802_1QVLANID 0x10 +#define IEEE802_1QVLANID 0x10 struct gdm_wimax_csr_s { /* union{ @@ -51,28 +51,28 @@ struct gdm_wimax_csr_s { Reserved:5; } fields; } */ - BOOLEAN Enabled; - u32 SFID; - u8 QoSBufCount; - u16 ClassifierRuleEnable; - u8 IPToSLow; - u8 IPToSHigh; - u8 IPToSMask; - u8 Protocol; - u8 IPSrcAddr[16]; - u8 IPSrcAddrMask[16]; - u8 IPDstAddr[16]; - u8 IPDstAddrMask[16]; - u16 SrcPortLow; - u16 SrcPortHigh; - u16 DstPortLow; - u16 DstPortHigh; + BOOLEAN enabled; + u32 SFID; + u8 qos_buf_count; + u16 classifier_rule_en; + u8 ip2s_lo; + u8 ip2s_hi; + u8 ip2s_mask; + u8 protocol; + u8 ipsrc_addr[16]; + u8 ipsrc_addrmask[16]; + u8 ipdst_addr[16]; + u8 ipdst_addrmask[16]; + u16 srcport_lo; + u16 srcport_hi; + u16 dstport_lo; + u16 dstport_hi; }; struct qos_entry_s { - struct list_head list; - struct sk_buff *skb; - struct net_device *dev; + struct list_head list; + struct sk_buff *skb; + struct net_device *dev; }; @@ -81,7 +81,7 @@ struct qos_cb_s { u32 qos_list_cnt; u32 qos_null_idx; struct gdm_wimax_csr_s csr[QOS_MAX]; - spinlock_t qos_lock; + spinlock_t qos_lock; u32 qos_limit_size; }; |