diff options
author | David S. Miller <davem@davemloft.net> | 2008-03-25 20:20:03 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-03-25 20:20:03 -0400 |
commit | f89e6e3834035c6e8203042f3527931aa7f52496 (patch) | |
tree | a82677254fe4511679d5690606ac75f4300fefe1 /drivers/net/wireless/libertas/cmdresp.c | |
parent | 7cbca67c073263c179f605bdbbdc565ab29d801d (diff) | |
parent | 3a643d244f09fa1fdd25d48a56a073c1a69583ee (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.26
Diffstat (limited to 'drivers/net/wireless/libertas/cmdresp.c')
-rw-r--r-- | drivers/net/wireless/libertas/cmdresp.c | 66 |
1 files changed, 13 insertions, 53 deletions
diff --git a/drivers/net/wireless/libertas/cmdresp.c b/drivers/net/wireless/libertas/cmdresp.c index 63aa884b18f2..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 | { |
@@ -303,20 +287,6 @@ static int lbs_ret_802_11_eeprom_access(struct lbs_private *priv, | |||
303 | return 0; | 287 | return 0; |
304 | } | 288 | } |
305 | 289 | ||
306 | static int lbs_ret_get_log(struct lbs_private *priv, | ||
307 | struct cmd_ds_command *resp) | ||
308 | { | ||
309 | struct cmd_ds_802_11_get_log *logmessage = &resp->params.glog; | ||
310 | |||
311 | lbs_deb_enter(LBS_DEB_CMD); | ||
312 | |||
313 | /* Stored little-endian */ | ||
314 | memcpy(&priv->logmsg, logmessage, sizeof(struct cmd_ds_802_11_get_log)); | ||
315 | |||
316 | lbs_deb_leave(LBS_DEB_CMD); | ||
317 | return 0; | ||
318 | } | ||
319 | |||
320 | static int lbs_ret_802_11_bcn_ctrl(struct lbs_private * priv, | 290 | static int lbs_ret_802_11_bcn_ctrl(struct lbs_private * priv, |
321 | struct cmd_ds_command *resp) | 291 | struct cmd_ds_command *resp) |
322 | { | 292 | { |
@@ -335,7 +305,6 @@ static int lbs_ret_802_11_bcn_ctrl(struct lbs_private * priv, | |||
335 | } | 305 | } |
336 | 306 | ||
337 | static inline int handle_cmd_response(struct lbs_private *priv, | 307 | static inline int handle_cmd_response(struct lbs_private *priv, |
338 | unsigned long dummy, | ||
339 | struct cmd_header *cmd_response) | 308 | struct cmd_header *cmd_response) |
340 | { | 309 | { |
341 | struct cmd_ds_command *resp = (struct cmd_ds_command *) cmd_response; | 310 | struct cmd_ds_command *resp = (struct cmd_ds_command *) cmd_response; |
@@ -352,10 +321,6 @@ static inline int handle_cmd_response(struct lbs_private *priv, | |||
352 | ret = lbs_ret_reg_access(priv, respcmd, resp); | 321 | ret = lbs_ret_reg_access(priv, respcmd, resp); |
353 | break; | 322 | break; |
354 | 323 | ||
355 | case CMD_RET(CMD_802_11_GET_LOG): | ||
356 | ret = lbs_ret_get_log(priv, resp); | ||
357 | break; | ||
358 | |||
359 | case CMD_RET_802_11_ASSOCIATE: | 324 | case CMD_RET_802_11_ASSOCIATE: |
360 | case CMD_RET(CMD_802_11_ASSOCIATE): | 325 | case CMD_RET(CMD_802_11_ASSOCIATE): |
361 | case CMD_RET(CMD_802_11_REASSOCIATE): | 326 | case CMD_RET(CMD_802_11_REASSOCIATE): |
@@ -364,7 +329,7 @@ static inline int handle_cmd_response(struct lbs_private *priv, | |||
364 | 329 | ||
365 | case CMD_RET(CMD_802_11_DISASSOCIATE): | 330 | case CMD_RET(CMD_802_11_DISASSOCIATE): |
366 | case CMD_RET(CMD_802_11_DEAUTHENTICATE): | 331 | case CMD_RET(CMD_802_11_DEAUTHENTICATE): |
367 | ret = lbs_ret_80211_disassociate(priv, resp); | 332 | ret = lbs_ret_80211_disassociate(priv); |
368 | break; | 333 | break; |
369 | 334 | ||
370 | case CMD_RET(CMD_802_11_AD_HOC_START): | 335 | case CMD_RET(CMD_802_11_AD_HOC_START): |
@@ -372,10 +337,6 @@ static inline int handle_cmd_response(struct lbs_private *priv, | |||
372 | ret = lbs_ret_80211_ad_hoc_start(priv, resp); | 337 | ret = lbs_ret_80211_ad_hoc_start(priv, resp); |
373 | break; | 338 | break; |
374 | 339 | ||
375 | case CMD_RET(CMD_802_11_GET_STAT): | ||
376 | ret = lbs_ret_802_11_stat(priv, resp); | ||
377 | break; | ||
378 | |||
379 | case CMD_RET(CMD_802_11_SNMP_MIB): | 340 | case CMD_RET(CMD_802_11_SNMP_MIB): |
380 | ret = lbs_ret_802_11_snmp_mib(priv, resp); | 341 | ret = lbs_ret_802_11_snmp_mib(priv, resp); |
381 | break; | 342 | break; |
@@ -394,7 +355,6 @@ static inline int handle_cmd_response(struct lbs_private *priv, | |||
394 | break; | 355 | break; |
395 | 356 | ||
396 | case CMD_RET(CMD_MAC_MULTICAST_ADR): | 357 | case CMD_RET(CMD_MAC_MULTICAST_ADR): |
397 | case CMD_RET(CMD_MAC_CONTROL): | ||
398 | case CMD_RET(CMD_802_11_RESET): | 358 | case CMD_RET(CMD_802_11_RESET): |
399 | case CMD_RET(CMD_802_11_AUTHENTICATE): | 359 | case CMD_RET(CMD_802_11_AUTHENTICATE): |
400 | case CMD_RET(CMD_802_11_BEACON_STOP): | 360 | case CMD_RET(CMD_802_11_BEACON_STOP): |
@@ -413,7 +373,7 @@ static inline int handle_cmd_response(struct lbs_private *priv, | |||
413 | break; | 373 | break; |
414 | 374 | ||
415 | case CMD_RET(CMD_802_11_AD_HOC_STOP): | 375 | case CMD_RET(CMD_802_11_AD_HOC_STOP): |
416 | ret = lbs_ret_80211_ad_hoc_stop(priv, resp); | 376 | ret = lbs_ret_80211_ad_hoc_stop(priv); |
417 | break; | 377 | break; |
418 | 378 | ||
419 | case CMD_RET(CMD_802_11_EEPROM_ACCESS): | 379 | case CMD_RET(CMD_802_11_EEPROM_ACCESS): |
@@ -421,7 +381,7 @@ static inline int handle_cmd_response(struct lbs_private *priv, | |||
421 | break; | 381 | break; |
422 | 382 | ||
423 | case CMD_RET(CMD_802_11D_DOMAIN_INFO): | 383 | case CMD_RET(CMD_802_11D_DOMAIN_INFO): |
424 | ret = lbs_ret_802_11d_domain_info(priv, resp); | 384 | ret = lbs_ret_802_11d_domain_info(resp); |
425 | break; | 385 | break; |
426 | 386 | ||
427 | case CMD_RET(CMD_802_11_TPC_CFG): | 387 | case CMD_RET(CMD_802_11_TPC_CFG): |
@@ -624,7 +584,7 @@ int lbs_process_rx_command(struct lbs_private *priv) | |||
624 | ret = priv->cur_cmd->callback(priv, priv->cur_cmd->callback_arg, | 584 | ret = priv->cur_cmd->callback(priv, priv->cur_cmd->callback_arg, |
625 | resp); | 585 | resp); |
626 | } else | 586 | } else |
627 | ret = handle_cmd_response(priv, 0, resp); | 587 | ret = handle_cmd_response(priv, resp); |
628 | 588 | ||
629 | spin_lock_irqsave(&priv->driver_lock, flags); | 589 | spin_lock_irqsave(&priv->driver_lock, flags); |
630 | 590 | ||
@@ -675,11 +635,9 @@ int lbs_process_event(struct lbs_private *priv) | |||
675 | eventcause = priv->eventcause >> SBI_EVENT_CAUSE_SHIFT; | 635 | eventcause = priv->eventcause >> SBI_EVENT_CAUSE_SHIFT; |
676 | spin_unlock_irq(&priv->driver_lock); | 636 | spin_unlock_irq(&priv->driver_lock); |
677 | 637 | ||
678 | lbs_deb_cmd("event cause %d\n", eventcause); | ||
679 | |||
680 | switch (eventcause) { | 638 | switch (eventcause) { |
681 | case MACREG_INT_CODE_LINK_SENSED: | 639 | case MACREG_INT_CODE_LINK_SENSED: |
682 | lbs_deb_cmd("EVENT: MACREG_INT_CODE_LINK_SENSED\n"); | 640 | lbs_deb_cmd("EVENT: link sensed\n"); |
683 | break; | 641 | break; |
684 | 642 | ||
685 | case MACREG_INT_CODE_DEAUTHENTICATED: | 643 | case MACREG_INT_CODE_DEAUTHENTICATED: |
@@ -698,7 +656,7 @@ int lbs_process_event(struct lbs_private *priv) | |||
698 | break; | 656 | break; |
699 | 657 | ||
700 | case MACREG_INT_CODE_PS_SLEEP: | 658 | case MACREG_INT_CODE_PS_SLEEP: |
701 | lbs_deb_cmd("EVENT: sleep\n"); | 659 | lbs_deb_cmd("EVENT: ps sleep\n"); |
702 | 660 | ||
703 | /* handle unexpected PS SLEEP event */ | 661 | /* handle unexpected PS SLEEP event */ |
704 | if (priv->psstate == PS_STATE_FULL_POWER) { | 662 | if (priv->psstate == PS_STATE_FULL_POWER) { |
@@ -708,17 +666,17 @@ int lbs_process_event(struct lbs_private *priv) | |||
708 | } | 666 | } |
709 | priv->psstate = PS_STATE_PRE_SLEEP; | 667 | priv->psstate = PS_STATE_PRE_SLEEP; |
710 | 668 | ||
711 | lbs_ps_confirm_sleep(priv, (u16) priv->psmode); | 669 | lbs_ps_confirm_sleep(priv); |
712 | 670 | ||
713 | break; | 671 | break; |
714 | 672 | ||
715 | case MACREG_INT_CODE_HOST_AWAKE: | 673 | case MACREG_INT_CODE_HOST_AWAKE: |
716 | lbs_deb_cmd("EVENT: HOST_AWAKE\n"); | 674 | lbs_deb_cmd("EVENT: host awake\n"); |
717 | lbs_send_confirmwake(priv); | 675 | lbs_send_confirmwake(priv); |
718 | break; | 676 | break; |
719 | 677 | ||
720 | case MACREG_INT_CODE_PS_AWAKE: | 678 | case MACREG_INT_CODE_PS_AWAKE: |
721 | lbs_deb_cmd("EVENT: awake\n"); | 679 | lbs_deb_cmd("EVENT: ps awake\n"); |
722 | /* handle unexpected PS AWAKE event */ | 680 | /* handle unexpected PS AWAKE event */ |
723 | if (priv->psstate == PS_STATE_FULL_POWER) { | 681 | if (priv->psstate == PS_STATE_FULL_POWER) { |
724 | lbs_deb_cmd( | 682 | lbs_deb_cmd( |
@@ -749,14 +707,16 @@ int lbs_process_event(struct lbs_private *priv) | |||
749 | lbs_deb_cmd("EVENT: MULTICAST MIC ERROR\n"); | 707 | lbs_deb_cmd("EVENT: MULTICAST MIC ERROR\n"); |
750 | handle_mic_failureevent(priv, MACREG_INT_CODE_MIC_ERR_MULTICAST); | 708 | handle_mic_failureevent(priv, MACREG_INT_CODE_MIC_ERR_MULTICAST); |
751 | break; | 709 | break; |
710 | |||
752 | case MACREG_INT_CODE_MIB_CHANGED: | 711 | case MACREG_INT_CODE_MIB_CHANGED: |
712 | lbs_deb_cmd("EVENT: MIB CHANGED\n"); | ||
713 | break; | ||
753 | case MACREG_INT_CODE_INIT_DONE: | 714 | case MACREG_INT_CODE_INIT_DONE: |
715 | lbs_deb_cmd("EVENT: INIT DONE\n"); | ||
754 | break; | 716 | break; |
755 | |||
756 | case MACREG_INT_CODE_ADHOC_BCN_LOST: | 717 | case MACREG_INT_CODE_ADHOC_BCN_LOST: |
757 | lbs_deb_cmd("EVENT: ADHOC beacon lost\n"); | 718 | lbs_deb_cmd("EVENT: ADHOC beacon lost\n"); |
758 | break; | 719 | break; |
759 | |||
760 | case MACREG_INT_CODE_RSSI_LOW: | 720 | case MACREG_INT_CODE_RSSI_LOW: |
761 | lbs_pr_alert("EVENT: rssi low\n"); | 721 | lbs_pr_alert("EVENT: rssi low\n"); |
762 | break; | 722 | break; |