Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7019bb3e authored by James Zmuda's avatar James Zmuda Committed by Kiet Lam
Browse files

wlan: Prevent HDD roam profile being cleared during assoc process

During the normal course of association, SME returns the "roamStatus" of
eCRS_ROAM_SHOULD_ROAM.  Currently HDD treats this as an opportunity to
clear its copy of the "roam profile".  While this is fine for all other
cases, this doesn't always work for WEP associations.  Because for WEP,
since the "network profile" supplied by the supplicant isn't specific
about "WEP open" or "WEP shared" HDD has to try both.  But since HDD
copy of the "roam profile" is cleared during the initial association,
this means that the re-try of the WEP assoc will be to a "cleared" or
"wildcard" SSID.

Change-Id: I431eac02e4257b95e3cc82e85c9b7cf39fcc2fd1
CRs-fixed: 557427
parent 72cdfd32
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -1361,7 +1361,6 @@ static eHalStatus hdd_AssociationCompletionHandler( hdd_adapter_t *pAdapter, tCs
                            rspRsnIe, rspRsnLength,
                            WLAN_STATUS_SUCCESS,
                            GFP_KERNEL);

                }
            }
            cfg80211_put_bss(
@@ -1484,8 +1483,11 @@ static eHalStatus hdd_AssociationCompletionHandler( hdd_adapter_t *pAdapter, tCs
        }

        /* CR465478: Only send up a connection failure result when CSR has
         * completed operation - with a ASSOCIATION_FAILURE status. */
        if ( eCSR_ROAM_ASSOCIATION_FAILURE == roamStatus )
         * completed operation - with a ASSOCIATION_FAILURE status.
         * or an ASSOCIATION_COMPLETION with RESULT_NOT_ASSOCIATED */
        if (( eCSR_ROAM_ASSOCIATION_FAILURE == roamStatus ) ||
                (( eCSR_ROAM_ASSOCIATION_COMPLETION == roamStatus )
                 && ( eCSR_ROAM_RESULT_NOT_ASSOCIATED == roamResult )))
        {
            /* inform association failure event to nl80211 */
            if ( eCSR_ROAM_RESULT_ASSOC_FAIL_CON_CHANNEL == roamResult )
@@ -2497,8 +2499,6 @@ eHalStatus hdd_smeRoamCallback( void *pContext, tCsrRoamInfo *pRoamInfo, tANI_U3
                    halStatus = eHAL_STATUS_FAILURE;
                }
#endif
                // Clear saved connection information in HDD
                hdd_connRemoveConnectInfo( WLAN_HDD_GET_STATION_CTX_PTR(pAdapter) );
            }
           break;
        case eCSR_ROAM_LOSTLINK:
@@ -2559,6 +2559,8 @@ eHalStatus hdd_smeRoamCallback( void *pContext, tCsrRoamInfo *pRoamInfo, tANI_U3
            }
            else
            {
                // Clear saved connection information in HDD
                hdd_connRemoveConnectInfo( WLAN_HDD_GET_STATION_CTX_PTR(pAdapter) );
                halStatus = hdd_AssociationCompletionHandler( pAdapter, pRoamInfo, roamId, roamStatus, roamResult );
            }