summaryrefslogtreecommitdiffstats
path: root/drivers/staging/vt6656
diff options
context:
space:
mode:
authorMalcolm Priestley <tvboxspy@gmail.com>2014-05-23 18:00:15 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-05-24 04:46:09 +0900
commit3605f84e780252c987a4eae7050aaddcec8bf639 (patch)
tree571a94e3af15f79f4e448817dbca1406491e4c64 /drivers/staging/vt6656
parentddb8c95f9364dd99330db7ef3582f5871b05a811 (diff)
staging: vt6656: camel case clean up CARDvCalculateOFDMRParameter
Camel case changes wRate -> rate byBBType -> bb_type pbyTxRate -> tx_rate pbyRsvTime -> rsv_time Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/vt6656')
-rw-r--r--drivers/staging/vt6656/card.c185
1 files changed, 83 insertions, 102 deletions
diff --git a/drivers/staging/vt6656/card.c b/drivers/staging/vt6656/card.c
index b8f35e7a25e..1674a6f4927 100644
--- a/drivers/staging/vt6656/card.c
+++ b/drivers/staging/vt6656/card.c
@@ -190,114 +190,95 @@ static u16 swGetOFDMControlRate(struct vnt_private *pDevice, u16 wRateIdx)
* Description: Calculate TxRate and RsvTime fields for RSPINF in OFDM mode.
*
* Parameters:
- * In:
- * wRate - Tx Rate
- * byPktType - Tx Packet type
- * Out:
- * pbyTxRate - pointer to RSPINF TxRate field
- * pbyRsvTime - pointer to RSPINF RsvTime field
+ * In:
+ * rate - Tx Rate
+ * bb_type - Tx Packet type
+ * Out:
+ * tx_rate - pointer to RSPINF TxRate field
+ * rsv_time- pointer to RSPINF RsvTime field
*
* Return Value: none
*
*/
-static void
-CARDvCalculateOFDMRParameter (
- u16 wRate,
- u8 byBBType,
- u8 * pbyTxRate,
- u8 * pbyRsvTime
- )
+void CARDvCalculateOFDMRParameter(u16 rate, u8 bb_type,
+ u8 *tx_rate, u8 *rsv_time)
{
- switch (wRate) {
- case RATE_6M :
- if (byBBType == BB_TYPE_11A) {//5GHZ
- *pbyTxRate = 0x9B;
- *pbyRsvTime = 24;
- }
- else {
- *pbyTxRate = 0x8B;
- *pbyRsvTime = 30;
- }
- break;
-
- case RATE_9M :
- if (byBBType == BB_TYPE_11A) {//5GHZ
- *pbyTxRate = 0x9F;
- *pbyRsvTime = 16;
- }
- else {
- *pbyTxRate = 0x8F;
- *pbyRsvTime = 22;
- }
- break;
-
- case RATE_12M :
- if (byBBType == BB_TYPE_11A) {//5GHZ
- *pbyTxRate = 0x9A;
- *pbyRsvTime = 12;
- }
- else {
- *pbyTxRate = 0x8A;
- *pbyRsvTime = 18;
- }
- break;
-
- case RATE_18M :
- if (byBBType == BB_TYPE_11A) {//5GHZ
- *pbyTxRate = 0x9E;
- *pbyRsvTime = 8;
- }
- else {
- *pbyTxRate = 0x8E;
- *pbyRsvTime = 14;
- }
- break;
-
- case RATE_36M :
- if (byBBType == BB_TYPE_11A) {//5GHZ
- *pbyTxRate = 0x9D;
- *pbyRsvTime = 4;
- }
- else {
- *pbyTxRate = 0x8D;
- *pbyRsvTime = 10;
- }
- break;
-
- case RATE_48M :
- if (byBBType == BB_TYPE_11A) {//5GHZ
- *pbyTxRate = 0x98;
- *pbyRsvTime = 4;
- }
- else {
- *pbyTxRate = 0x88;
- *pbyRsvTime = 10;
- }
- break;
-
- case RATE_54M :
- if (byBBType == BB_TYPE_11A) {//5GHZ
- *pbyTxRate = 0x9C;
- *pbyRsvTime = 4;
- }
- else {
- *pbyTxRate = 0x8C;
- *pbyRsvTime = 10;
- }
- break;
- case RATE_24M :
- default :
- if (byBBType == BB_TYPE_11A) {//5GHZ
- *pbyTxRate = 0x99;
- *pbyRsvTime = 8;
- }
- else {
- *pbyTxRate = 0x89;
- *pbyRsvTime = 14;
- }
- break;
- }
+ switch (rate) {
+ case RATE_6M:
+ if (bb_type == BB_TYPE_11A) {
+ *tx_rate = 0x9b;
+ *rsv_time = 24;
+ } else {
+ *tx_rate = 0x8b;
+ *rsv_time = 30;
+ }
+ break;
+ case RATE_9M:
+ if (bb_type == BB_TYPE_11A) {
+ *tx_rate = 0x9f;
+ *rsv_time = 16;
+ } else {
+ *tx_rate = 0x8f;
+ *rsv_time = 22;
+ }
+ break;
+ case RATE_12M:
+ if (bb_type == BB_TYPE_11A) {
+ *tx_rate = 0x9a;
+ *rsv_time = 12;
+ } else {
+ *tx_rate = 0x8a;
+ *rsv_time = 18;
+ }
+ break;
+ case RATE_18M:
+ if (bb_type == BB_TYPE_11A) {
+ *tx_rate = 0x9e;
+ *rsv_time = 8;
+ } else {
+ *tx_rate = 0x8e;
+ *rsv_time = 14;
+ }
+ break;
+ case RATE_36M:
+ if (bb_type == BB_TYPE_11A) {
+ *tx_rate = 0x9d;
+ *rsv_time = 4;
+ } else {
+ *tx_rate = 0x8d;
+ *rsv_time = 10;
+ }
+ break;
+ case RATE_48M:
+ if (bb_type == BB_TYPE_11A) {
+ *tx_rate = 0x98;
+ *rsv_time = 4;
+ } else {
+ *tx_rate = 0x88;
+ *rsv_time = 10;
+ }
+ break;
+ case RATE_54M:
+ if (bb_type == BB_TYPE_11A) {
+ *tx_rate = 0x9c;
+ *rsv_time = 4;
+ } else {
+ *tx_rate = 0x8c;
+ *rsv_time = 10;
+ }
+ break;
+ case RATE_24M:
+ default:
+ if (bb_type == BB_TYPE_11A) {
+ *tx_rate = 0x99;
+ *rsv_time = 8;
+ } else {
+ *tx_rate = 0x89;
+ *rsv_time = 14;
+ }
+ break;
+ }
}
/*