From 9132e40ce60ffe91db14af99be1a913b855b4620 Mon Sep 17 00:00:00 2001 From: astsam Date: Sun, 25 Jun 2017 09:51:07 +0300 Subject: [PATCH] Initialize some variables --- hal/rtl8814a/rtl8814a_hal_init.c | 2 +- os_dep/linux/ioctl_cfg80211.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hal/rtl8814a/rtl8814a_hal_init.c b/hal/rtl8814a/rtl8814a_hal_init.c index b9dfcaa..65e8226 100644 --- a/hal/rtl8814a/rtl8814a_hal_init.c +++ b/hal/rtl8814a/rtl8814a_hal_init.c @@ -5246,7 +5246,7 @@ static void hw_var_set_mlme_sitesurvey(PADAPTER Adapter, u8 variable, u8* val) u16 value_rxfltmap2; HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter); struct mlme_priv *pmlmepriv=&(Adapter->mlmepriv); - u8 ap_num; + u8 ap_num = 0; #ifdef DBG_IFACE_STATUS DBG_IFACE_STATUS_DUMP(Adapter); diff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c index db60ca3..ccb9310 100644 --- a/os_dep/linux/ioctl_cfg80211.c +++ b/os_dep/linux/ioctl_cfg80211.c @@ -4273,8 +4273,8 @@ static int cfg80211_rtw_get_channel(struct wiphy *wiphy, struct wireless_dev *wd int channel; int control_freq; int center_freq; - int center_freq2=0; - int width; + int center_freq2 = 0; + int width = NL80211_CHAN_WIDTH_20; int band; int bandWidth; int offset; @@ -4286,7 +4286,7 @@ static int cfg80211_rtw_get_channel(struct wiphy *wiphy, struct wireless_dev *wd return -ENODEV; offset = rtw_get_oper_choffset(padapter); - channel = adapter_to_dvobj(padapter)->oper_channel; + center_freq = channel = adapter_to_dvobj(padapter)->oper_channel; if(channel >= 1){ switch(pHalData->CurrentBandType){