diff options
-rw-r--r-- | drivers/net/wireless/libertas/11d.c | 16 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/11d.h | 5 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/cmd.c | 99 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/cmdresp.c | 29 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/debugfs.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/decl.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/join.c | 9 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/join.h | 9 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/main.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/wext.c | 2 |
10 files changed, 46 insertions, 134 deletions
diff --git a/drivers/net/wireless/libertas/11d.c b/drivers/net/wireless/libertas/11d.c index 5e10ce0d351c..4bc46a60ae2f 100644 --- a/drivers/net/wireless/libertas/11d.c +++ b/drivers/net/wireless/libertas/11d.c | |||
@@ -79,7 +79,7 @@ static u8 *lbs_code_2_region(u8 code) | |||
79 | * @param nrchan number of channels | 79 | * @param nrchan number of channels |
80 | * @return the nrchan-th chan number | 80 | * @return the nrchan-th chan number |
81 | */ | 81 | */ |
82 | static u8 lbs_get_chan_11d(u8 band, u8 firstchan, u8 nrchan, u8 *chan) | 82 | static u8 lbs_get_chan_11d(u8 firstchan, u8 nrchan, u8 *chan) |
83 | /*find the nrchan-th chan after the firstchan*/ | 83 | /*find the nrchan-th chan after the firstchan*/ |
84 | { | 84 | { |
85 | u8 i; | 85 | u8 i; |
@@ -134,7 +134,7 @@ static u8 lbs_channel_known_11d(u8 chan, | |||
134 | return 0; | 134 | return 0; |
135 | } | 135 | } |
136 | 136 | ||
137 | u32 lbs_chan_2_freq(u8 chan, u8 band) | 137 | u32 lbs_chan_2_freq(u8 chan) |
138 | { | 138 | { |
139 | struct chan_freq_power *cf; | 139 | struct chan_freq_power *cf; |
140 | u16 i; | 140 | u16 i; |
@@ -264,7 +264,7 @@ static void lbs_generate_parsed_region_chan_11d(struct region_channel *region_ch | |||
264 | * @param chan chan | 264 | * @param chan chan |
265 | * @return TRUE;FALSE | 265 | * @return TRUE;FALSE |
266 | */ | 266 | */ |
267 | static u8 lbs_region_chan_supported_11d(u8 region, u8 band, u8 chan) | 267 | static u8 lbs_region_chan_supported_11d(u8 region, u8 chan) |
268 | { | 268 | { |
269 | struct chan_freq_power *cfp; | 269 | struct chan_freq_power *cfp; |
270 | int cfp_no; | 270 | int cfp_no; |
@@ -273,7 +273,7 @@ static u8 lbs_region_chan_supported_11d(u8 region, u8 band, u8 chan) | |||
273 | 273 | ||
274 | lbs_deb_enter(LBS_DEB_11D); | 274 | lbs_deb_enter(LBS_DEB_11D); |
275 | 275 | ||
276 | cfp = lbs_get_region_cfp_table(region, band, &cfp_no); | 276 | cfp = lbs_get_region_cfp_table(region, &cfp_no); |
277 | if (cfp == NULL) | 277 | if (cfp == NULL) |
278 | return 0; | 278 | return 0; |
279 | 279 | ||
@@ -367,7 +367,7 @@ static int parse_domain_info_11d(struct ieeetypes_countryinfofullset* | |||
367 | for (i = 0; idx < MAX_NO_OF_CHAN && i < nrchan; i++) { | 367 | for (i = 0; idx < MAX_NO_OF_CHAN && i < nrchan; i++) { |
368 | /*step4: channel is supported? */ | 368 | /*step4: channel is supported? */ |
369 | 369 | ||
370 | if (!lbs_get_chan_11d(band, firstchan, i, &curchan)) { | 370 | if (!lbs_get_chan_11d(firstchan, i, &curchan)) { |
371 | /* Chan is not found in UN table */ | 371 | /* Chan is not found in UN table */ |
372 | lbs_deb_11d("chan is not supported: %d \n", i); | 372 | lbs_deb_11d("chan is not supported: %d \n", i); |
373 | break; | 373 | break; |
@@ -375,8 +375,7 @@ static int parse_domain_info_11d(struct ieeetypes_countryinfofullset* | |||
375 | 375 | ||
376 | lastchan = curchan; | 376 | lastchan = curchan; |
377 | 377 | ||
378 | if (lbs_region_chan_supported_11d | 378 | if (lbs_region_chan_supported_11d(region, curchan)) { |
379 | (region, band, curchan)) { | ||
380 | /*step5: Check if curchan is supported by mrvl in region */ | 379 | /*step5: Check if curchan is supported by mrvl in region */ |
381 | parsed_region_chan->chanpwr[idx].chan = curchan; | 380 | parsed_region_chan->chanpwr[idx].chan = curchan; |
382 | parsed_region_chan->chanpwr[idx].pwr = | 381 | parsed_region_chan->chanpwr[idx].pwr = |
@@ -554,8 +553,7 @@ done: | |||
554 | * @param resp pointer to command response buffer | 553 | * @param resp pointer to command response buffer |
555 | * @return 0; -1 | 554 | * @return 0; -1 |
556 | */ | 555 | */ |
557 | int lbs_ret_802_11d_domain_info(struct lbs_private *priv, | 556 | int lbs_ret_802_11d_domain_info(struct cmd_ds_command *resp) |
558 | struct cmd_ds_command *resp) | ||
559 | { | 557 | { |
560 | struct cmd_ds_802_11d_domain_info *domaininfo = &resp->params.domaininforesp; | 558 | struct cmd_ds_802_11d_domain_info *domaininfo = &resp->params.domaininforesp; |
561 | struct mrvlietypes_domainparamset *domain = &domaininfo->domain; | 559 | struct mrvlietypes_domainparamset *domain = &domaininfo->domain; |
diff --git a/drivers/net/wireless/libertas/11d.h b/drivers/net/wireless/libertas/11d.h index 811eea2cfba3..4f4f47f0f878 100644 --- a/drivers/net/wireless/libertas/11d.h +++ b/drivers/net/wireless/libertas/11d.h | |||
@@ -83,7 +83,7 @@ struct lbs_private; | |||
83 | u8 lbs_get_scan_type_11d(u8 chan, | 83 | u8 lbs_get_scan_type_11d(u8 chan, |
84 | struct parsed_region_chan_11d *parsed_region_chan); | 84 | struct parsed_region_chan_11d *parsed_region_chan); |
85 | 85 | ||
86 | u32 lbs_chan_2_freq(u8 chan, u8 band); | 86 | u32 lbs_chan_2_freq(u8 chan); |
87 | 87 | ||
88 | void lbs_init_11d(struct lbs_private *priv); | 88 | void lbs_init_11d(struct lbs_private *priv); |
89 | 89 | ||
@@ -93,8 +93,7 @@ int lbs_cmd_802_11d_domain_info(struct lbs_private *priv, | |||
93 | struct cmd_ds_command *cmd, u16 cmdno, | 93 | struct cmd_ds_command *cmd, u16 cmdno, |
94 | u16 cmdOption); | 94 | u16 cmdOption); |
95 | 95 | ||
96 | int lbs_ret_802_11d_domain_info(struct lbs_private *priv, | 96 | int lbs_ret_802_11d_domain_info(struct cmd_ds_command *resp); |
97 | struct cmd_ds_command *resp); | ||
98 | 97 | ||
99 | struct bss_descriptor; | 98 | struct bss_descriptor; |
100 | int lbs_parse_dnld_countryinfo_11d(struct lbs_private *priv, | 99 | int lbs_parse_dnld_countryinfo_11d(struct lbs_private *priv, |
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. |
diff --git a/drivers/net/wireless/libertas/cmdresp.c b/drivers/net/wireless/libertas/cmdresp.c index 45de4316bdd7..888f92d8afc9 100644 --- a/drivers/net/wireless/libertas/cmdresp.c +++ b/drivers/net/wireless/libertas/cmdresp.c | |||
@@ -146,22 +146,6 @@ static int lbs_ret_reg_access(struct lbs_private *priv, | |||
146 | return ret; | 146 | return ret; |
147 | } | 147 | } |
148 | 148 | ||
149 | static int lbs_ret_802_11_stat(struct lbs_private *priv, | ||
150 | struct cmd_ds_command *resp) | ||
151 | { | ||
152 | lbs_deb_enter(LBS_DEB_CMD); | ||
153 | /* currently priv->wlan802_11Stat is unused | ||
154 | |||
155 | struct cmd_ds_802_11_get_stat *p11Stat = &resp->params.gstat; | ||
156 | |||
157 | // TODO Convert it to Big endian befor copy | ||
158 | memcpy(&priv->wlan802_11Stat, | ||
159 | p11Stat, sizeof(struct cmd_ds_802_11_get_stat)); | ||
160 | */ | ||
161 | lbs_deb_leave(LBS_DEB_CMD); | ||
162 | return 0; | ||
163 | } | ||
164 | |||
165 | static int lbs_ret_802_11_snmp_mib(struct lbs_private *priv, | 149 | static int lbs_ret_802_11_snmp_mib(struct lbs_private *priv, |
166 | struct cmd_ds_command *resp) | 150 | struct cmd_ds_command *resp) |
167 | { | 151 | { |
@@ -321,7 +305,6 @@ static int lbs_ret_802_11_bcn_ctrl(struct lbs_private * priv, | |||
321 | } | 305 | } |
322 | 306 | ||
323 | static inline int handle_cmd_response(struct lbs_private *priv, | 307 | static inline int handle_cmd_response(struct lbs_private *priv, |
324 | unsigned long dummy, | ||
325 | struct cmd_header *cmd_response) | 308 | struct cmd_header *cmd_response) |
326 | { | 309 | { |
327 | struct cmd_ds_command *resp = (struct cmd_ds_command *) cmd_response; | 310 | struct cmd_ds_command *resp = (struct cmd_ds_command *) cmd_response; |
@@ -346,7 +329,7 @@ static inline int handle_cmd_response(struct lbs_private *priv, | |||
346 | 329 | ||
347 | case CMD_RET(CMD_802_11_DISASSOCIATE): | 330 | case CMD_RET(CMD_802_11_DISASSOCIATE): |
348 | case CMD_RET(CMD_802_11_DEAUTHENTICATE): | 331 | case CMD_RET(CMD_802_11_DEAUTHENTICATE): |
349 | ret = lbs_ret_80211_disassociate(priv, resp); | 332 | ret = lbs_ret_80211_disassociate(priv); |
350 | break; | 333 | break; |
351 | 334 | ||
352 | case CMD_RET(CMD_802_11_AD_HOC_START): | 335 | case CMD_RET(CMD_802_11_AD_HOC_START): |
@@ -354,10 +337,6 @@ static inline int handle_cmd_response(struct lbs_private *priv, | |||
354 | ret = lbs_ret_80211_ad_hoc_start(priv, resp); | 337 | ret = lbs_ret_80211_ad_hoc_start(priv, resp); |
355 | break; | 338 | break; |
356 | 339 | ||
357 | case CMD_RET(CMD_802_11_GET_STAT): | ||
358 | ret = lbs_ret_802_11_stat(priv, resp); | ||
359 | break; | ||
360 | |||
361 | case CMD_RET(CMD_802_11_SNMP_MIB): | 340 | case CMD_RET(CMD_802_11_SNMP_MIB): |
362 | ret = lbs_ret_802_11_snmp_mib(priv, resp); | 341 | ret = lbs_ret_802_11_snmp_mib(priv, resp); |
363 | break; | 342 | break; |
@@ -394,7 +373,7 @@ static inline int handle_cmd_response(struct lbs_private *priv, | |||
394 | break; | 373 | break; |
395 | 374 | ||
396 | case CMD_RET(CMD_802_11_AD_HOC_STOP): | 375 | case CMD_RET(CMD_802_11_AD_HOC_STOP): |
397 | ret = lbs_ret_80211_ad_hoc_stop(priv, resp); | 376 | ret = lbs_ret_80211_ad_hoc_stop(priv); |
398 | break; | 377 | break; |
399 | 378 | ||
400 | case CMD_RET(CMD_802_11_EEPROM_ACCESS): | 379 | case CMD_RET(CMD_802_11_EEPROM_ACCESS): |
@@ -402,7 +381,7 @@ static inline int handle_cmd_response(struct lbs_private *priv, | |||
402 | break; | 381 | break; |
403 | 382 | ||
404 | case CMD_RET(CMD_802_11D_DOMAIN_INFO): | 383 | case CMD_RET(CMD_802_11D_DOMAIN_INFO): |
405 | ret = lbs_ret_802_11d_domain_info(priv, resp); | 384 | ret = lbs_ret_802_11d_domain_info(resp); |
406 | break; | 385 | break; |
407 | 386 | ||
408 | case CMD_RET(CMD_802_11_TPC_CFG): | 387 | case CMD_RET(CMD_802_11_TPC_CFG): |
@@ -605,7 +584,7 @@ int lbs_process_rx_command(struct lbs_private *priv) | |||
605 | ret = priv->cur_cmd->callback(priv, priv->cur_cmd->callback_arg, | 584 | ret = priv->cur_cmd->callback(priv, priv->cur_cmd->callback_arg, |
606 | resp); | 585 | resp); |
607 | } else | 586 | } else |
608 | ret = handle_cmd_response(priv, 0, resp); | 587 | ret = handle_cmd_response(priv, resp); |
609 | 588 | ||
610 | spin_lock_irqsave(&priv->driver_lock, flags); | 589 | spin_lock_irqsave(&priv->driver_lock, flags); |
611 | 590 | ||
diff --git a/drivers/net/wireless/libertas/debugfs.c b/drivers/net/wireless/libertas/debugfs.c index 8f88786b036f..6d7c0d9b677b 100644 --- a/drivers/net/wireless/libertas/debugfs.c +++ b/drivers/net/wireless/libertas/debugfs.c | |||
@@ -19,7 +19,7 @@ static char *szStates[] = { | |||
19 | }; | 19 | }; |
20 | 20 | ||
21 | #ifdef PROC_DEBUG | 21 | #ifdef PROC_DEBUG |
22 | static void lbs_debug_init(struct lbs_private *priv, struct net_device *dev); | 22 | static void lbs_debug_init(struct lbs_private *priv); |
23 | #endif | 23 | #endif |
24 | 24 | ||
25 | static int open_file_generic(struct inode *inode, struct file *file) | 25 | static int open_file_generic(struct inode *inode, struct file *file) |
@@ -778,7 +778,7 @@ void lbs_debugfs_init_one(struct lbs_private *priv, struct net_device *dev) | |||
778 | } | 778 | } |
779 | 779 | ||
780 | #ifdef PROC_DEBUG | 780 | #ifdef PROC_DEBUG |
781 | lbs_debug_init(priv, dev); | 781 | lbs_debug_init(priv); |
782 | #endif | 782 | #endif |
783 | exit: | 783 | exit: |
784 | return; | 784 | return; |
@@ -952,7 +952,7 @@ static struct file_operations lbs_debug_fops = { | |||
952 | * @param dev pointer net_device | 952 | * @param dev pointer net_device |
953 | * @return N/A | 953 | * @return N/A |
954 | */ | 954 | */ |
955 | static void lbs_debug_init(struct lbs_private *priv, struct net_device *dev) | 955 | static void lbs_debug_init(struct lbs_private *priv) |
956 | { | 956 | { |
957 | int i; | 957 | int i; |
958 | 958 | ||
diff --git a/drivers/net/wireless/libertas/decl.h b/drivers/net/wireless/libertas/decl.h index f0a0de9c6f5a..cadc59d7f77f 100644 --- a/drivers/net/wireless/libertas/decl.h +++ b/drivers/net/wireless/libertas/decl.h | |||
@@ -63,7 +63,6 @@ void lbs_send_iwevcustom_event(struct lbs_private *priv, s8 *str); | |||
63 | 63 | ||
64 | /* main.c */ | 64 | /* main.c */ |
65 | struct chan_freq_power *lbs_get_region_cfp_table(u8 region, | 65 | struct chan_freq_power *lbs_get_region_cfp_table(u8 region, |
66 | u8 band, | ||
67 | int *cfp_no); | 66 | int *cfp_no); |
68 | struct lbs_private *lbs_add_card(void *card, struct device *dmdev); | 67 | struct lbs_private *lbs_add_card(void *card, struct device *dmdev); |
69 | int lbs_remove_card(struct lbs_private *priv); | 68 | int lbs_remove_card(struct lbs_private *priv); |
diff --git a/drivers/net/wireless/libertas/join.c b/drivers/net/wireless/libertas/join.c index 56e64a697c37..3e5026ff2ffa 100644 --- a/drivers/net/wireless/libertas/join.c +++ b/drivers/net/wireless/libertas/join.c | |||
@@ -561,8 +561,7 @@ done: | |||
561 | return ret; | 561 | return ret; |
562 | } | 562 | } |
563 | 563 | ||
564 | int lbs_cmd_80211_ad_hoc_stop(struct lbs_private *priv, | 564 | int lbs_cmd_80211_ad_hoc_stop(struct cmd_ds_command *cmd) |
565 | struct cmd_ds_command *cmd) | ||
566 | { | 565 | { |
567 | cmd->command = cpu_to_le16(CMD_802_11_AD_HOC_STOP); | 566 | cmd->command = cpu_to_le16(CMD_802_11_AD_HOC_STOP); |
568 | cmd->size = cpu_to_le16(S_DS_GEN); | 567 | cmd->size = cpu_to_le16(S_DS_GEN); |
@@ -773,8 +772,7 @@ done: | |||
773 | return ret; | 772 | return ret; |
774 | } | 773 | } |
775 | 774 | ||
776 | int lbs_ret_80211_disassociate(struct lbs_private *priv, | 775 | int lbs_ret_80211_disassociate(struct lbs_private *priv) |
777 | struct cmd_ds_command *resp) | ||
778 | { | 776 | { |
779 | lbs_deb_enter(LBS_DEB_JOIN); | 777 | lbs_deb_enter(LBS_DEB_JOIN); |
780 | 778 | ||
@@ -863,8 +861,7 @@ done: | |||
863 | return ret; | 861 | return ret; |
864 | } | 862 | } |
865 | 863 | ||
866 | int lbs_ret_80211_ad_hoc_stop(struct lbs_private *priv, | 864 | int lbs_ret_80211_ad_hoc_stop(struct lbs_private *priv) |
867 | struct cmd_ds_command *resp) | ||
868 | { | 865 | { |
869 | lbs_deb_enter(LBS_DEB_JOIN); | 866 | lbs_deb_enter(LBS_DEB_JOIN); |
870 | 867 | ||
diff --git a/drivers/net/wireless/libertas/join.h b/drivers/net/wireless/libertas/join.h index 792c64fe3514..bfc3a10a2f39 100644 --- a/drivers/net/wireless/libertas/join.h +++ b/drivers/net/wireless/libertas/join.h | |||
@@ -18,8 +18,7 @@ int lbs_cmd_80211_authenticate(struct lbs_private *priv, | |||
18 | int lbs_cmd_80211_ad_hoc_join(struct lbs_private *priv, | 18 | int lbs_cmd_80211_ad_hoc_join(struct lbs_private *priv, |
19 | struct cmd_ds_command *cmd, | 19 | struct cmd_ds_command *cmd, |
20 | void *pdata_buf); | 20 | void *pdata_buf); |
21 | int lbs_cmd_80211_ad_hoc_stop(struct lbs_private *priv, | 21 | int lbs_cmd_80211_ad_hoc_stop(struct cmd_ds_command *cmd); |
22 | struct cmd_ds_command *cmd); | ||
23 | int lbs_cmd_80211_ad_hoc_start(struct lbs_private *priv, | 22 | int lbs_cmd_80211_ad_hoc_start(struct lbs_private *priv, |
24 | struct cmd_ds_command *cmd, | 23 | struct cmd_ds_command *cmd, |
25 | void *pdata_buf); | 24 | void *pdata_buf); |
@@ -31,10 +30,8 @@ int lbs_cmd_80211_associate(struct lbs_private *priv, | |||
31 | 30 | ||
32 | int lbs_ret_80211_ad_hoc_start(struct lbs_private *priv, | 31 | int lbs_ret_80211_ad_hoc_start(struct lbs_private *priv, |
33 | struct cmd_ds_command *resp); | 32 | struct cmd_ds_command *resp); |
34 | int lbs_ret_80211_ad_hoc_stop(struct lbs_private *priv, | 33 | int lbs_ret_80211_ad_hoc_stop(struct lbs_private *priv); |
35 | struct cmd_ds_command *resp); | 34 | int lbs_ret_80211_disassociate(struct lbs_private *priv); |
36 | int lbs_ret_80211_disassociate(struct lbs_private *priv, | ||
37 | struct cmd_ds_command *resp); | ||
38 | int lbs_ret_80211_associate(struct lbs_private *priv, | 35 | int lbs_ret_80211_associate(struct lbs_private *priv, |
39 | struct cmd_ds_command *resp); | 36 | struct cmd_ds_command *resp); |
40 | 37 | ||
diff --git a/drivers/net/wireless/libertas/main.c b/drivers/net/wireless/libertas/main.c index 449e84f89ae7..1eb0cb0a82b7 100644 --- a/drivers/net/wireless/libertas/main.c +++ b/drivers/net/wireless/libertas/main.c | |||
@@ -1391,7 +1391,7 @@ static void lbs_remove_mesh(struct lbs_private *priv) | |||
1391 | * @param cfp_no A pointer to CFP number | 1391 | * @param cfp_no A pointer to CFP number |
1392 | * @return A pointer to CFP | 1392 | * @return A pointer to CFP |
1393 | */ | 1393 | */ |
1394 | struct chan_freq_power *lbs_get_region_cfp_table(u8 region, u8 band, int *cfp_no) | 1394 | struct chan_freq_power *lbs_get_region_cfp_table(u8 region, int *cfp_no) |
1395 | { | 1395 | { |
1396 | int i, end; | 1396 | int i, end; |
1397 | 1397 | ||
@@ -1425,7 +1425,7 @@ int lbs_set_regiontable(struct lbs_private *priv, u8 region, u8 band) | |||
1425 | 1425 | ||
1426 | memset(priv->region_channel, 0, sizeof(priv->region_channel)); | 1426 | memset(priv->region_channel, 0, sizeof(priv->region_channel)); |
1427 | 1427 | ||
1428 | cfp = lbs_get_region_cfp_table(region, band, &cfp_no); | 1428 | cfp = lbs_get_region_cfp_table(region, &cfp_no); |
1429 | if (cfp != NULL) { | 1429 | if (cfp != NULL) { |
1430 | priv->region_channel[i].nrcfp = cfp_no; | 1430 | priv->region_channel[i].nrcfp = cfp_no; |
1431 | priv->region_channel[i].CFP = cfp; | 1431 | priv->region_channel[i].CFP = cfp; |
diff --git a/drivers/net/wireless/libertas/wext.c b/drivers/net/wireless/libertas/wext.c index c039db648fac..738142e802d4 100644 --- a/drivers/net/wireless/libertas/wext.c +++ b/drivers/net/wireless/libertas/wext.c | |||
@@ -605,7 +605,7 @@ static int lbs_get_range(struct net_device *dev, struct iw_request_info *info, | |||
605 | lbs_deb_wext("chan_no %d\n", chan_no); | 605 | lbs_deb_wext("chan_no %d\n", chan_no); |
606 | range->freq[range->num_frequency].i = (long)chan_no; | 606 | range->freq[range->num_frequency].i = (long)chan_no; |
607 | range->freq[range->num_frequency].m = | 607 | range->freq[range->num_frequency].m = |
608 | (long)lbs_chan_2_freq(chan_no, band) * 100000; | 608 | (long)lbs_chan_2_freq(chan_no) * 100000; |
609 | range->freq[range->num_frequency].e = 1; | 609 | range->freq[range->num_frequency].e = 1; |
610 | range->num_frequency++; | 610 | range->num_frequency++; |
611 | } | 611 | } |