From c87010367d2bd350b76ddc0764fd183e1c9b6f90 Mon Sep 17 00:00:00 2001 From: Christian B Date: Sun, 10 Feb 2019 03:05:40 +0100 Subject: [PATCH] Fix both ISO90 warning and get_channel function --- os_dep/linux/ioctl_cfg80211.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c index 4318d7d..195d97a 100644 --- a/os_dep/linux/ioctl_cfg80211.c +++ b/os_dep/linux/ioctl_cfg80211.c @@ -3852,8 +3852,8 @@ void rtw_cfg80211_indicate_sta_assoc(_adapter *padapter, u8 *pmgmt_frame, uint f #if defined(RTW_USE_CFG80211_STA_EVENT) || defined(COMPAT_KERNEL_RELEASE) { struct station_info sinfo; - _rtw_memset(&sinfo, 0, sizeof(struct station_info)); u8 ie_offset; + _rtw_memset(&sinfo, 0, sizeof(struct station_info)); if (get_frame_sub_type(pmgmt_frame) == WIFI_ASSOCREQ) ie_offset = _ASOCREQ_IE_OFFSET_; else /* WIFI_REASSOCREQ */ @@ -4859,6 +4859,16 @@ static int cfg80211_rtw_get_channel(struct wiphy *wiphy, struct wireless_dev *wd //DBG_871X("%s dvobj null\n", __func__); } switch(pHalData->current_channel_bw){ + case CHANNEL_WIDTH_5: + //DBG_871X("%s width 5\n", __func__); + width = NL80211_CHAN_WIDTH_5; + center_freq = control_freq; + break; + case CHANNEL_WIDTH_10: + //DBG_871X("%s width 5\n", __func__); + width = NL80211_CHAN_WIDTH_10; + center_freq = control_freq; + break; case CHANNEL_WIDTH_20: //DBG_871X("%s width 20\n", __func__); width = NL80211_CHAN_WIDTH_20;