aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/vt6656
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/staging/vt6656')
-rw-r--r--drivers/staging/vt6656/iwctl.c71
1 files changed, 34 insertions, 37 deletions
diff --git a/drivers/staging/vt6656/iwctl.c b/drivers/staging/vt6656/iwctl.c
index eeaee59da82..3249a017f3d 100644
--- a/drivers/staging/vt6656/iwctl.c
+++ b/drivers/staging/vt6656/iwctl.c
@@ -748,23 +748,41 @@ int iwctl_siwessid(struct net_device *dev, struct iw_request_info *info,
748 //so here need not associate?? 748 //so here need not associate??
749 if(pDevice->bWPASuppWextEnabled == TRUE) { 749 if(pDevice->bWPASuppWextEnabled == TRUE) {
750 /*******search if in hidden ssid mode ****/ 750 /*******search if in hidden ssid mode ****/
751 { 751 PKnownBSS pCurr = NULL;
752 PKnownBSS pCurr = NULL; 752 BYTE abyTmpDesireSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1];
753 BYTE abyTmpDesireSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1]; 753 unsigned ii;
754 unsigned ii; 754 unsigned uSameBssidNum = 0;
755 unsigned uSameBssidNum = 0; 755
756 756 memcpy(abyTmpDesireSSID,pMgmt->abyDesireSSID,sizeof(abyTmpDesireSSID));
757 memcpy(abyTmpDesireSSID,pMgmt->abyDesireSSID,sizeof(abyTmpDesireSSID)); 757 pCurr = BSSpSearchBSSList(pDevice, NULL,
758 pCurr = BSSpSearchBSSList(pDevice, 758 abyTmpDesireSSID,
759 NULL, 759 pDevice->eConfigPHYMode
760 abyTmpDesireSSID, 760 );
761 pDevice->eConfigPHYMode 761
762 ); 762 if (pCurr == NULL){
763 763 PRINT_K("SIOCSIWESSID:hidden ssid site survey before associate.......\n");
764 if (pCurr == NULL){ 764 vResetCommandTimer((void *) pDevice);
765 PRINT_K("SIOCSIWESSID:hidden ssid site survey before associate.......\n"); 765 pMgmt->eScanType = WMAC_SCAN_ACTIVE;
766 bScheduleCommand((void *) pDevice,
767 WLAN_CMD_BSSID_SCAN,
768 pMgmt->abyDesireSSID);
769 bScheduleCommand((void *) pDevice,
770 WLAN_CMD_SSID,
771 pMgmt->abyDesireSSID);
772 }
773 else { //mike:to find out if that desired SSID is a hidden-ssid AP ,
774 // by means of judging if there are two same BSSID exist in list ?
775 for (ii = 0; ii < MAX_BSS_NUM; ii++) {
776 if (pMgmt->sBSSList[ii].bActive &&
777 !compare_ether_addr(pMgmt->sBSSList[ii].abyBSSID,
778 pCurr->abyBSSID)) {
779 uSameBssidNum++;
780 }
781 }
782 if(uSameBssidNum >= 2) { //hit: desired AP is in hidden ssid mode!!!
783 PRINT_K("SIOCSIWESSID:hidden ssid directly associate.......\n");
766 vResetCommandTimer((void *) pDevice); 784 vResetCommandTimer((void *) pDevice);
767 pMgmt->eScanType = WMAC_SCAN_ACTIVE; 785 pMgmt->eScanType = WMAC_SCAN_PASSIVE; //this scan type,you'll submit scan result!
768 bScheduleCommand((void *) pDevice, 786 bScheduleCommand((void *) pDevice,
769 WLAN_CMD_BSSID_SCAN, 787 WLAN_CMD_BSSID_SCAN,
770 pMgmt->abyDesireSSID); 788 pMgmt->abyDesireSSID);
@@ -772,27 +790,6 @@ int iwctl_siwessid(struct net_device *dev, struct iw_request_info *info,
772 WLAN_CMD_SSID, 790 WLAN_CMD_SSID,
773 pMgmt->abyDesireSSID); 791 pMgmt->abyDesireSSID);
774 } 792 }
775 else { //mike:to find out if that desired SSID is a hidden-ssid AP ,
776 // by means of judging if there are two same BSSID exist in list ?
777 for (ii = 0; ii < MAX_BSS_NUM; ii++) {
778 if (pMgmt->sBSSList[ii].bActive &&
779 !compare_ether_addr(pMgmt->sBSSList[ii].abyBSSID,
780 pCurr->abyBSSID)) {
781 uSameBssidNum++;
782 }
783 }
784 if(uSameBssidNum >= 2) { //hit: desired AP is in hidden ssid mode!!!
785 PRINT_K("SIOCSIWESSID:hidden ssid directly associate.......\n");
786 vResetCommandTimer((void *) pDevice);
787 pMgmt->eScanType = WMAC_SCAN_PASSIVE; //this scan type,you'll submit scan result!
788 bScheduleCommand((void *) pDevice,
789 WLAN_CMD_BSSID_SCAN,
790 pMgmt->abyDesireSSID);
791 bScheduleCommand((void *) pDevice,
792 WLAN_CMD_SSID,
793 pMgmt->abyDesireSSID);
794 }
795 }
796 } 793 }
797 return 0; 794 return 0;
798 } 795 }