diff options
author | Holger Schurig <hs4233@mail.mn-solutions.de> | 2008-03-19 09:25:58 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-03-25 16:41:49 -0400 |
commit | e98a88dd33b7188ce84533e128101dd9630ae592 (patch) | |
tree | 14268254f1f588c691dcd52505c595142548afdd /drivers/net/wireless/libertas/cmd.c | |
parent | d4ff0ef635b222d5f66dad65e9364d702e5f94e0 (diff) |
libertas: remove lots of unused stuff
This removes many unused function parameters as well as some not-implemented
functions, e.g. CMD_802_11_GET_STATS. The silly lbs_set_cmd_ctrl_node()
function is now also gone.
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.c | 99 |
1 files changed, 21 insertions, 78 deletions
diff --git a/drivers/net/wireless/libertas/cmd.c b/drivers/net/wireless/libertas/cmd.c index 733110a03b56..59801f103e66 100644 --- a/drivers/net/wireless/libertas/cmd.c +++ b/drivers/net/wireless/libertas/cmd.c | |||
@@ -14,9 +14,6 @@ | |||
14 | #include "cmd.h" | 14 | #include "cmd.h" |
15 | 15 | ||
16 | static struct cmd_ctrl_node *lbs_get_cmd_ctrl_node(struct lbs_private *priv); | 16 | static struct cmd_ctrl_node *lbs_get_cmd_ctrl_node(struct lbs_private *priv); |
17 | static void lbs_set_cmd_ctrl_node(struct lbs_private *priv, | ||
18 | struct cmd_ctrl_node *ptempnode, | ||
19 | void *pdata_buf); | ||
20 | 17 | ||
21 | 18 | ||
22 | /** | 19 | /** |
@@ -183,8 +180,7 @@ int lbs_host_sleep_cfg(struct lbs_private *priv, uint32_t criteria) | |||
183 | } | 180 | } |
184 | EXPORT_SYMBOL_GPL(lbs_host_sleep_cfg); | 181 | EXPORT_SYMBOL_GPL(lbs_host_sleep_cfg); |
185 | 182 | ||
186 | static int lbs_cmd_802_11_ps_mode(struct lbs_private *priv, | 183 | static int lbs_cmd_802_11_ps_mode(struct cmd_ds_command *cmd, |
187 | struct cmd_ds_command *cmd, | ||
188 | u16 cmd_action) | 184 | u16 cmd_action) |
189 | { | 185 | { |
190 | struct cmd_ds_802_11_ps_mode *psm = &cmd->params.psmode; | 186 | struct cmd_ds_802_11_ps_mode *psm = &cmd->params.psmode; |
@@ -479,8 +475,7 @@ int lbs_cmd_802_11_key_material(struct lbs_private *priv, uint16_t cmd_action, | |||
479 | return ret; | 475 | return ret; |
480 | } | 476 | } |
481 | 477 | ||
482 | static int lbs_cmd_802_11_reset(struct lbs_private *priv, | 478 | static int lbs_cmd_802_11_reset(struct cmd_ds_command *cmd, int cmd_action) |
483 | struct cmd_ds_command *cmd, int cmd_action) | ||
484 | { | 479 | { |
485 | struct cmd_ds_802_11_reset *reset = &cmd->params.reset; | 480 | struct cmd_ds_802_11_reset *reset = &cmd->params.reset; |
486 | 481 | ||
@@ -494,18 +489,6 @@ static int lbs_cmd_802_11_reset(struct lbs_private *priv, | |||
494 | return 0; | 489 | return 0; |
495 | } | 490 | } |
496 | 491 | ||
497 | static int lbs_cmd_802_11_get_stat(struct lbs_private *priv, | ||
498 | struct cmd_ds_command *cmd) | ||
499 | { | ||
500 | lbs_deb_enter(LBS_DEB_CMD); | ||
501 | cmd->command = cpu_to_le16(CMD_802_11_GET_STAT); | ||
502 | cmd->size = | ||
503 | cpu_to_le16(sizeof(struct cmd_ds_802_11_get_stat) + S_DS_GEN); | ||
504 | |||
505 | lbs_deb_leave(LBS_DEB_CMD); | ||
506 | return 0; | ||
507 | } | ||
508 | |||
509 | static int lbs_cmd_802_11_snmp_mib(struct lbs_private *priv, | 492 | static int lbs_cmd_802_11_snmp_mib(struct lbs_private *priv, |
510 | struct cmd_ds_command *cmd, | 493 | struct cmd_ds_command *cmd, |
511 | int cmd_action, | 494 | int cmd_action, |
@@ -626,8 +609,7 @@ static int lbs_cmd_802_11_snmp_mib(struct lbs_private *priv, | |||
626 | return 0; | 609 | return 0; |
627 | } | 610 | } |
628 | 611 | ||
629 | static int lbs_cmd_802_11_rf_tx_power(struct lbs_private *priv, | 612 | static int lbs_cmd_802_11_rf_tx_power(struct cmd_ds_command *cmd, |
630 | struct cmd_ds_command *cmd, | ||
631 | u16 cmd_action, void *pdata_buf) | 613 | u16 cmd_action, void *pdata_buf) |
632 | { | 614 | { |
633 | 615 | ||
@@ -670,8 +652,7 @@ static int lbs_cmd_802_11_rf_tx_power(struct lbs_private *priv, | |||
670 | return 0; | 652 | return 0; |
671 | } | 653 | } |
672 | 654 | ||
673 | static int lbs_cmd_802_11_monitor_mode(struct lbs_private *priv, | 655 | static int lbs_cmd_802_11_monitor_mode(struct cmd_ds_command *cmd, |
674 | struct cmd_ds_command *cmd, | ||
675 | u16 cmd_action, void *pdata_buf) | 656 | u16 cmd_action, void *pdata_buf) |
676 | { | 657 | { |
677 | struct cmd_ds_802_11_monitor_mode *monitor = &cmd->params.monitor; | 658 | struct cmd_ds_802_11_monitor_mode *monitor = &cmd->params.monitor; |
@@ -898,8 +879,7 @@ static int lbs_cmd_802_11_rssi(struct lbs_private *priv, | |||
898 | return 0; | 879 | return 0; |
899 | } | 880 | } |
900 | 881 | ||
901 | static int lbs_cmd_reg_access(struct lbs_private *priv, | 882 | static int lbs_cmd_reg_access(struct cmd_ds_command *cmdptr, |
902 | struct cmd_ds_command *cmdptr, | ||
903 | u8 cmd_action, void *pdata_buf) | 883 | u8 cmd_action, void *pdata_buf) |
904 | { | 884 | { |
905 | struct lbs_offset_value *offval; | 885 | struct lbs_offset_value *offval; |
@@ -996,9 +976,8 @@ static int lbs_cmd_802_11_mac_address(struct lbs_private *priv, | |||
996 | return 0; | 976 | return 0; |
997 | } | 977 | } |
998 | 978 | ||
999 | static int lbs_cmd_802_11_eeprom_access(struct lbs_private *priv, | 979 | static int lbs_cmd_802_11_eeprom_access(struct cmd_ds_command *cmd, |
1000 | struct cmd_ds_command *cmd, | 980 | void *pdata_buf) |
1001 | int cmd_action, void *pdata_buf) | ||
1002 | { | 981 | { |
1003 | struct lbs_ioctl_regrdwr *ea = pdata_buf; | 982 | struct lbs_ioctl_regrdwr *ea = pdata_buf; |
1004 | 983 | ||
@@ -1018,8 +997,7 @@ static int lbs_cmd_802_11_eeprom_access(struct lbs_private *priv, | |||
1018 | return 0; | 997 | return 0; |
1019 | } | 998 | } |
1020 | 999 | ||
1021 | static int lbs_cmd_bt_access(struct lbs_private *priv, | 1000 | static int lbs_cmd_bt_access(struct cmd_ds_command *cmd, |
1022 | struct cmd_ds_command *cmd, | ||
1023 | u16 cmd_action, void *pdata_buf) | 1001 | u16 cmd_action, void *pdata_buf) |
1024 | { | 1002 | { |
1025 | struct cmd_ds_bt_access *bt_access = &cmd->params.bt; | 1003 | struct cmd_ds_bt_access *bt_access = &cmd->params.bt; |
@@ -1056,8 +1034,7 @@ static int lbs_cmd_bt_access(struct lbs_private *priv, | |||
1056 | return 0; | 1034 | return 0; |
1057 | } | 1035 | } |
1058 | 1036 | ||
1059 | static int lbs_cmd_fwt_access(struct lbs_private *priv, | 1037 | static int lbs_cmd_fwt_access(struct cmd_ds_command *cmd, |
1060 | struct cmd_ds_command *cmd, | ||
1061 | u16 cmd_action, void *pdata_buf) | 1038 | u16 cmd_action, void *pdata_buf) |
1062 | { | 1039 | { |
1063 | struct cmd_ds_fwt_access *fwt_access = &cmd->params.fwt; | 1040 | struct cmd_ds_fwt_access *fwt_access = &cmd->params.fwt; |
@@ -1376,7 +1353,8 @@ int lbs_prepare_and_send_command(struct lbs_private *priv, | |||
1376 | goto done; | 1353 | goto done; |
1377 | } | 1354 | } |
1378 | 1355 | ||
1379 | lbs_set_cmd_ctrl_node(priv, cmdnode, pdata_buf); | 1356 | cmdnode->callback = NULL; |
1357 | cmdnode->callback_arg = (unsigned long)pdata_buf; | ||
1380 | 1358 | ||
1381 | cmdptr = (struct cmd_ds_command *)cmdnode->cmdbuf; | 1359 | cmdptr = (struct cmd_ds_command *)cmdnode->cmdbuf; |
1382 | 1360 | ||
@@ -1391,7 +1369,7 @@ int lbs_prepare_and_send_command(struct lbs_private *priv, | |||
1391 | 1369 | ||
1392 | switch (cmd_no) { | 1370 | switch (cmd_no) { |
1393 | case CMD_802_11_PS_MODE: | 1371 | case CMD_802_11_PS_MODE: |
1394 | ret = lbs_cmd_802_11_ps_mode(priv, cmdptr, cmd_action); | 1372 | ret = lbs_cmd_802_11_ps_mode(cmdptr, cmd_action); |
1395 | break; | 1373 | break; |
1396 | 1374 | ||
1397 | case CMD_802_11_ASSOCIATE: | 1375 | case CMD_802_11_ASSOCIATE: |
@@ -1408,17 +1386,13 @@ int lbs_prepare_and_send_command(struct lbs_private *priv, | |||
1408 | break; | 1386 | break; |
1409 | 1387 | ||
1410 | case CMD_802_11_RESET: | 1388 | case CMD_802_11_RESET: |
1411 | ret = lbs_cmd_802_11_reset(priv, cmdptr, cmd_action); | 1389 | ret = lbs_cmd_802_11_reset(cmdptr, cmd_action); |
1412 | break; | 1390 | break; |
1413 | 1391 | ||
1414 | case CMD_802_11_AUTHENTICATE: | 1392 | case CMD_802_11_AUTHENTICATE: |
1415 | ret = lbs_cmd_80211_authenticate(priv, cmdptr, pdata_buf); | 1393 | ret = lbs_cmd_80211_authenticate(priv, cmdptr, pdata_buf); |
1416 | break; | 1394 | break; |
1417 | 1395 | ||
1418 | case CMD_802_11_GET_STAT: | ||
1419 | ret = lbs_cmd_802_11_get_stat(priv, cmdptr); | ||
1420 | break; | ||
1421 | |||
1422 | case CMD_802_11_SNMP_MIB: | 1396 | case CMD_802_11_SNMP_MIB: |
1423 | ret = lbs_cmd_802_11_snmp_mib(priv, cmdptr, | 1397 | ret = lbs_cmd_802_11_snmp_mib(priv, cmdptr, |
1424 | cmd_action, cmd_oid, pdata_buf); | 1398 | cmd_action, cmd_oid, pdata_buf); |
@@ -1427,12 +1401,12 @@ int lbs_prepare_and_send_command(struct lbs_private *priv, | |||
1427 | case CMD_MAC_REG_ACCESS: | 1401 | case CMD_MAC_REG_ACCESS: |
1428 | case CMD_BBP_REG_ACCESS: | 1402 | case CMD_BBP_REG_ACCESS: |
1429 | case CMD_RF_REG_ACCESS: | 1403 | case CMD_RF_REG_ACCESS: |
1430 | ret = lbs_cmd_reg_access(priv, cmdptr, cmd_action, pdata_buf); | 1404 | ret = lbs_cmd_reg_access(cmdptr, cmd_action, pdata_buf); |
1431 | break; | 1405 | break; |
1432 | 1406 | ||
1433 | case CMD_802_11_RF_TX_POWER: | 1407 | case CMD_802_11_RF_TX_POWER: |
1434 | ret = lbs_cmd_802_11_rf_tx_power(priv, cmdptr, | 1408 | ret = lbs_cmd_802_11_rf_tx_power(cmdptr, |
1435 | cmd_action, pdata_buf); | 1409 | cmd_action, pdata_buf); |
1436 | break; | 1410 | break; |
1437 | 1411 | ||
1438 | case CMD_802_11_RATE_ADAPT_RATESET: | 1412 | case CMD_802_11_RATE_ADAPT_RATESET: |
@@ -1445,7 +1419,7 @@ int lbs_prepare_and_send_command(struct lbs_private *priv, | |||
1445 | break; | 1419 | break; |
1446 | 1420 | ||
1447 | case CMD_802_11_MONITOR_MODE: | 1421 | case CMD_802_11_MONITOR_MODE: |
1448 | ret = lbs_cmd_802_11_monitor_mode(priv, cmdptr, | 1422 | ret = lbs_cmd_802_11_monitor_mode(cmdptr, |
1449 | cmd_action, pdata_buf); | 1423 | cmd_action, pdata_buf); |
1450 | break; | 1424 | break; |
1451 | 1425 | ||
@@ -1458,7 +1432,7 @@ int lbs_prepare_and_send_command(struct lbs_private *priv, | |||
1458 | break; | 1432 | break; |
1459 | 1433 | ||
1460 | case CMD_802_11_AD_HOC_STOP: | 1434 | case CMD_802_11_AD_HOC_STOP: |
1461 | ret = lbs_cmd_80211_ad_hoc_stop(priv, cmdptr); | 1435 | ret = lbs_cmd_80211_ad_hoc_stop(cmdptr); |
1462 | break; | 1436 | break; |
1463 | 1437 | ||
1464 | case CMD_802_11_MAC_ADDRESS: | 1438 | case CMD_802_11_MAC_ADDRESS: |
@@ -1466,8 +1440,7 @@ int lbs_prepare_and_send_command(struct lbs_private *priv, | |||
1466 | break; | 1440 | break; |
1467 | 1441 | ||
1468 | case CMD_802_11_EEPROM_ACCESS: | 1442 | case CMD_802_11_EEPROM_ACCESS: |
1469 | ret = lbs_cmd_802_11_eeprom_access(priv, cmdptr, | 1443 | ret = lbs_cmd_802_11_eeprom_access(cmdptr, pdata_buf); |
1470 | cmd_action, pdata_buf); | ||
1471 | break; | 1444 | break; |
1472 | 1445 | ||
1473 | case CMD_802_11_SET_AFC: | 1446 | case CMD_802_11_SET_AFC: |
@@ -1534,11 +1507,11 @@ int lbs_prepare_and_send_command(struct lbs_private *priv, | |||
1534 | ret = 0; | 1507 | ret = 0; |
1535 | break; | 1508 | break; |
1536 | case CMD_BT_ACCESS: | 1509 | case CMD_BT_ACCESS: |
1537 | ret = lbs_cmd_bt_access(priv, cmdptr, cmd_action, pdata_buf); | 1510 | ret = lbs_cmd_bt_access(cmdptr, cmd_action, pdata_buf); |
1538 | break; | 1511 | break; |
1539 | 1512 | ||
1540 | case CMD_FWT_ACCESS: | 1513 | case CMD_FWT_ACCESS: |
1541 | ret = lbs_cmd_fwt_access(priv, cmdptr, cmd_action, pdata_buf); | 1514 | ret = lbs_cmd_fwt_access(cmdptr, cmd_action, pdata_buf); |
1542 | break; | 1515 | break; |
1543 | 1516 | ||
1544 | case CMD_GET_TSF: | 1517 | case CMD_GET_TSF: |
@@ -1711,36 +1684,6 @@ static struct cmd_ctrl_node *lbs_get_cmd_ctrl_node(struct lbs_private *priv) | |||
1711 | } | 1684 | } |
1712 | 1685 | ||
1713 | /** | 1686 | /** |
1714 | * @brief This function cleans command node. | ||
1715 | * | ||
1716 | * @param ptempnode A pointer to cmdCtrlNode structure | ||
1717 | * @return n/a | ||
1718 | */ | ||
1719 | |||
1720 | /** | ||
1721 | * @brief This function initializes the command node. | ||
1722 | * | ||
1723 | * @param priv A pointer to struct lbs_private structure | ||
1724 | * @param ptempnode A pointer to cmd_ctrl_node structure | ||
1725 | * @param pdata_buf A pointer to informaion buffer | ||
1726 | * @return 0 or -1 | ||
1727 | */ | ||
1728 | static void lbs_set_cmd_ctrl_node(struct lbs_private *priv, | ||
1729 | struct cmd_ctrl_node *ptempnode, | ||
1730 | void *pdata_buf) | ||
1731 | { | ||
1732 | lbs_deb_enter(LBS_DEB_HOST); | ||
1733 | |||
1734 | if (!ptempnode) | ||
1735 | return; | ||
1736 | |||
1737 | ptempnode->callback = NULL; | ||
1738 | ptempnode->callback_arg = (unsigned long)pdata_buf; | ||
1739 | |||
1740 | lbs_deb_leave(LBS_DEB_HOST); | ||
1741 | } | ||
1742 | |||
1743 | /** | ||
1744 | * @brief This function executes next command in command | 1687 | * @brief This function executes next command in command |
1745 | * pending queue. It will put fimware back to PS mode | 1688 | * pending queue. It will put fimware back to PS mode |
1746 | * if applicable. | 1689 | * if applicable. |