aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas/cmd.c
diff options
context:
space:
mode:
authorHolger Schurig <hs4233@mail.mn-solutions.de>2007-11-23 09:43:44 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 18:04:54 -0500
commit69f9032d9dfeb763b467fdbe8cf5938f5457083a (patch)
tree613598938e17e1a7514e0da3817f3cfebbe346a9 /drivers/net/wireless/libertas/cmd.c
parent96287ac4f7b387acbe17e24b5e1bcbf3bc0e75cd (diff)
libertas: remove arbitrary typedefs
New typedefs are usually frowned upon. This patch changes libertas_adapter -> struct libertas_adapter libertas_priv -> struct libertas_priv While passing, make everything checkpatch.pl-clean that gets touches. Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas/cmd.c')
-rw-r--r--drivers/net/wireless/libertas/cmd.c144
1 files changed, 74 insertions, 70 deletions
diff --git a/drivers/net/wireless/libertas/cmd.c b/drivers/net/wireless/libertas/cmd.c
index 3702c5da1f6f..dde17c65bccd 100644
--- a/drivers/net/wireless/libertas/cmd.c
+++ b/drivers/net/wireless/libertas/cmd.c
@@ -37,7 +37,7 @@ static u8 is_command_allowed_in_ps(__le16 command)
37 return 0; 37 return 0;
38} 38}
39 39
40static int lbs_cmd_hw_spec(lbs_private * priv, struct cmd_ds_command *cmd) 40static int lbs_cmd_hw_spec(struct lbs_private *priv, struct cmd_ds_command *cmd)
41{ 41{
42 struct cmd_ds_get_hw_spec *hwspec = &cmd->params.hwspec; 42 struct cmd_ds_get_hw_spec *hwspec = &cmd->params.hwspec;
43 43
@@ -51,7 +51,7 @@ static int lbs_cmd_hw_spec(lbs_private * priv, struct cmd_ds_command *cmd)
51 return 0; 51 return 0;
52} 52}
53 53
54static int lbs_cmd_802_11_ps_mode(lbs_private * priv, 54static int lbs_cmd_802_11_ps_mode(struct lbs_private *priv,
55 struct cmd_ds_command *cmd, 55 struct cmd_ds_command *cmd,
56 u16 cmd_action) 56 u16 cmd_action)
57{ 57{
@@ -90,7 +90,7 @@ static int lbs_cmd_802_11_ps_mode(lbs_private * priv,
90 return 0; 90 return 0;
91} 91}
92 92
93static int lbs_cmd_802_11_inactivity_timeout(lbs_private * priv, 93static int lbs_cmd_802_11_inactivity_timeout(struct lbs_private *priv,
94 struct cmd_ds_command *cmd, 94 struct cmd_ds_command *cmd,
95 u16 cmd_action, void *pdata_buf) 95 u16 cmd_action, void *pdata_buf)
96{ 96{
@@ -114,11 +114,11 @@ static int lbs_cmd_802_11_inactivity_timeout(lbs_private * priv,
114 return 0; 114 return 0;
115} 115}
116 116
117static int lbs_cmd_802_11_sleep_params(lbs_private * priv, 117static int lbs_cmd_802_11_sleep_params(struct lbs_private *priv,
118 struct cmd_ds_command *cmd, 118 struct cmd_ds_command *cmd,
119 u16 cmd_action) 119 u16 cmd_action)
120{ 120{
121 lbs_adapter *adapter = priv->adapter; 121 struct lbs_adapter *adapter = priv->adapter;
122 struct cmd_ds_802_11_sleep_params *sp = &cmd->params.sleep_params; 122 struct cmd_ds_802_11_sleep_params *sp = &cmd->params.sleep_params;
123 123
124 lbs_deb_enter(LBS_DEB_CMD); 124 lbs_deb_enter(LBS_DEB_CMD);
@@ -145,13 +145,13 @@ static int lbs_cmd_802_11_sleep_params(lbs_private * priv,
145 return 0; 145 return 0;
146} 146}
147 147
148static int lbs_cmd_802_11_set_wep(lbs_private * priv, 148static int lbs_cmd_802_11_set_wep(struct lbs_private *priv,
149 struct cmd_ds_command *cmd, 149 struct cmd_ds_command *cmd,
150 u32 cmd_act, 150 u32 cmd_act,
151 void * pdata_buf) 151 void * pdata_buf)
152{ 152{
153 struct cmd_ds_802_11_set_wep *wep = &cmd->params.wep; 153 struct cmd_ds_802_11_set_wep *wep = &cmd->params.wep;
154 lbs_adapter *adapter = priv->adapter; 154 struct lbs_adapter *adapter = priv->adapter;
155 int ret = 0; 155 int ret = 0;
156 struct assoc_request * assoc_req = pdata_buf; 156 struct assoc_request * assoc_req = pdata_buf;
157 157
@@ -219,7 +219,7 @@ done:
219 return ret; 219 return ret;
220} 220}
221 221
222static int lbs_cmd_802_11_enable_rsn(lbs_private * priv, 222static int lbs_cmd_802_11_enable_rsn(struct lbs_private *priv,
223 struct cmd_ds_command *cmd, 223 struct cmd_ds_command *cmd,
224 u16 cmd_action, 224 u16 cmd_action,
225 void * pdata_buf) 225 void * pdata_buf)
@@ -272,7 +272,7 @@ static void set_one_wpa_key(struct MrvlIEtype_keyParamSet * pkeyparamset,
272 lbs_deb_leave(LBS_DEB_CMD); 272 lbs_deb_leave(LBS_DEB_CMD);
273} 273}
274 274
275static int lbs_cmd_802_11_key_material(lbs_private * priv, 275static int lbs_cmd_802_11_key_material(struct lbs_private *priv,
276 struct cmd_ds_command *cmd, 276 struct cmd_ds_command *cmd,
277 u16 cmd_action, 277 u16 cmd_action,
278 u32 cmd_oid, void *pdata_buf) 278 u32 cmd_oid, void *pdata_buf)
@@ -319,7 +319,7 @@ done:
319 return ret; 319 return ret;
320} 320}
321 321
322static int lbs_cmd_802_11_reset(lbs_private * priv, 322static int lbs_cmd_802_11_reset(struct lbs_private *priv,
323 struct cmd_ds_command *cmd, int cmd_action) 323 struct cmd_ds_command *cmd, int cmd_action)
324{ 324{
325 struct cmd_ds_802_11_reset *reset = &cmd->params.reset; 325 struct cmd_ds_802_11_reset *reset = &cmd->params.reset;
@@ -334,7 +334,7 @@ static int lbs_cmd_802_11_reset(lbs_private * priv,
334 return 0; 334 return 0;
335} 335}
336 336
337static int lbs_cmd_802_11_get_log(lbs_private * priv, 337static int lbs_cmd_802_11_get_log(struct lbs_private *priv,
338 struct cmd_ds_command *cmd) 338 struct cmd_ds_command *cmd)
339{ 339{
340 lbs_deb_enter(LBS_DEB_CMD); 340 lbs_deb_enter(LBS_DEB_CMD);
@@ -346,7 +346,7 @@ static int lbs_cmd_802_11_get_log(lbs_private * priv,
346 return 0; 346 return 0;
347} 347}
348 348
349static int lbs_cmd_802_11_get_stat(lbs_private * priv, 349static int lbs_cmd_802_11_get_stat(struct lbs_private *priv,
350 struct cmd_ds_command *cmd) 350 struct cmd_ds_command *cmd)
351{ 351{
352 lbs_deb_enter(LBS_DEB_CMD); 352 lbs_deb_enter(LBS_DEB_CMD);
@@ -358,13 +358,13 @@ static int lbs_cmd_802_11_get_stat(lbs_private * priv,
358 return 0; 358 return 0;
359} 359}
360 360
361static int lbs_cmd_802_11_snmp_mib(lbs_private * priv, 361static int lbs_cmd_802_11_snmp_mib(struct lbs_private *priv,
362 struct cmd_ds_command *cmd, 362 struct cmd_ds_command *cmd,
363 int cmd_action, 363 int cmd_action,
364 int cmd_oid, void *pdata_buf) 364 int cmd_oid, void *pdata_buf)
365{ 365{
366 struct cmd_ds_802_11_snmp_mib *pSNMPMIB = &cmd->params.smib; 366 struct cmd_ds_802_11_snmp_mib *pSNMPMIB = &cmd->params.smib;
367 lbs_adapter *adapter = priv->adapter; 367 struct lbs_adapter *adapter = priv->adapter;
368 u8 ucTemp; 368 u8 ucTemp;
369 369
370 lbs_deb_enter(LBS_DEB_CMD); 370 lbs_deb_enter(LBS_DEB_CMD);
@@ -479,11 +479,11 @@ static int lbs_cmd_802_11_snmp_mib(lbs_private * priv,
479 return 0; 479 return 0;
480} 480}
481 481
482static int lbs_cmd_802_11_radio_control(lbs_private * priv, 482static int lbs_cmd_802_11_radio_control(struct lbs_private *priv,
483 struct cmd_ds_command *cmd, 483 struct cmd_ds_command *cmd,
484 int cmd_action) 484 int cmd_action)
485{ 485{
486 lbs_adapter *adapter = priv->adapter; 486 struct lbs_adapter *adapter = priv->adapter;
487 struct cmd_ds_802_11_radio_control *pradiocontrol = &cmd->params.radio; 487 struct cmd_ds_802_11_radio_control *pradiocontrol = &cmd->params.radio;
488 488
489 lbs_deb_enter(LBS_DEB_CMD); 489 lbs_deb_enter(LBS_DEB_CMD);
@@ -519,7 +519,7 @@ static int lbs_cmd_802_11_radio_control(lbs_private * priv,
519 return 0; 519 return 0;
520} 520}
521 521
522static int lbs_cmd_802_11_rf_tx_power(lbs_private * priv, 522static int lbs_cmd_802_11_rf_tx_power(struct lbs_private *priv,
523 struct cmd_ds_command *cmd, 523 struct cmd_ds_command *cmd,
524 u16 cmd_action, void *pdata_buf) 524 u16 cmd_action, void *pdata_buf)
525{ 525{
@@ -563,7 +563,7 @@ static int lbs_cmd_802_11_rf_tx_power(lbs_private * priv,
563 return 0; 563 return 0;
564} 564}
565 565
566static int lbs_cmd_802_11_monitor_mode(lbs_private * priv, 566static int lbs_cmd_802_11_monitor_mode(struct lbs_private *priv,
567 struct cmd_ds_command *cmd, 567 struct cmd_ds_command *cmd,
568 u16 cmd_action, void *pdata_buf) 568 u16 cmd_action, void *pdata_buf)
569{ 569{
@@ -583,13 +583,13 @@ static int lbs_cmd_802_11_monitor_mode(lbs_private * priv,
583 return 0; 583 return 0;
584} 584}
585 585
586static int lbs_cmd_802_11_rate_adapt_rateset(lbs_private * priv, 586static int lbs_cmd_802_11_rate_adapt_rateset(struct lbs_private *priv,
587 struct cmd_ds_command *cmd, 587 struct cmd_ds_command *cmd,
588 u16 cmd_action) 588 u16 cmd_action)
589{ 589{
590 struct cmd_ds_802_11_rate_adapt_rateset 590 struct cmd_ds_802_11_rate_adapt_rateset
591 *rateadapt = &cmd->params.rateset; 591 *rateadapt = &cmd->params.rateset;
592 lbs_adapter *adapter = priv->adapter; 592 struct lbs_adapter *adapter = priv->adapter;
593 593
594 lbs_deb_enter(LBS_DEB_CMD); 594 lbs_deb_enter(LBS_DEB_CMD);
595 cmd->size = 595 cmd->size =
@@ -605,12 +605,12 @@ static int lbs_cmd_802_11_rate_adapt_rateset(lbs_private * priv,
605 return 0; 605 return 0;
606} 606}
607 607
608static int lbs_cmd_802_11_data_rate(lbs_private * priv, 608static int lbs_cmd_802_11_data_rate(struct lbs_private *priv,
609 struct cmd_ds_command *cmd, 609 struct cmd_ds_command *cmd,
610 u16 cmd_action) 610 u16 cmd_action)
611{ 611{
612 struct cmd_ds_802_11_data_rate *pdatarate = &cmd->params.drate; 612 struct cmd_ds_802_11_data_rate *pdatarate = &cmd->params.drate;
613 lbs_adapter *adapter = priv->adapter; 613 struct lbs_adapter *adapter = priv->adapter;
614 614
615 lbs_deb_enter(LBS_DEB_CMD); 615 lbs_deb_enter(LBS_DEB_CMD);
616 616
@@ -632,12 +632,12 @@ static int lbs_cmd_802_11_data_rate(lbs_private * priv,
632 return 0; 632 return 0;
633} 633}
634 634
635static int lbs_cmd_mac_multicast_adr(lbs_private * priv, 635static int lbs_cmd_mac_multicast_adr(struct lbs_private *priv,
636 struct cmd_ds_command *cmd, 636 struct cmd_ds_command *cmd,
637 u16 cmd_action) 637 u16 cmd_action)
638{ 638{
639 struct cmd_ds_mac_multicast_adr *pMCastAdr = &cmd->params.madr; 639 struct cmd_ds_mac_multicast_adr *pMCastAdr = &cmd->params.madr;
640 lbs_adapter *adapter = priv->adapter; 640 struct lbs_adapter *adapter = priv->adapter;
641 641
642 lbs_deb_enter(LBS_DEB_CMD); 642 lbs_deb_enter(LBS_DEB_CMD);
643 cmd->size = cpu_to_le16(sizeof(struct cmd_ds_mac_multicast_adr) + 643 cmd->size = cpu_to_le16(sizeof(struct cmd_ds_mac_multicast_adr) +
@@ -655,7 +655,7 @@ static int lbs_cmd_mac_multicast_adr(lbs_private * priv,
655 return 0; 655 return 0;
656} 656}
657 657
658static int lbs_cmd_802_11_rf_channel(lbs_private * priv, 658static int lbs_cmd_802_11_rf_channel(struct lbs_private *priv,
659 struct cmd_ds_command *cmd, 659 struct cmd_ds_command *cmd,
660 int option, void *pdata_buf) 660 int option, void *pdata_buf)
661{ 661{
@@ -676,10 +676,10 @@ static int lbs_cmd_802_11_rf_channel(lbs_private * priv,
676 return 0; 676 return 0;
677} 677}
678 678
679static int lbs_cmd_802_11_rssi(lbs_private * priv, 679static int lbs_cmd_802_11_rssi(struct lbs_private *priv,
680 struct cmd_ds_command *cmd) 680 struct cmd_ds_command *cmd)
681{ 681{
682 lbs_adapter *adapter = priv->adapter; 682 struct lbs_adapter *adapter = priv->adapter;
683 683
684 lbs_deb_enter(LBS_DEB_CMD); 684 lbs_deb_enter(LBS_DEB_CMD);
685 cmd->command = cpu_to_le16(CMD_802_11_RSSI); 685 cmd->command = cpu_to_le16(CMD_802_11_RSSI);
@@ -698,7 +698,7 @@ static int lbs_cmd_802_11_rssi(lbs_private * priv,
698 return 0; 698 return 0;
699} 699}
700 700
701static int lbs_cmd_reg_access(lbs_private * priv, 701static int lbs_cmd_reg_access(struct lbs_private *priv,
702 struct cmd_ds_command *cmdptr, 702 struct cmd_ds_command *cmdptr,
703 u8 cmd_action, void *pdata_buf) 703 u8 cmd_action, void *pdata_buf)
704{ 704{
@@ -773,11 +773,11 @@ static int lbs_cmd_reg_access(lbs_private * priv,
773 return 0; 773 return 0;
774} 774}
775 775
776static int lbs_cmd_802_11_mac_address(lbs_private * priv, 776static int lbs_cmd_802_11_mac_address(struct lbs_private *priv,
777 struct cmd_ds_command *cmd, 777 struct cmd_ds_command *cmd,
778 u16 cmd_action) 778 u16 cmd_action)
779{ 779{
780 lbs_adapter *adapter = priv->adapter; 780 struct lbs_adapter *adapter = priv->adapter;
781 781
782 lbs_deb_enter(LBS_DEB_CMD); 782 lbs_deb_enter(LBS_DEB_CMD);
783 cmd->command = cpu_to_le16(CMD_802_11_MAC_ADDRESS); 783 cmd->command = cpu_to_le16(CMD_802_11_MAC_ADDRESS);
@@ -797,7 +797,7 @@ static int lbs_cmd_802_11_mac_address(lbs_private * priv,
797 return 0; 797 return 0;
798} 798}
799 799
800static int lbs_cmd_802_11_eeprom_access(lbs_private * priv, 800static int lbs_cmd_802_11_eeprom_access(struct lbs_private *priv,
801 struct cmd_ds_command *cmd, 801 struct cmd_ds_command *cmd,
802 int cmd_action, void *pdata_buf) 802 int cmd_action, void *pdata_buf)
803{ 803{
@@ -819,7 +819,7 @@ static int lbs_cmd_802_11_eeprom_access(lbs_private * priv,
819 return 0; 819 return 0;
820} 820}
821 821
822static int lbs_cmd_bt_access(lbs_private * priv, 822static int lbs_cmd_bt_access(struct lbs_private *priv,
823 struct cmd_ds_command *cmd, 823 struct cmd_ds_command *cmd,
824 u16 cmd_action, void *pdata_buf) 824 u16 cmd_action, void *pdata_buf)
825{ 825{
@@ -857,7 +857,7 @@ static int lbs_cmd_bt_access(lbs_private * priv,
857 return 0; 857 return 0;
858} 858}
859 859
860static int lbs_cmd_fwt_access(lbs_private * priv, 860static int lbs_cmd_fwt_access(struct lbs_private *priv,
861 struct cmd_ds_command *cmd, 861 struct cmd_ds_command *cmd,
862 u16 cmd_action, void *pdata_buf) 862 u16 cmd_action, void *pdata_buf)
863{ 863{
@@ -879,7 +879,7 @@ static int lbs_cmd_fwt_access(lbs_private * priv,
879 return 0; 879 return 0;
880} 880}
881 881
882static int lbs_cmd_mesh_access(lbs_private * priv, 882static int lbs_cmd_mesh_access(struct lbs_private *priv,
883 struct cmd_ds_command *cmd, 883 struct cmd_ds_command *cmd,
884 u16 cmd_action, void *pdata_buf) 884 u16 cmd_action, void *pdata_buf)
885{ 885{
@@ -923,7 +923,7 @@ static int lbs_cmd_bcn_ctrl(struct lbs_private * priv,
923 return 0; 923 return 0;
924} 924}
925 925
926static int lbs_cmd_set_boot2_ver(lbs_private * priv, 926static int lbs_cmd_set_boot2_ver(struct lbs_private *priv,
927 struct cmd_ds_command *cmd, 927 struct cmd_ds_command *cmd,
928 u16 cmd_action, void *pdata_buf) 928 u16 cmd_action, void *pdata_buf)
929{ 929{
@@ -938,7 +938,9 @@ static int lbs_cmd_set_boot2_ver(lbs_private * priv,
938 * Note: NEVER use lbs_queue_cmd() with addtail==0 other than for 938 * Note: NEVER use lbs_queue_cmd() with addtail==0 other than for
939 * the command timer, because it does not account for queued commands. 939 * the command timer, because it does not account for queued commands.
940 */ 940 */
941void lbs_queue_cmd(lbs_adapter * adapter, struct cmd_ctrl_node *cmdnode, u8 addtail) 941void lbs_queue_cmd(struct lbs_adapter *adapter,
942 struct cmd_ctrl_node *cmdnode,
943 u8 addtail)
942{ 944{
943 unsigned long flags; 945 unsigned long flags;
944 struct cmd_ds_command *cmdptr; 946 struct cmd_ds_command *cmdptr;
@@ -990,12 +992,12 @@ done:
990 * For now - we are not performing the endian conversion the second time - but 992 * For now - we are not performing the endian conversion the second time - but
991 * for PS and DEEP_SLEEP we need to worry 993 * for PS and DEEP_SLEEP we need to worry
992 */ 994 */
993static int DownloadcommandToStation(lbs_private * priv, 995static int DownloadcommandToStation(struct lbs_private *priv,
994 struct cmd_ctrl_node *cmdnode) 996 struct cmd_ctrl_node *cmdnode)
995{ 997{
996 unsigned long flags; 998 unsigned long flags;
997 struct cmd_ds_command *cmdptr; 999 struct cmd_ds_command *cmdptr;
998 lbs_adapter *adapter = priv->adapter; 1000 struct lbs_adapter *adapter = priv->adapter;
999 int ret = -1; 1001 int ret = -1;
1000 u16 cmdsize; 1002 u16 cmdsize;
1001 u16 command; 1003 u16 command;
@@ -1060,7 +1062,7 @@ done:
1060 return ret; 1062 return ret;
1061} 1063}
1062 1064
1063static int lbs_cmd_mac_control(lbs_private * priv, 1065static int lbs_cmd_mac_control(struct lbs_private *priv,
1064 struct cmd_ds_command *cmd) 1066 struct cmd_ds_command *cmd)
1065{ 1067{
1066 struct cmd_ds_mac_control *mac = &cmd->params.macctrl; 1068 struct cmd_ds_mac_control *mac = &cmd->params.macctrl;
@@ -1082,9 +1084,10 @@ static int lbs_cmd_mac_control(lbs_private * priv,
1082 * This function inserts command node to cmdfreeq 1084 * This function inserts command node to cmdfreeq
1083 * after cleans it. Requires adapter->driver_lock held. 1085 * after cleans it. Requires adapter->driver_lock held.
1084 */ 1086 */
1085void __lbs_cleanup_and_insert_cmd(lbs_private * priv, struct cmd_ctrl_node *ptempcmd) 1087void __lbs_cleanup_and_insert_cmd(struct lbs_private *priv,
1088 struct cmd_ctrl_node *ptempcmd)
1086{ 1089{
1087 lbs_adapter *adapter = priv->adapter; 1090 struct lbs_adapter *adapter = priv->adapter;
1088 1091
1089 if (!ptempcmd) 1092 if (!ptempcmd)
1090 return; 1093 return;
@@ -1093,7 +1096,8 @@ void __lbs_cleanup_and_insert_cmd(lbs_private * priv, struct cmd_ctrl_node *ptem
1093 list_add_tail((struct list_head *)ptempcmd, &adapter->cmdfreeq); 1096 list_add_tail((struct list_head *)ptempcmd, &adapter->cmdfreeq);
1094} 1097}
1095 1098
1096static void lbs_cleanup_and_insert_cmd(lbs_private * priv, struct cmd_ctrl_node *ptempcmd) 1099static void lbs_cleanup_and_insert_cmd(struct lbs_private *priv,
1100 struct cmd_ctrl_node *ptempcmd)
1097{ 1101{
1098 unsigned long flags; 1102 unsigned long flags;
1099 1103
@@ -1102,7 +1106,7 @@ static void lbs_cleanup_and_insert_cmd(lbs_private * priv, struct cmd_ctrl_node
1102 spin_unlock_irqrestore(&priv->adapter->driver_lock, flags); 1106 spin_unlock_irqrestore(&priv->adapter->driver_lock, flags);
1103} 1107}
1104 1108
1105int lbs_set_radio_control(lbs_private * priv) 1109int lbs_set_radio_control(struct lbs_private *priv)
1106{ 1110{
1107 int ret = 0; 1111 int ret = 0;
1108 1112
@@ -1120,7 +1124,7 @@ int lbs_set_radio_control(lbs_private * priv)
1120 return ret; 1124 return ret;
1121} 1125}
1122 1126
1123int lbs_set_mac_packet_filter(lbs_private * priv) 1127int lbs_set_mac_packet_filter(struct lbs_private *priv)
1124{ 1128{
1125 int ret = 0; 1129 int ret = 0;
1126 1130
@@ -1137,7 +1141,7 @@ int lbs_set_mac_packet_filter(lbs_private * priv)
1137/** 1141/**
1138 * @brief This function prepare the command before send to firmware. 1142 * @brief This function prepare the command before send to firmware.
1139 * 1143 *
1140 * @param priv A pointer to lbs_private structure 1144 * @param priv A pointer to struct lbs_private structure
1141 * @param cmd_no command number 1145 * @param cmd_no command number
1142 * @param cmd_action command action: GET or SET 1146 * @param cmd_action command action: GET or SET
1143 * @param wait_option wait option: wait response or not 1147 * @param wait_option wait option: wait response or not
@@ -1145,13 +1149,13 @@ int lbs_set_mac_packet_filter(lbs_private * priv)
1145 * @param pdata_buf A pointer to informaion buffer 1149 * @param pdata_buf A pointer to informaion buffer
1146 * @return 0 or -1 1150 * @return 0 or -1
1147 */ 1151 */
1148int lbs_prepare_and_send_command(lbs_private * priv, 1152int lbs_prepare_and_send_command(struct lbs_private *priv,
1149 u16 cmd_no, 1153 u16 cmd_no,
1150 u16 cmd_action, 1154 u16 cmd_action,
1151 u16 wait_option, u32 cmd_oid, void *pdata_buf) 1155 u16 wait_option, u32 cmd_oid, void *pdata_buf)
1152{ 1156{
1153 int ret = 0; 1157 int ret = 0;
1154 lbs_adapter *adapter = priv->adapter; 1158 struct lbs_adapter *adapter = priv->adapter;
1155 struct cmd_ctrl_node *cmdnode; 1159 struct cmd_ctrl_node *cmdnode;
1156 struct cmd_ds_command *cmdptr; 1160 struct cmd_ds_command *cmdptr;
1157 unsigned long flags; 1161 unsigned long flags;
@@ -1470,17 +1474,17 @@ EXPORT_SYMBOL_GPL(lbs_prepare_and_send_command);
1470 * @brief This function allocates the command buffer and link 1474 * @brief This function allocates the command buffer and link
1471 * it to command free queue. 1475 * it to command free queue.
1472 * 1476 *
1473 * @param priv A pointer to lbs_private structure 1477 * @param priv A pointer to struct lbs_private structure
1474 * @return 0 or -1 1478 * @return 0 or -1
1475 */ 1479 */
1476int lbs_allocate_cmd_buffer(lbs_private * priv) 1480int lbs_allocate_cmd_buffer(struct lbs_private *priv)
1477{ 1481{
1478 int ret = 0; 1482 int ret = 0;
1479 u32 ulbufsize; 1483 u32 ulbufsize;
1480 u32 i; 1484 u32 i;
1481 struct cmd_ctrl_node *tempcmd_array; 1485 struct cmd_ctrl_node *tempcmd_array;
1482 u8 *ptempvirtualaddr; 1486 u8 *ptempvirtualaddr;
1483 lbs_adapter *adapter = priv->adapter; 1487 struct lbs_adapter *adapter = priv->adapter;
1484 1488
1485 lbs_deb_enter(LBS_DEB_HOST); 1489 lbs_deb_enter(LBS_DEB_HOST);
1486 1490
@@ -1522,15 +1526,15 @@ done:
1522/** 1526/**
1523 * @brief This function frees the command buffer. 1527 * @brief This function frees the command buffer.
1524 * 1528 *
1525 * @param priv A pointer to lbs_private structure 1529 * @param priv A pointer to struct lbs_private structure
1526 * @return 0 or -1 1530 * @return 0 or -1
1527 */ 1531 */
1528int lbs_free_cmd_buffer(lbs_private * priv) 1532int lbs_free_cmd_buffer(struct lbs_private *priv)
1529{ 1533{
1530 u32 ulbufsize; /* Someone needs to die for this. Slowly and painfully */ 1534 u32 ulbufsize; /* Someone needs to die for this. Slowly and painfully */
1531 unsigned int i; 1535 unsigned int i;
1532 struct cmd_ctrl_node *tempcmd_array; 1536 struct cmd_ctrl_node *tempcmd_array;
1533 lbs_adapter *adapter = priv->adapter; 1537 struct lbs_adapter *adapter = priv->adapter;
1534 1538
1535 lbs_deb_enter(LBS_DEB_HOST); 1539 lbs_deb_enter(LBS_DEB_HOST);
1536 1540
@@ -1566,13 +1570,13 @@ done:
1566 * @brief This function gets a free command node if available in 1570 * @brief This function gets a free command node if available in
1567 * command free queue. 1571 * command free queue.
1568 * 1572 *
1569 * @param priv A pointer to lbs_private structure 1573 * @param priv A pointer to struct lbs_private structure
1570 * @return cmd_ctrl_node A pointer to cmd_ctrl_node structure or NULL 1574 * @return cmd_ctrl_node A pointer to cmd_ctrl_node structure or NULL
1571 */ 1575 */
1572struct cmd_ctrl_node *lbs_get_free_cmd_ctrl_node(lbs_private * priv) 1576struct cmd_ctrl_node *lbs_get_free_cmd_ctrl_node(struct lbs_private *priv)
1573{ 1577{
1574 struct cmd_ctrl_node *tempnode; 1578 struct cmd_ctrl_node *tempnode;
1575 lbs_adapter *adapter = priv->adapter; 1579 struct lbs_adapter *adapter = priv->adapter;
1576 unsigned long flags; 1580 unsigned long flags;
1577 1581
1578 lbs_deb_enter(LBS_DEB_HOST); 1582 lbs_deb_enter(LBS_DEB_HOST);
@@ -1627,14 +1631,14 @@ static void cleanup_cmdnode(struct cmd_ctrl_node *ptempnode)
1627/** 1631/**
1628 * @brief This function initializes the command node. 1632 * @brief This function initializes the command node.
1629 * 1633 *
1630 * @param priv A pointer to lbs_private structure 1634 * @param priv A pointer to struct lbs_private structure
1631 * @param ptempnode A pointer to cmd_ctrl_node structure 1635 * @param ptempnode A pointer to cmd_ctrl_node structure
1632 * @param cmd_oid cmd oid: treated as sub command 1636 * @param cmd_oid cmd oid: treated as sub command
1633 * @param wait_option wait option: wait response or not 1637 * @param wait_option wait option: wait response or not
1634 * @param pdata_buf A pointer to informaion buffer 1638 * @param pdata_buf A pointer to informaion buffer
1635 * @return 0 or -1 1639 * @return 0 or -1
1636 */ 1640 */
1637void lbs_set_cmd_ctrl_node(lbs_private * priv, 1641void lbs_set_cmd_ctrl_node(struct lbs_private *priv,
1638 struct cmd_ctrl_node *ptempnode, 1642 struct cmd_ctrl_node *ptempnode,
1639 u32 cmd_oid, u16 wait_option, void *pdata_buf) 1643 u32 cmd_oid, u16 wait_option, void *pdata_buf)
1640{ 1644{
@@ -1655,12 +1659,12 @@ void lbs_set_cmd_ctrl_node(lbs_private * priv,
1655 * pending queue. It will put fimware back to PS mode 1659 * pending queue. It will put fimware back to PS mode
1656 * if applicable. 1660 * if applicable.
1657 * 1661 *
1658 * @param priv A pointer to lbs_private structure 1662 * @param priv A pointer to struct lbs_private structure
1659 * @return 0 or -1 1663 * @return 0 or -1
1660 */ 1664 */
1661int lbs_execute_next_command(lbs_private * priv) 1665int lbs_execute_next_command(struct lbs_private *priv)
1662{ 1666{
1663 lbs_adapter *adapter = priv->adapter; 1667 struct lbs_adapter *adapter = priv->adapter;
1664 struct cmd_ctrl_node *cmdnode = NULL; 1668 struct cmd_ctrl_node *cmdnode = NULL;
1665 struct cmd_ds_command *cmdptr; 1669 struct cmd_ds_command *cmdptr;
1666 unsigned long flags; 1670 unsigned long flags;
@@ -1807,7 +1811,7 @@ done:
1807 return ret; 1811 return ret;
1808} 1812}
1809 1813
1810void lbs_send_iwevcustom_event(lbs_private *priv, s8 *str) 1814void lbs_send_iwevcustom_event(struct lbs_private *priv, s8 *str)
1811{ 1815{
1812 union iwreq_data iwrq; 1816 union iwreq_data iwrq;
1813 u8 buf[50]; 1817 u8 buf[50];
@@ -1831,10 +1835,10 @@ void lbs_send_iwevcustom_event(lbs_private *priv, s8 *str)
1831 lbs_deb_leave(LBS_DEB_WEXT); 1835 lbs_deb_leave(LBS_DEB_WEXT);
1832} 1836}
1833 1837
1834static int sendconfirmsleep(lbs_private *priv, u8 *cmdptr, u16 size) 1838static int sendconfirmsleep(struct lbs_private *priv, u8 *cmdptr, u16 size)
1835{ 1839{
1836 unsigned long flags; 1840 unsigned long flags;
1837 lbs_adapter *adapter = priv->adapter; 1841 struct lbs_adapter *adapter = priv->adapter;
1838 int ret = 0; 1842 int ret = 0;
1839 1843
1840 lbs_deb_enter(LBS_DEB_HOST); 1844 lbs_deb_enter(LBS_DEB_HOST);
@@ -1873,7 +1877,7 @@ static int sendconfirmsleep(lbs_private *priv, u8 *cmdptr, u16 size)
1873 return ret; 1877 return ret;
1874} 1878}
1875 1879
1876void lbs_ps_sleep(lbs_private * priv, int wait_option) 1880void lbs_ps_sleep(struct lbs_private *priv, int wait_option)
1877{ 1881{
1878 lbs_deb_enter(LBS_DEB_HOST); 1882 lbs_deb_enter(LBS_DEB_HOST);
1879 1883
@@ -1891,11 +1895,11 @@ void lbs_ps_sleep(lbs_private * priv, int wait_option)
1891/** 1895/**
1892 * @brief This function sends Exit_PS command to firmware. 1896 * @brief This function sends Exit_PS command to firmware.
1893 * 1897 *
1894 * @param priv A pointer to lbs_private structure 1898 * @param priv A pointer to struct lbs_private structure
1895 * @param wait_option wait response or not 1899 * @param wait_option wait response or not
1896 * @return n/a 1900 * @return n/a
1897 */ 1901 */
1898void lbs_ps_wakeup(lbs_private * priv, int wait_option) 1902void lbs_ps_wakeup(struct lbs_private *priv, int wait_option)
1899{ 1903{
1900 __le32 Localpsmode; 1904 __le32 Localpsmode;
1901 1905
@@ -1914,14 +1918,14 @@ void lbs_ps_wakeup(lbs_private * priv, int wait_option)
1914 * @brief This function checks condition and prepares to 1918 * @brief This function checks condition and prepares to
1915 * send sleep confirm command to firmware if ok. 1919 * send sleep confirm command to firmware if ok.
1916 * 1920 *
1917 * @param priv A pointer to lbs_private structure 1921 * @param priv A pointer to struct lbs_private structure
1918 * @param psmode Power Saving mode 1922 * @param psmode Power Saving mode
1919 * @return n/a 1923 * @return n/a
1920 */ 1924 */
1921void lbs_ps_confirm_sleep(lbs_private * priv, u16 psmode) 1925void lbs_ps_confirm_sleep(struct lbs_private *priv, u16 psmode)
1922{ 1926{
1923 unsigned long flags =0; 1927 unsigned long flags =0;
1924 lbs_adapter *adapter = priv->adapter; 1928 struct lbs_adapter *adapter = priv->adapter;
1925 u8 allowed = 1; 1929 u8 allowed = 1;
1926 1930
1927 lbs_deb_enter(LBS_DEB_HOST); 1931 lbs_deb_enter(LBS_DEB_HOST);