These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git] / kernel / drivers / staging / rtl8188eu / os_dep / mlme_linux.c
index baff1e2..08bfa76 100644 (file)
@@ -41,8 +41,6 @@ void rtw_os_indicate_connect(struct adapter *adapter)
 {
        rtw_indicate_wx_assoc_event(adapter);
        netif_carrier_on(adapter->pnetdev);
-       if (adapter->pid[2] != 0)
-               rtw_signal_process(adapter->pid[2], SIGALRM);
 }
 
 void rtw_os_indicate_scan_done(struct adapter *padapter, bool aborted)
@@ -82,7 +80,7 @@ void rtw_reset_securitypriv(struct adapter *adapter)
                /* reset values in securitypriv */
                struct security_priv *psec_priv = &adapter->securitypriv;
 
-               psec_priv->dot11AuthAlgrthm = dot11AuthAlgrthm_Open;  /* open system */
+               psec_priv->dot11AuthAlgrthm = dot11AuthAlgrthm_Open;
                psec_priv->dot11PrivacyAlgrthm = _NO_PRIVACY_;
                psec_priv->dot11PrivacyKeyIndex = 0;
                psec_priv->dot118021XGrpPrivacy = _NO_PRIVACY_;
@@ -118,14 +116,13 @@ void rtw_report_sec_ie(struct adapter *adapter, u8 authmode, u8 *sec_ie)
                p = buff;
                p += sprintf(p, "ASSOCINFO(ReqIEs =");
                len = sec_ie[1]+2;
-               len =  (len < IW_CUSTOM_MAX) ? len : IW_CUSTOM_MAX;
+               len =  min_t(uint, len, IW_CUSTOM_MAX);
                for (i = 0; i < len; i++)
                        p += sprintf(p, "%02x", sec_ie[i]);
                p += sprintf(p, ")");
                memset(&wrqu, 0, sizeof(wrqu));
                wrqu.data.length = p-buff;
-               wrqu.data.length = (wrqu.data.length < IW_CUSTOM_MAX) ?
-                                  wrqu.data.length : IW_CUSTOM_MAX;
+               wrqu.data.length = min_t(__u16, wrqu.data.length, IW_CUSTOM_MAX);
                wireless_send_event(adapter->pnetdev, IWEVCUSTOM, &wrqu, buff);
                kfree(buff);
        }
@@ -154,7 +151,7 @@ void rtw_indicate_sta_assoc_event(struct adapter *padapter, struct sta_info *pst
        union iwreq_data wrqu;
        struct sta_priv *pstapriv = &padapter->stapriv;
 
-       if (psta == NULL)
+       if (!psta)
                return;
 
        if (psta->aid > NUM_STA)
@@ -178,7 +175,7 @@ void rtw_indicate_sta_disassoc_event(struct adapter *padapter, struct sta_info *
        union iwreq_data wrqu;
        struct sta_priv *pstapriv = &padapter->stapriv;
 
-       if (psta == NULL)
+       if (!psta)
                return;
 
        if (psta->aid > NUM_STA)