From e09b41010ba33a20a87472ee821fa407a5b8da36 Mon Sep 17 00:00:00 2001 From: José Pekkarinen Date: Mon, 11 Apr 2016 10:41:07 +0300 Subject: These changes are the raw update to linux-4.4.6-rt14. Kernel sources are taken from kernel.org, and rt patch from the rt wiki download page. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit During the rebasing, the following patch collided: Force tick interrupt and get rid of softirq magic(I70131fb85). Collisions have been removed because its logic was found on the source already. Change-Id: I7f57a4081d9deaa0d9ccfc41a6c8daccdee3b769 Signed-off-by: José Pekkarinen --- .../drivers/staging/rtl8188eu/core/rtw_wlan_util.c | 24 ++++++++++------------ 1 file changed, 11 insertions(+), 13 deletions(-) (limited to 'kernel/drivers/staging/rtl8188eu/core/rtw_wlan_util.c') diff --git a/kernel/drivers/staging/rtl8188eu/core/rtw_wlan_util.c b/kernel/drivers/staging/rtl8188eu/core/rtw_wlan_util.c index 2b371757c..59b443255 100644 --- a/kernel/drivers/staging/rtl8188eu/core/rtw_wlan_util.c +++ b/kernel/drivers/staging/rtl8188eu/core/rtw_wlan_util.c @@ -19,6 +19,8 @@ ******************************************************************************/ #define _RTW_WLAN_UTIL_C_ +#include + #include #include #include @@ -603,7 +605,7 @@ void WMMOnAssocRsp(struct adapter *padapter) inx[0] = 0; inx[1] = 1; inx[2] = 2; inx[3] = 3; if (pregpriv->wifi_spec == 1) { - u32 j, tmp, change_inx = false; + u32 j, change_inx = false; /* entry indx: 0->vo, 1->vi, 2->be, 3->bk. */ for (i = 0; i < 4; i++) { @@ -618,14 +620,8 @@ void WMMOnAssocRsp(struct adapter *padapter) } if (change_inx) { - tmp = edca[i]; - edca[i] = edca[j]; - edca[j] = tmp; - - tmp = inx[i]; - inx[i] = inx[j]; - inx[j] = tmp; - + swap(edca[i], edca[j]); + swap(inx[i], inx[j]); change_inx = false; } } @@ -1231,7 +1227,7 @@ unsigned int update_basic_rate(unsigned char *ptn, unsigned int ptn_sz) unsigned int i, num_of_rate; unsigned int mask = 0; - num_of_rate = (ptn_sz > NumRates) ? NumRates : ptn_sz; + num_of_rate = min_t(unsigned int, ptn_sz, NumRates); for (i = 0; i < num_of_rate; i++) { if ((*(ptn + i)) & 0x80) @@ -1245,7 +1241,7 @@ unsigned int update_supported_rate(unsigned char *ptn, unsigned int ptn_sz) unsigned int i, num_of_rate; unsigned int mask = 0; - num_of_rate = (ptn_sz > NumRates) ? NumRates : ptn_sz; + num_of_rate = min_t(unsigned int, ptn_sz, NumRates); for (i = 0; i < num_of_rate; i++) mask |= 0x1 << wifirate2_ratetbl_inx(*(ptn + i)); @@ -1418,13 +1414,15 @@ void update_IOT_info(struct adapter *padapter) pmlmeinfo->turboMode_cts2self = 0; pmlmeinfo->turboMode_rtsen = 1; /* disable high power */ - Switch_DM_Func(padapter, (~DYNAMIC_BB_DYNAMIC_TXPWR), false); + Switch_DM_Func(padapter, (u32)(~DYNAMIC_BB_DYNAMIC_TXPWR), + false); break; case HT_IOT_PEER_REALTEK: /* rtw_write16(padapter, 0x4cc, 0xffff); */ /* rtw_write16(padapter, 0x546, 0x01c0); */ /* disable high power */ - Switch_DM_Func(padapter, (~DYNAMIC_BB_DYNAMIC_TXPWR), false); + Switch_DM_Func(padapter, (u32)(~DYNAMIC_BB_DYNAMIC_TXPWR), + false); break; default: pmlmeinfo->turboMode_cts2self = 0; -- cgit 1.2.3-korg