aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas/debugfs.c
diff options
context:
space:
mode:
authorHolger Schurig <hs4233@mail.mn-solutions.de>2007-08-02 11:53:36 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:49:53 -0400
commit6b63cd0f420c3c3002024da6c9eff252a3772021 (patch)
tree87df4e20432a393b9137952a4ad6aa0cc63163b5 /drivers/net/wireless/libertas/debugfs.c
parentece561919326236c7fb791a5e883f0eb76af029e (diff)
[PATCH] libertas: remove a hundred CMD_RET_xxx definitions
types.h contains the same amount of CMD_RET_xxx and CMD_xxx definitions. They contains the same info: the firmware command opcode and, when the firmware sends back a result, the command opcode ORed with 0x8000. Having the same data twice in the source code is redundant and can lead to errors (e.g. if you update or delete only one instance). This patch removed all CMD_RET_xxx definitions and introduces a simple CMD_RET() macro. Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas/debugfs.c')
-rw-r--r--drivers/net/wireless/libertas/debugfs.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/net/wireless/libertas/debugfs.c b/drivers/net/wireless/libertas/debugfs.c
index 9439005db4e6..4b9533a66511 100644
--- a/drivers/net/wireless/libertas/debugfs.c
+++ b/drivers/net/wireless/libertas/debugfs.c
@@ -447,7 +447,7 @@ static ssize_t libertas_lowrssi_read(struct file *file, char __user *userbuf,
447 return 0; 447 return 0;
448 } 448 }
449 449
450 if (pcmdptr->command != cpu_to_le16(CMD_RET_802_11_SUBSCRIBE_EVENT)) { 450 if (pcmdptr->command != cpu_to_le16(CMD_RET(CMD_802_11_SUBSCRIBE_EVENT))) {
451 lbs_pr_err("command response incorrect!\n"); 451 lbs_pr_err("command response incorrect!\n");
452 kfree(response_buf); 452 kfree(response_buf);
453 free_page(addr); 453 free_page(addr);
@@ -511,7 +511,7 @@ static u16 libertas_get_events_bitmap(wlan_private *priv)
511 return 0; 511 return 0;
512 } 512 }
513 513
514 if (pcmdptr->command != CMD_RET_802_11_SUBSCRIBE_EVENT) { 514 if (pcmdptr->command != CMD_RET(CMD_802_11_SUBSCRIBE_EVENT)) {
515 lbs_pr_err("command response incorrect!\n"); 515 lbs_pr_err("command response incorrect!\n");
516 kfree(response_buf); 516 kfree(response_buf);
517 return 0; 517 return 0;
@@ -591,7 +591,7 @@ static ssize_t libertas_lowrssi_write(struct file *file,
591 return 0; 591 return 0;
592 } 592 }
593 593
594 if (pcmdptr->command != cpu_to_le16(CMD_RET_802_11_SUBSCRIBE_EVENT)) { 594 if (pcmdptr->command != cpu_to_le16(CMD_RET(CMD_802_11_SUBSCRIBE_EVENT))) {
595 lbs_pr_err("command response incorrect!\n"); 595 lbs_pr_err("command response incorrect!\n");
596 kfree(response_buf); 596 kfree(response_buf);
597 free_page(addr); 597 free_page(addr);
@@ -644,7 +644,7 @@ static ssize_t libertas_lowsnr_read(struct file *file, char __user *userbuf,
644 return 0; 644 return 0;
645 } 645 }
646 646
647 if (pcmdptr->command != cpu_to_le16(CMD_RET_802_11_SUBSCRIBE_EVENT)) { 647 if (pcmdptr->command != cpu_to_le16(CMD_RET(CMD_802_11_SUBSCRIBE_EVENT))) {
648 lbs_pr_err("command response incorrect!\n"); 648 lbs_pr_err("command response incorrect!\n");
649 kfree(response_buf); 649 kfree(response_buf);
650 free_page(addr); 650 free_page(addr);
@@ -743,7 +743,7 @@ static ssize_t libertas_lowsnr_write(struct file *file,
743 return 0; 743 return 0;
744 } 744 }
745 745
746 if (pcmdptr->command != cpu_to_le16(CMD_RET_802_11_SUBSCRIBE_EVENT)) { 746 if (pcmdptr->command != cpu_to_le16(CMD_RET(CMD_802_11_SUBSCRIBE_EVENT))) {
747 lbs_pr_err("command response incorrect!\n"); 747 lbs_pr_err("command response incorrect!\n");
748 kfree(response_buf); 748 kfree(response_buf);
749 free_page(addr); 749 free_page(addr);
@@ -797,7 +797,7 @@ static ssize_t libertas_failcount_read(struct file *file, char __user *userbuf,
797 return 0; 797 return 0;
798 } 798 }
799 799
800 if (pcmdptr->command != cpu_to_le16(CMD_RET_802_11_SUBSCRIBE_EVENT)) { 800 if (pcmdptr->command != cpu_to_le16(CMD_RET(CMD_802_11_SUBSCRIBE_EVENT))) {
801 lbs_pr_err("command response incorrect!\n"); 801 lbs_pr_err("command response incorrect!\n");
802 kfree(response_buf); 802 kfree(response_buf);
803 free_page(addr); 803 free_page(addr);
@@ -895,7 +895,7 @@ static ssize_t libertas_failcount_write(struct file *file,
895 return 0; 895 return 0;
896 } 896 }
897 897
898 if (pcmdptr->command != cpu_to_le16(CMD_RET_802_11_SUBSCRIBE_EVENT)) { 898 if (pcmdptr->command != cpu_to_le16(CMD_RET(CMD_802_11_SUBSCRIBE_EVENT))) {
899 lbs_pr_err("command response incorrect!\n"); 899 lbs_pr_err("command response incorrect!\n");
900 kfree(response_buf); 900 kfree(response_buf);
901 free_page(addr); 901 free_page(addr);
@@ -948,7 +948,7 @@ static ssize_t libertas_bcnmiss_read(struct file *file, char __user *userbuf,
948 return 0; 948 return 0;
949 } 949 }
950 950
951 if (pcmdptr->command != cpu_to_le16(CMD_RET_802_11_SUBSCRIBE_EVENT)) { 951 if (pcmdptr->command != cpu_to_le16(CMD_RET(CMD_802_11_SUBSCRIBE_EVENT))) {
952 lbs_pr_err("command response incorrect!\n"); 952 lbs_pr_err("command response incorrect!\n");
953 free_page(addr); 953 free_page(addr);
954 kfree(response_buf); 954 kfree(response_buf);
@@ -1045,7 +1045,7 @@ static ssize_t libertas_bcnmiss_write(struct file *file,
1045 return 0; 1045 return 0;
1046 } 1046 }
1047 1047
1048 if (pcmdptr->command != cpu_to_le16(CMD_RET_802_11_SUBSCRIBE_EVENT)) { 1048 if (pcmdptr->command != cpu_to_le16(CMD_RET(CMD_802_11_SUBSCRIBE_EVENT))) {
1049 lbs_pr_err("command response incorrect!\n"); 1049 lbs_pr_err("command response incorrect!\n");
1050 free_page(addr); 1050 free_page(addr);
1051 kfree(response_buf); 1051 kfree(response_buf);
@@ -1098,7 +1098,7 @@ static ssize_t libertas_highrssi_read(struct file *file, char __user *userbuf,
1098 return 0; 1098 return 0;
1099 } 1099 }
1100 1100
1101 if (pcmdptr->command != cpu_to_le16(CMD_RET_802_11_SUBSCRIBE_EVENT)) { 1101 if (pcmdptr->command != cpu_to_le16(CMD_RET(CMD_802_11_SUBSCRIBE_EVENT))) {
1102 lbs_pr_err("command response incorrect!\n"); 1102 lbs_pr_err("command response incorrect!\n");
1103 kfree(response_buf); 1103 kfree(response_buf);
1104 free_page(addr); 1104 free_page(addr);
@@ -1196,7 +1196,7 @@ static ssize_t libertas_highrssi_write(struct file *file,
1196 return 0; 1196 return 0;
1197 } 1197 }
1198 1198
1199 if (pcmdptr->command != cpu_to_le16(CMD_RET_802_11_SUBSCRIBE_EVENT)) { 1199 if (pcmdptr->command != cpu_to_le16(CMD_RET(CMD_802_11_SUBSCRIBE_EVENT))) {
1200 lbs_pr_err("command response incorrect!\n"); 1200 lbs_pr_err("command response incorrect!\n");
1201 kfree(response_buf); 1201 kfree(response_buf);
1202 return 0; 1202 return 0;
@@ -1248,7 +1248,7 @@ static ssize_t libertas_highsnr_read(struct file *file, char __user *userbuf,
1248 return 0; 1248 return 0;
1249 } 1249 }
1250 1250
1251 if (pcmdptr->command != cpu_to_le16(CMD_RET_802_11_SUBSCRIBE_EVENT)) { 1251 if (pcmdptr->command != cpu_to_le16(CMD_RET(CMD_802_11_SUBSCRIBE_EVENT))) {
1252 lbs_pr_err("command response incorrect!\n"); 1252 lbs_pr_err("command response incorrect!\n");
1253 kfree(response_buf); 1253 kfree(response_buf);
1254 free_page(addr); 1254 free_page(addr);
@@ -1347,7 +1347,7 @@ static ssize_t libertas_highsnr_write(struct file *file,
1347 return 0; 1347 return 0;
1348 } 1348 }
1349 1349
1350 if (pcmdptr->command != cpu_to_le16(CMD_RET_802_11_SUBSCRIBE_EVENT)) { 1350 if (pcmdptr->command != cpu_to_le16(CMD_RET(CMD_802_11_SUBSCRIBE_EVENT))) {
1351 lbs_pr_err("command response incorrect!\n"); 1351 lbs_pr_err("command response incorrect!\n");
1352 kfree(response_buf); 1352 kfree(response_buf);
1353 free_page(addr); 1353 free_page(addr);