Merge pull request #132 from mbuzdalov/realtek-4.4.x

Cleanup the compilation warnings
This commit is contained in:
Carlos Garcés 2019-07-08 09:23:18 +02:00 committed by GitHub
commit ae558aa677
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 59 additions and 47 deletions

View File

@ -12423,15 +12423,23 @@ void rtw_delba_check(_adapter *padapter, struct sta_info *psta, u8 from_timer)
if (_TRUE == rtw_inc_and_chk_continual_no_rx_packet(psta, i)) { if (_TRUE == rtw_inc_and_chk_continual_no_rx_packet(psta, i)) {
/* send a DELBA frame to the peer STA with the Reason Code field set to TIMEOUT */ /* send a DELBA frame to the peer STA with the Reason Code field set to TIMEOUT */
if (!from_timer) if (!from_timer)
{
ret = issue_del_ba_ex(padapter, psta->hwaddr, i, 39, 0, 3, 1); ret = issue_del_ba_ex(padapter, psta->hwaddr, i, 39, 0, 3, 1);
}
else else
{
issue_del_ba(padapter, psta->hwaddr, i, 39, 0); issue_del_ba(padapter, psta->hwaddr, i, 39, 0);
}
psta->recvreorder_ctrl[i].enable = _FALSE; psta->recvreorder_ctrl[i].enable = _FALSE;
if (ret != _FAIL) if (ret != _FAIL)
{
psta->recvreorder_ctrl[i].ampdu_size = RX_AMPDU_SIZE_INVALID; psta->recvreorder_ctrl[i].ampdu_size = RX_AMPDU_SIZE_INVALID;
}
rtw_reset_continual_no_rx_packet(psta, i); rtw_reset_continual_no_rx_packet(psta, i);
} }
}else{ }
else
{
/* The inactivity timer is reset when MPDUs to the TID is received. */ /* The inactivity timer is reset when MPDUs to the TID is received. */
rtw_reset_continual_no_rx_packet(psta, i); rtw_reset_continual_no_rx_packet(psta, i);
} }

View File

@ -1507,7 +1507,6 @@ _func_enter_;
{ {
qc_exists = 1; qc_exists = 1;
if(hdrlen != WLAN_HDR_A3_QOS_LEN){ if(hdrlen != WLAN_HDR_A3_QOS_LEN){
hdrlen += 2; hdrlen += 2;
} }
} }
@ -1519,7 +1518,6 @@ _func_enter_;
(frsubtype == 0x0b))) (frsubtype == 0x0b)))
{ {
if(hdrlen != WLAN_HDR_A3_QOS_LEN){ if(hdrlen != WLAN_HDR_A3_QOS_LEN){
hdrlen += 2; hdrlen += 2;
} }
qc_exists = 1; qc_exists = 1;
@ -1596,7 +1594,9 @@ _func_enter_;
/* Insert MIC into payload */ /* Insert MIC into payload */
for (j = 0; j < 8; j++) for (j = 0; j < 8; j++)
{
pframe[payload_index+j] = mic[j]; //message[payload_index+j] = mic[j]; pframe[payload_index+j] = mic[j]; //message[payload_index+j] = mic[j];
}
payload_index = hdrlen + 8; payload_index = hdrlen + 8;
for (i=0; i< num_blocks; i++) for (i=0; i< num_blocks; i++)
@ -1982,7 +1982,9 @@ _func_enter_;
/* Insert MIC into payload */ /* Insert MIC into payload */
for (j = 0; j < 8; j++) for (j = 0; j < 8; j++)
{
message[payload_index+j] = mic[j]; message[payload_index+j] = mic[j];
}
payload_index = hdrlen + 8; payload_index = hdrlen + 8;
for (i=0; i< num_blocks; i++) for (i=0; i< num_blocks; i++)

View File

@ -31,14 +31,18 @@
#define STATION_INFO_ASSOC_REQ_IES 0 #define STATION_INFO_ASSOC_REQ_IES 0
#endif /* Linux kernel >= 4.0.0 */ #endif /* Linux kernel >= 4.0.0 */
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0))
enum ieee80211_band {
IEEE80211_BAND_2GHZ = NL80211_BAND_2GHZ,
IEEE80211_BAND_5GHZ = NL80211_BAND_5GHZ,
IEEE80211_BAND_60GHZ = NL80211_BAND_60GHZ,
/* keep last */ // Creating your own enum to compare with another one is not very accurate.
IEEE80211_NUM_BANDS // I have rewritten this through defines, so that it means the same, while keeping compilers happy.
}; #define ieee80211_band nl80211_band
#define IEEE80211_BAND_2GHZ NL80211_BAND_2GHZ
#define IEEE80211_BAND_5GHZ NL80211_BAND_5GHZ
#define IEEE80211_BAND_60GHZ NL80211_BAND_60GHZ
// this was not used in the entire *.c file, so I just safely drop it
/* keep last */
// IEEE80211_NUM_BANDS
#endif /* Linux kernel >= 4.7.0 */ #endif /* Linux kernel >= 4.7.0 */
#include <rtw_wifi_regd.h> #include <rtw_wifi_regd.h>
@ -224,9 +228,7 @@ void rtw_5g_rates_init(struct ieee80211_rate *rates)
); );
} }
struct ieee80211_supported_band *rtw_spt_band_alloc( struct ieee80211_supported_band *rtw_spt_band_alloc(enum ieee80211_band band)
enum ieee80211_band band
)
{ {
struct ieee80211_supported_band *spt_band = NULL; struct ieee80211_supported_band *spt_band = NULL;
int n_channels, n_bitrates; int n_channels, n_bitrates;