diff options
Diffstat (limited to 'drivers/staging/vt6656/wmgr.c')
-rw-r--r-- | drivers/staging/vt6656/wmgr.c | 66 |
1 files changed, 0 insertions, 66 deletions
diff --git a/drivers/staging/vt6656/wmgr.c b/drivers/staging/vt6656/wmgr.c index 7db6a8d3508..95ddc8303bb 100644 --- a/drivers/staging/vt6656/wmgr.c +++ b/drivers/staging/vt6656/wmgr.c | |||
@@ -925,7 +925,6 @@ s_vMgrRxAssocResponse( | |||
925 | WLAN_FR_ASSOCRESP sFrame; | 925 | WLAN_FR_ASSOCRESP sFrame; |
926 | PWLAN_IE_SSID pItemSSID; | 926 | PWLAN_IE_SSID pItemSSID; |
927 | PBYTE pbyIEs; | 927 | PBYTE pbyIEs; |
928 | viawget_wpa_header *wpahdr; | ||
929 | 928 | ||
930 | 929 | ||
931 | 930 | ||
@@ -973,32 +972,7 @@ s_vMgrRxAssocResponse( | |||
973 | DBG_PRT(MSG_LEVEL_INFO, KERN_INFO "Link with AP(SSID): %s\n", pItemSSID->abySSID); | 972 | DBG_PRT(MSG_LEVEL_INFO, KERN_INFO "Link with AP(SSID): %s\n", pItemSSID->abySSID); |
974 | pDevice->bLinkPass = TRUE; | 973 | pDevice->bLinkPass = TRUE; |
975 | ControlvMaskByte(pDevice,MESSAGE_REQUEST_MACREG,MAC_REG_PAPEDELAY,LEDSTS_STS,LEDSTS_INTER); | 974 | ControlvMaskByte(pDevice,MESSAGE_REQUEST_MACREG,MAC_REG_PAPEDELAY,LEDSTS_STS,LEDSTS_INTER); |
976 | if ((pDevice->bWPADEVUp) && (pDevice->skb != NULL)) { | ||
977 | if(skb_tailroom(pDevice->skb) <(sizeof(viawget_wpa_header)+pMgmt->sAssocInfo.AssocInfo.ResponseIELength+ | ||
978 | pMgmt->sAssocInfo.AssocInfo.RequestIELength)) { //data room not enough | ||
979 | dev_kfree_skb(pDevice->skb); | ||
980 | pDevice->skb = dev_alloc_skb((int)pDevice->rx_buf_sz); | ||
981 | } | ||
982 | wpahdr = (viawget_wpa_header *)pDevice->skb->data; | ||
983 | wpahdr->type = VIAWGET_ASSOC_MSG; | ||
984 | wpahdr->resp_ie_len = pMgmt->sAssocInfo.AssocInfo.ResponseIELength; | ||
985 | wpahdr->req_ie_len = pMgmt->sAssocInfo.AssocInfo.RequestIELength; | ||
986 | memcpy(pDevice->skb->data + sizeof(viawget_wpa_header), pMgmt->sAssocInfo.abyIEs, wpahdr->req_ie_len); | ||
987 | memcpy(pDevice->skb->data + sizeof(viawget_wpa_header) + wpahdr->req_ie_len, | ||
988 | pbyIEs, | ||
989 | wpahdr->resp_ie_len | ||
990 | ); | ||
991 | skb_put(pDevice->skb, sizeof(viawget_wpa_header) + wpahdr->resp_ie_len + wpahdr->req_ie_len); | ||
992 | pDevice->skb->dev = pDevice->wpadev; | ||
993 | skb_reset_mac_header(pDevice->skb); | ||
994 | pDevice->skb->pkt_type = PACKET_HOST; | ||
995 | pDevice->skb->protocol = htons(ETH_P_802_2); | ||
996 | memset(pDevice->skb->cb, 0, sizeof(pDevice->skb->cb)); | ||
997 | netif_rx(pDevice->skb); | ||
998 | pDevice->skb = dev_alloc_skb((int)pDevice->rx_buf_sz); | ||
999 | } | ||
1000 | 975 | ||
1001 | #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT | ||
1002 | //if(pDevice->bWPASuppWextEnabled == TRUE) | 976 | //if(pDevice->bWPASuppWextEnabled == TRUE) |
1003 | { | 977 | { |
1004 | BYTE buf[512]; | 978 | BYTE buf[512]; |
@@ -1037,7 +1011,6 @@ s_vMgrRxAssocResponse( | |||
1037 | wireless_send_event(pDevice->dev, SIOCGIWAP, &wrqu, NULL); | 1011 | wireless_send_event(pDevice->dev, SIOCGIWAP, &wrqu, NULL); |
1038 | 1012 | ||
1039 | } | 1013 | } |
1040 | #endif //#ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT | ||
1041 | 1014 | ||
1042 | } | 1015 | } |
1043 | else { | 1016 | else { |
@@ -1053,14 +1026,12 @@ s_vMgrRxAssocResponse( | |||
1053 | 1026 | ||
1054 | } | 1027 | } |
1055 | 1028 | ||
1056 | #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT | ||
1057 | //need clear flags related to Networkmanager | 1029 | //need clear flags related to Networkmanager |
1058 | pDevice->bwextstep0 = FALSE; | 1030 | pDevice->bwextstep0 = FALSE; |
1059 | pDevice->bwextstep1 = FALSE; | 1031 | pDevice->bwextstep1 = FALSE; |
1060 | pDevice->bwextstep2 = FALSE; | 1032 | pDevice->bwextstep2 = FALSE; |
1061 | pDevice->bwextstep3 = FALSE; | 1033 | pDevice->bwextstep3 = FALSE; |
1062 | pDevice->bWPASuppWextEnabled = FALSE; | 1034 | pDevice->bWPASuppWextEnabled = FALSE; |
1063 | #endif | ||
1064 | 1035 | ||
1065 | if(pMgmt->eCurrState == WMAC_STATE_ASSOC) | 1036 | if(pMgmt->eCurrState == WMAC_STATE_ASSOC) |
1066 | timer_expire(pDevice->sTimerCommand, 0); | 1037 | timer_expire(pDevice->sTimerCommand, 0); |
@@ -1587,7 +1558,6 @@ s_vMgrRxDisassociation( | |||
1587 | WLAN_FR_DISASSOC sFrame; | 1558 | WLAN_FR_DISASSOC sFrame; |
1588 | unsigned int uNodeIndex = 0; | 1559 | unsigned int uNodeIndex = 0; |
1589 | CMD_STATUS CmdStatus; | 1560 | CMD_STATUS CmdStatus; |
1590 | viawget_wpa_header *wpahdr; | ||
1591 | 1561 | ||
1592 | if ( pMgmt->eCurrMode == WMAC_MODE_ESS_AP ){ | 1562 | if ( pMgmt->eCurrMode == WMAC_MODE_ESS_AP ){ |
1593 | // if is acting an AP.. | 1563 | // if is acting an AP.. |
@@ -1608,20 +1578,6 @@ s_vMgrRxDisassociation( | |||
1608 | DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "AP disassociated me, reason=%d.\n", cpu_to_le16(*(sFrame.pwReason))); | 1578 | DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "AP disassociated me, reason=%d.\n", cpu_to_le16(*(sFrame.pwReason))); |
1609 | 1579 | ||
1610 | pDevice->fWPA_Authened = FALSE; | 1580 | pDevice->fWPA_Authened = FALSE; |
1611 | if ((pDevice->bWPADEVUp) && (pDevice->skb != NULL)) { | ||
1612 | wpahdr = (viawget_wpa_header *)pDevice->skb->data; | ||
1613 | wpahdr->type = VIAWGET_DISASSOC_MSG; | ||
1614 | wpahdr->resp_ie_len = 0; | ||
1615 | wpahdr->req_ie_len = 0; | ||
1616 | skb_put(pDevice->skb, sizeof(viawget_wpa_header)); | ||
1617 | pDevice->skb->dev = pDevice->wpadev; | ||
1618 | skb_reset_mac_header(pDevice->skb); | ||
1619 | pDevice->skb->pkt_type = PACKET_HOST; | ||
1620 | pDevice->skb->protocol = htons(ETH_P_802_2); | ||
1621 | memset(pDevice->skb->cb, 0, sizeof(pDevice->skb->cb)); | ||
1622 | netif_rx(pDevice->skb); | ||
1623 | pDevice->skb = dev_alloc_skb((int)pDevice->rx_buf_sz); | ||
1624 | } | ||
1625 | 1581 | ||
1626 | //TODO: do something let upper layer know or | 1582 | //TODO: do something let upper layer know or |
1627 | //try to send associate packet again because of inactivity timeout | 1583 | //try to send associate packet again because of inactivity timeout |
@@ -1638,7 +1594,6 @@ s_vMgrRxDisassociation( | |||
1638 | } | 1594 | } |
1639 | } | 1595 | } |
1640 | 1596 | ||
1641 | #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT | ||
1642 | // if(pDevice->bWPASuppWextEnabled == TRUE) | 1597 | // if(pDevice->bWPASuppWextEnabled == TRUE) |
1643 | { | 1598 | { |
1644 | union iwreq_data wrqu; | 1599 | union iwreq_data wrqu; |
@@ -1647,7 +1602,6 @@ s_vMgrRxDisassociation( | |||
1647 | PRINT_K("wireless_send_event--->SIOCGIWAP(disassociated)\n"); | 1602 | PRINT_K("wireless_send_event--->SIOCGIWAP(disassociated)\n"); |
1648 | wireless_send_event(pDevice->dev, SIOCGIWAP, &wrqu, NULL); | 1603 | wireless_send_event(pDevice->dev, SIOCGIWAP, &wrqu, NULL); |
1649 | } | 1604 | } |
1650 | #endif | ||
1651 | } | 1605 | } |
1652 | /* else, ignore it */ | 1606 | /* else, ignore it */ |
1653 | 1607 | ||
@@ -1676,7 +1630,6 @@ s_vMgrRxDeauthentication( | |||
1676 | { | 1630 | { |
1677 | WLAN_FR_DEAUTHEN sFrame; | 1631 | WLAN_FR_DEAUTHEN sFrame; |
1678 | unsigned int uNodeIndex = 0; | 1632 | unsigned int uNodeIndex = 0; |
1679 | viawget_wpa_header *wpahdr; | ||
1680 | 1633 | ||
1681 | 1634 | ||
1682 | if (pMgmt->eCurrMode == WMAC_MODE_ESS_AP ){ | 1635 | if (pMgmt->eCurrMode == WMAC_MODE_ESS_AP ){ |
@@ -1712,22 +1665,6 @@ s_vMgrRxDeauthentication( | |||
1712 | } | 1665 | } |
1713 | } | 1666 | } |
1714 | 1667 | ||
1715 | if ((pDevice->bWPADEVUp) && (pDevice->skb != NULL)) { | ||
1716 | wpahdr = (viawget_wpa_header *)pDevice->skb->data; | ||
1717 | wpahdr->type = VIAWGET_DISASSOC_MSG; | ||
1718 | wpahdr->resp_ie_len = 0; | ||
1719 | wpahdr->req_ie_len = 0; | ||
1720 | skb_put(pDevice->skb, sizeof(viawget_wpa_header)); | ||
1721 | pDevice->skb->dev = pDevice->wpadev; | ||
1722 | skb_reset_mac_header(pDevice->skb); | ||
1723 | pDevice->skb->pkt_type = PACKET_HOST; | ||
1724 | pDevice->skb->protocol = htons(ETH_P_802_2); | ||
1725 | memset(pDevice->skb->cb, 0, sizeof(pDevice->skb->cb)); | ||
1726 | netif_rx(pDevice->skb); | ||
1727 | pDevice->skb = dev_alloc_skb((int)pDevice->rx_buf_sz); | ||
1728 | } | ||
1729 | |||
1730 | #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT | ||
1731 | // if(pDevice->bWPASuppWextEnabled == TRUE) | 1668 | // if(pDevice->bWPASuppWextEnabled == TRUE) |
1732 | { | 1669 | { |
1733 | union iwreq_data wrqu; | 1670 | union iwreq_data wrqu; |
@@ -1736,7 +1673,6 @@ s_vMgrRxDeauthentication( | |||
1736 | PRINT_K("wireless_send_event--->SIOCGIWAP(disauthen)\n"); | 1673 | PRINT_K("wireless_send_event--->SIOCGIWAP(disauthen)\n"); |
1737 | wireless_send_event(pDevice->dev, SIOCGIWAP, &wrqu, NULL); | 1674 | wireless_send_event(pDevice->dev, SIOCGIWAP, &wrqu, NULL); |
1738 | } | 1675 | } |
1739 | #endif | ||
1740 | 1676 | ||
1741 | } | 1677 | } |
1742 | /* else, ignore it. TODO: IBSS authentication service | 1678 | /* else, ignore it. TODO: IBSS authentication service |
@@ -2645,10 +2581,8 @@ void vMgrJoinBSSBegin(void *hDeviceContext, PCMD_STATUS pStatus) | |||
2645 | */ | 2581 | */ |
2646 | } | 2582 | } |
2647 | 2583 | ||
2648 | #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT | ||
2649 | //if(pDevice->bWPASuppWextEnabled == TRUE) | 2584 | //if(pDevice->bWPASuppWextEnabled == TRUE) |
2650 | Encyption_Rebuild(pDevice, pCurr); | 2585 | Encyption_Rebuild(pDevice, pCurr); |
2651 | #endif | ||
2652 | 2586 | ||
2653 | // Infrastructure BSS | 2587 | // Infrastructure BSS |
2654 | s_vMgrSynchBSS(pDevice, | 2588 | s_vMgrSynchBSS(pDevice, |