Android-x86
Fork
Donation

  • R/O
  • HTTP
  • SSH
  • HTTPS

external-modules-rtl8723au: Commit

external/modules/rtl8723au


Commit MetaInfo

Revision61de6bd146c8413759a9853d03baffe86c69ea52 (tree)
Time2013-12-10 01:32:09
AuthorJes Sorensen <Jes.Sorensen@redh...>
CommiterLarry Finger

Log Message

Make parts of ioctl_linux.c slightly less ugly

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>

Change Summary

Incremental Difference

--- a/os_dep/ioctl_linux.c
+++ b/os_dep/ioctl_linux.c
@@ -78,12 +78,31 @@ extern u8 key_2char2num(u8 hch, u8 lch);
7878 extern u8 str_2char2num(u8 hch, u8 lch);
7979 extern u8 convert_ip_addr(u8 hch, u8 mch, u8 lch);
8080
81-u32 rtw_rates[] = {1000000,2000000,5500000,11000000,
82- 6000000,9000000,12000000,18000000,24000000,36000000,48000000,54000000};
81+u32 rtw_rates[] =
82+{
83+ 1000000,
84+ 2000000,
85+ 5500000,
86+ 11000000,
87+ 6000000,
88+ 9000000,
89+ 12000000,
90+ 18000000,
91+ 24000000,
92+ 36000000,
93+ 48000000,
94+ 54000000
95+};
8396
84-static const char * const iw_operation_mode[] =
97+static const char *const iw_operation_mode[] =
8598 {
86- "Auto", "Ad-Hoc", "Managed", "Master", "Repeater", "Secondary", "Monitor"
99+ "Auto",
100+ "Ad-Hoc",
101+ "Managed",
102+ "Master",
103+ "Repeater",
104+ "Secondary",
105+ "Monitor"
87106 };
88107
89108 static int hex2num_i(char c)
@@ -142,17 +161,18 @@ static void indicate_wx_custom_event(struct rtw_adapter *padapter, char *msg)
142161 union iwreq_data wrqu;
143162
144163 if (strlen(msg) > IW_CUSTOM_MAX) {
145- DBG_8723A("%s strlen(msg):%zu > IW_CUSTOM_MAX:%u\n", __func__ , strlen(msg), IW_CUSTOM_MAX);
164+ DBG_8723A("%s strlen(msg):%zu > IW_CUSTOM_MAX:%u\n",
165+ __func__ , strlen(msg), IW_CUSTOM_MAX);
146166 return;
147167 }
148168
149169 buff = kzalloc(IW_CUSTOM_MAX + 1, GFP_KERNEL);
150- if(!buff)
170+ if (!buff)
151171 return;
152172
153173 memcpy(buff, msg, strlen(msg));
154174
155- memset(&wrqu,0,sizeof(wrqu));
175+ memset(&wrqu, 0, sizeof(wrqu));
156176 wrqu.data.length = strlen(msg);
157177
158178 DBG_8723A("%s %s\n", __func__, buff);
@@ -161,7 +181,6 @@ static void indicate_wx_custom_event(struct rtw_adapter *padapter, char *msg)
161181 #endif
162182
163183 kfree(buff);
164-
165184 }
166185
167186
@@ -170,20 +189,18 @@ static void request_wps_pbc_event(struct rtw_adapter *padapter)
170189 u8 *buff, *p;
171190 union iwreq_data wrqu;
172191
173-
174192 buff = kzalloc(IW_CUSTOM_MAX, GFP_KERNEL);
175193 if(!buff)
176194 return;
177195
178- p=buff;
196+ p = buff;
197+ p += sprintf(p, "WPS_PBC_START.request=TRUE");
179198
180- p+=sprintf(p, "WPS_PBC_START.request=TRUE");
181-
182- memset(&wrqu,0,sizeof(wrqu));
199+ memset(&wrqu, 0, sizeof(wrqu));
183200
184201 wrqu.data.length = p-buff;
185202
186- wrqu.data.length = (wrqu.data.length<IW_CUSTOM_MAX) ? wrqu.data.length:IW_CUSTOM_MAX;
203+ wrqu.data.length = (wrqu.data.length < IW_CUSTOM_MAX) ? wrqu.data.length:IW_CUSTOM_MAX;
187204
188205 DBG_8723A("%s\n", __func__);
189206
@@ -191,17 +208,15 @@ static void request_wps_pbc_event(struct rtw_adapter *padapter)
191208 wireless_send_event(padapter->pnetdev, IWEVCUSTOM, &wrqu, buff);
192209 #endif
193210
194- if(buff) {
211+ if (buff)
195212 kfree(buff);
196- }
197-
198213 }
199214
200215
201216 void indicate_wx_scan_complete_event(struct rtw_adapter *padapter)
202217 {
203218 union iwreq_data wrqu;
204- struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
219+ struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
205220
206221 memset(&wrqu, 0, sizeof(union iwreq_data));
207222
@@ -221,7 +236,8 @@ void rtw_indicate_wx_assoc_event(struct rtw_adapter *padapter)
221236
222237 wrqu.ap_addr.sa_family = ARPHRD_ETHER;
223238
224- memcpy(wrqu.ap_addr.sa_data, pmlmepriv->cur_network.network.MacAddress, ETH_ALEN);
239+ memcpy(wrqu.ap_addr.sa_data,
240+ pmlmepriv->cur_network.network.MacAddress, ETH_ALEN);
225241
226242 DBG_8723A_LEVEL(_drv_always_, "assoc success\n");
227243 #ifndef CONFIG_IOCTL_CFG80211
@@ -288,7 +304,7 @@ static char *translate_scan(struct rtw_adapter *padapter,
288304 char *p;
289305 u16 max_rate=0, rate, ht_cap=_FALSE;
290306 u32 i = 0;
291- char *current_val;
307+ char *current_val;
292308 long rssi;
293309 u8 bw_40MHz=0, short_GI=0;
294310 u16 mcs_rate=0;
@@ -299,43 +315,42 @@ static char *translate_scan(struct rtw_adapter *padapter,
299315
300316 #ifdef CONFIG_P2P
301317 #ifdef CONFIG_WFD
302- if ( SCAN_RESULT_ALL == pwdinfo->wfd_info->scan_result_type )
303- {
304-
305- }
306- else if ( ( SCAN_RESULT_P2P_ONLY == pwdinfo->wfd_info->scan_result_type ) ||
307- ( SCAN_RESULT_WFD_TYPE == pwdinfo->wfd_info->scan_result_type ) )
318+ if (pwdinfo->wfd_info->scan_result_type == SCAN_RESULT_ALL) {
319+ } else if ((pwdinfo->wfd_info->scan_result_type == SCAN_RESULT_P2P_ONLY) ||
320+ (pwdinfo->wfd_info->scan_result_type == SCAN_RESULT_WFD_TYPE))
308321 #endif // CONFIG_WFD
309322 {
310- if(!rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE))
311- {
323+ if (!rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE)) {
312324 u32 blnGotP2PIE = _FALSE;
313325
314- // User is doing the P2P device discovery
315- // The prefix of SSID should be "DIRECT-" and the IE should contains the P2P IE.
316- // If not, the driver should ignore this AP and go to the next AP.
317-
318- // Verifying the SSID
319- if (!memcmp(pnetwork->network.Ssid.Ssid, pwdinfo->p2p_wildcard_ssid, P2P_WILDCARD_SSID_LEN))
320- {
321- u32 p2pielen = 0;
322-
323- if (pnetwork->network.Reserved[0] == 2) { // Probe Request
324- // Verifying the P2P IE
325- if ( rtw_get_p2p_ie( pnetwork->network.IEs, pnetwork->network.IELength, NULL, &p2pielen) )
326- {
326+ /*
327+ * User is doing the P2P device discovery
328+ * The prefix of SSID should be "DIRECT-" and the IE
329+ * should contains the P2P IE. If not, the driver
330+ * should ignore this AP and go to the next AP.
331+ *
332+ * Verifying the SSID
333+ */
334+ if (!memcmp(pnetwork->network.Ssid.Ssid,
335+ pwdinfo->p2p_wildcard_ssid,
336+ P2P_WILDCARD_SSID_LEN)) {
337+ u32 p2pielen = 0;
338+
339+ /* Probe Request */
340+ if (pnetwork->network.Reserved[0] == 2) {
341+ /* Verifying the P2P IE */
342+ if (rtw_get_p2p_ie(pnetwork->network.IEs, pnetwork->network.IELength, NULL, &p2pielen)) {
327343 blnGotP2PIE = _TRUE;
328344 }
329- } else { // Beacon or Probe Respones
330- // Verifying the P2P IE
331- if ( rtw_get_p2p_ie( &pnetwork->network.IEs[12], pnetwork->network.IELength - 12, NULL, &p2pielen) )
332- {
345+ } else { /* Beacon or Probe Respones */
346+ /* Verifying the P2P IE */
347+ if (rtw_get_p2p_ie( &pnetwork->network.IEs[12], pnetwork->network.IELength - 12, NULL, &p2pielen)) {
333348 blnGotP2PIE = _TRUE;
334349 }
335350 }
336351 }
337352
338- if ( blnGotP2PIE == _FALSE )
353+ if (blnGotP2PIE == _FALSE)
339354 {
340355 return start;
341356 }
@@ -344,42 +359,54 @@ static char *translate_scan(struct rtw_adapter *padapter,
344359 }
345360
346361 #ifdef CONFIG_WFD
347- if ( SCAN_RESULT_WFD_TYPE == pwdinfo->wfd_info->scan_result_type )
348- {
362+ if (pwdinfo->wfd_info->scan_result_type == SCAN_RESULT_WFD_TYPE) {
349363 u32 blnGotWFD = _FALSE;
350- u8 wfd_ie[ 128 ] = { 0x00 };
364+ u8 wfd_ie[128] = {0x00};
351365 uint wfd_ielen = 0;
352366
353- if ( rtw_get_wfd_ie( &pnetwork->network.IEs[12], pnetwork->network.IELength - 12, wfd_ie, &wfd_ielen ) )
354- {
355- u8 wfd_devinfo[ 6 ] = { 0x00 };
367+ if (rtw_get_wfd_ie(&pnetwork->network.IEs[12],
368+ pnetwork->network.IELength - 12,
369+ wfd_ie, &wfd_ielen)) {
370+ u8 wfd_devinfo[6] = {0x00};
356371 uint wfd_devlen = 6;
357372
358- if ( rtw_get_wfd_attr_content( wfd_ie, wfd_ielen, WFD_ATTR_DEVICE_INFO, wfd_devinfo, &wfd_devlen) )
359- {
360- if ( pwdinfo->wfd_info->wfd_device_type == WFD_DEVINFO_PSINK )
361- {
362- // the first two bits will indicate the WFD device type
363- if ( ( wfd_devinfo[ 1 ] & 0x03 ) == WFD_DEVINFO_SOURCE )
364- {
365- // If this device is Miracast PSink device, the scan reuslt should just provide the Miracast source.
373+ if (rtw_get_wfd_attr_content(wfd_ie, wfd_ielen,
374+ WFD_ATTR_DEVICE_INFO,
375+ wfd_devinfo,
376+ &wfd_devlen)) {
377+ if (pwdinfo->wfd_info->wfd_device_type ==
378+ WFD_DEVINFO_PSINK) {
379+ /* the first two bits will indicate
380+ the WFD device type */
381+ if ((wfd_devinfo[1] & 0x03) ==
382+ WFD_DEVINFO_SOURCE) {
383+ /* If this device is Miracast
384+ * PSink device, the scan
385+ * reuslt should just provide
386+ * the Miracast source. */
366387 blnGotWFD = _TRUE;
367388 }
368389 }
369- else if ( pwdinfo->wfd_info->wfd_device_type == WFD_DEVINFO_SOURCE )
370- {
371- // the first two bits will indicate the WFD device type
372- if ( ( wfd_devinfo[ 1 ] & 0x03 ) == WFD_DEVINFO_PSINK )
373- {
374- // If this device is Miracast source device, the scan reuslt should just provide the Miracast PSink.
375- // Todo: How about the SSink?!
390+ else if (pwdinfo->wfd_info->wfd_device_type ==
391+ WFD_DEVINFO_SOURCE) {
392+ /* the first two bits will indicate
393+ the WFD device type */
394+ if ((wfd_devinfo[1] & 0x03) ==
395+ WFD_DEVINFO_PSINK) {
396+ /*
397+ * If this device is Miracast
398+ * source device, the scan
399+ * reuslt should just provide
400+ * the Miracast PSink.
401+ * Todo: How about the SSink?!
402+ */
376403 blnGotWFD = _TRUE;
377404 }
378405 }
379406 }
380407 }
381408
382- if ( blnGotWFD == _FALSE )
409+ if (blnGotWFD == _FALSE)
383410 {
384411 return start;
385412 }
@@ -398,50 +425,48 @@ static char *translate_scan(struct rtw_adapter *padapter,
398425 /* Add the ESSID */
399426 iwe.cmd = SIOCGIWESSID;
400427 iwe.u.data.flags = 1;
401- iwe.u.data.length = min((u16)pnetwork->network.Ssid.SsidLength, (u16)32);
402- start = iwe_stream_add_point(info, start, stop, &iwe, pnetwork->network.Ssid.Ssid);
428+ iwe.u.data.length = min((u16)pnetwork->network.Ssid.SsidLength,
429+ (u16)32);
430+ start = iwe_stream_add_point(info, start, stop, &iwe,
431+ pnetwork->network.Ssid.Ssid);
403432
404433 //parsing HT_CAP_IE
405- p = rtw_get_ie(&pnetwork->network.IEs[12], _HT_CAPABILITY_IE_, &ht_ielen, pnetwork->network.IELength-12);
434+ p = rtw_get_ie(&pnetwork->network.IEs[12], _HT_CAPABILITY_IE_,
435+ &ht_ielen, pnetwork->network.IELength - 12);
406436
407- if(p && ht_ielen>0)
437+ if (p && ht_ielen>0)
408438 {
409439 struct ieee80211_ht_cap *pht_capie;
410440 ht_cap = _TRUE;
411441 pht_capie = (struct ieee80211_ht_cap *)(p+2);
412442 memcpy(&mcs_rate , &pht_capie->mcs, 2);
413- bw_40MHz = (pht_capie->cap_info & IEEE80211_HT_CAP_SUP_WIDTH_20_40) ? 1:0;
414- short_GI = (pht_capie->cap_info&(IEEE80211_HT_CAP_SGI_20|IEEE80211_HT_CAP_SGI_40)) ? 1:0;
443+ bw_40MHz = (pht_capie->cap_info &
444+ IEEE80211_HT_CAP_SUP_WIDTH_20_40) ? 1:0;
445+ short_GI = (pht_capie->cap_info &
446+ (IEEE80211_HT_CAP_SGI_20|IEEE80211_HT_CAP_SGI_40)) ? 1:0;
415447 }
416448
417449 /* Add the protocol name */
418450 iwe.cmd = SIOCGIWNAME;
419- if ((rtw_is_cckratesonly_included((u8*)&pnetwork->network.SupportedRates)) == _TRUE)
420- {
421- if(ht_cap == _TRUE)
451+ if ((rtw_is_cckratesonly_included((u8*)&pnetwork->network.SupportedRates)) == _TRUE) {
452+ if (ht_cap == _TRUE)
422453 snprintf(iwe.u.name, IFNAMSIZ, "IEEE 802.11bn");
423454 else
424- snprintf(iwe.u.name, IFNAMSIZ, "IEEE 802.11b");
425- }
426- else if ((rtw_is_cckrates_included((u8*)&pnetwork->network.SupportedRates)) == _TRUE)
427- {
455+ snprintf(iwe.u.name, IFNAMSIZ, "IEEE 802.11b");
456+ } else if ((rtw_is_cckrates_included((u8*)&pnetwork->network.SupportedRates)) == _TRUE) {
428457 if(ht_cap == _TRUE)
429458 snprintf(iwe.u.name, IFNAMSIZ, "IEEE 802.11bgn");
430459 else
431- snprintf(iwe.u.name, IFNAMSIZ, "IEEE 802.11bg");
432- }
433- else
434- {
435- if(pnetwork->network.Configuration.DSConfig > 14)
460+ snprintf(iwe.u.name, IFNAMSIZ, "IEEE 802.11bg");
461+ } else {
462+ if (pnetwork->network.Configuration.DSConfig > 14)
436463 {
437464 if(ht_cap == _TRUE)
438465 snprintf(iwe.u.name, IFNAMSIZ, "IEEE 802.11an");
439466 else
440467 snprintf(iwe.u.name, IFNAMSIZ, "IEEE 802.11a");
441- }
442- else
443- {
444- if(ht_cap == _TRUE)
468+ } else {
469+ if (ht_cap == _TRUE)
445470 snprintf(iwe.u.name, IFNAMSIZ, "IEEE 802.11gn");
446471 else
447472 snprintf(iwe.u.name, IFNAMSIZ, "IEEE 802.11g");
@@ -452,26 +477,29 @@ static char *translate_scan(struct rtw_adapter *padapter,
452477
453478 /* Add mode */
454479 iwe.cmd = SIOCGIWMODE;
455- memcpy((u8 *)&cap, rtw_get_capability_from_ie(pnetwork->network.IEs), 2);
480+ memcpy((u8 *)&cap,
481+ rtw_get_capability_from_ie(pnetwork->network.IEs), 2);
456482
457483
458484 cap = le16_to_cpu(cap);
459485
460- if(cap & (WLAN_CAPABILITY_IBSS |WLAN_CAPABILITY_ESS)){
486+ if (cap & (WLAN_CAPABILITY_IBSS |WLAN_CAPABILITY_ESS)) {
461487 if (cap & WLAN_CAPABILITY_ESS)
462488 iwe.u.mode = IW_MODE_MASTER;
463489 else
464490 iwe.u.mode = IW_MODE_ADHOC;
465491
466- start = iwe_stream_add_event(info, start, stop, &iwe, IW_EV_UINT_LEN);
492+ start = iwe_stream_add_event(info, start, stop, &iwe,
493+ IW_EV_UINT_LEN);
467494 }
468495
469- if(pnetwork->network.Configuration.DSConfig<1 /*|| pnetwork->network.Configuration.DSConfig>14*/)
496+ if (pnetwork->network.Configuration.DSConfig<1 /*|| pnetwork->network.Configuration.DSConfig>14*/)
470497 pnetwork->network.Configuration.DSConfig = 1;
471498
472499 /* Add frequency/channel */
473500 iwe.cmd = SIOCGIWFREQ;
474- iwe.u.freq.m = rtw_ch2freq(pnetwork->network.Configuration.DSConfig) * 100000;
501+ iwe.u.freq.m =
502+ rtw_ch2freq(pnetwork->network.Configuration.DSConfig) * 100000;
475503 iwe.u.freq.e = 1;
476504 iwe.u.freq.i = pnetwork->network.Configuration.DSConfig;
477505 start = iwe_stream_add_event(info, start, stop, &iwe, IW_EV_FREQ_LEN);
@@ -483,14 +511,14 @@ static char *translate_scan(struct rtw_adapter *padapter,
483511 else
484512 iwe.u.data.flags = IW_ENCODE_DISABLED;
485513 iwe.u.data.length = 0;
486- start = iwe_stream_add_point(info, start, stop, &iwe, pnetwork->network.Ssid.Ssid);
514+ start = iwe_stream_add_point(info, start, stop, &iwe,
515+ pnetwork->network.Ssid.Ssid);
487516
488517 /*Add basic and extended rates */
489518 max_rate = 0;
490519 p = custom;
491520 p += snprintf(p, MAX_CUSTOM_LEN - (p - custom), " Rates (Mb/s): ");
492- while(pnetwork->network.SupportedRates[i]!=0)
493- {
521+ while (pnetwork->network.SupportedRates[i] != 0) {
494522 rate = pnetwork->network.SupportedRates[i]&0x7F;
495523 if (rate > max_rate)
496524 max_rate = rate;
@@ -499,19 +527,17 @@ static char *translate_scan(struct rtw_adapter *padapter,
499527 i++;
500528 }
501529
502- if(ht_cap == _TRUE)
530+ if (ht_cap == _TRUE)
503531 {
504- if(mcs_rate&0x8000)//MCS15
532+ if (mcs_rate & 0x8000)//MCS15
505533 {
506- max_rate = (bw_40MHz) ? ((short_GI)?300:270):((short_GI)?144:130);
534+ max_rate = (bw_40MHz) ?
535+ ((short_GI) ? 300 : 270) : ((short_GI)?144:130);
507536
508- }
509- else if(mcs_rate&0x0080)//MCS7
537+ } else if (mcs_rate & 0x0080)//MCS7
510538 {
511539 max_rate = (bw_40MHz) ? ((short_GI)?150:135):((short_GI)?72:65);
512- }
513- else//default MCS7
514- {
540+ } else { //default MCS7
515541 //DBG_8723A("wx_get_scan, mcs_rate_bitmap=0x%x\n", mcs_rate);
516542 max_rate = (bw_40MHz) ? ((short_GI)?150:135):((short_GI)?72:65);
517543 }
@@ -535,8 +561,7 @@ static char *translate_scan(struct rtw_adapter *padapter,
535561 RT_TRACE(_module_rtl871x_mlme_c_,_drv_info_,("rtw_wx_get_scan: ssid=%s\n",pnetwork->network.Ssid.Ssid));
536562 RT_TRACE(_module_rtl871x_mlme_c_,_drv_info_,("rtw_wx_get_scan: wpa_len=%d rsn_len=%d\n",wpa_len,rsn_len));
537563
538- if (wpa_len > 0)
539- {
564+ if (wpa_len > 0) {
540565 p=buf;
541566 memset(buf, 0, MAX_WPA_IE_LEN);
542567 p += sprintf(p, "wpa_ie=");
@@ -547,15 +572,16 @@ static char *translate_scan(struct rtw_adapter *padapter,
547572 memset(&iwe, 0, sizeof(iwe));
548573 iwe.cmd = IWEVCUSTOM;
549574 iwe.u.data.length = strlen(buf);
550- start = iwe_stream_add_point(info, start, stop, &iwe,buf);
575+ start = iwe_stream_add_point(info, start, stop,
576+ &iwe,buf);
551577
552578 memset(&iwe, 0, sizeof(iwe));
553579 iwe.cmd =IWEVGENIE;
554580 iwe.u.data.length = wpa_len;
555- start = iwe_stream_add_point(info, start, stop, &iwe, wpa_ie);
581+ start = iwe_stream_add_point(info, start, stop,
582+ &iwe, wpa_ie);
556583 }
557- if (rsn_len > 0)
558- {
584+ if (rsn_len > 0) {
559585 p = buf;
560586 memset(buf, 0, MAX_WPA_IE_LEN);
561587 p += sprintf(p, "rsn_ie=");
@@ -565,16 +591,19 @@ static char *translate_scan(struct rtw_adapter *padapter,
565591 memset(&iwe, 0, sizeof(iwe));
566592 iwe.cmd = IWEVCUSTOM;
567593 iwe.u.data.length = strlen(buf);
568- start = iwe_stream_add_point(info, start, stop, &iwe,buf);
594+ start = iwe_stream_add_point(info, start, stop,
595+ &iwe,buf);
569596
570597 memset(&iwe, 0, sizeof(iwe));
571598 iwe.cmd =IWEVGENIE;
572599 iwe.u.data.length = rsn_len;
573- start = iwe_stream_add_point(info, start, stop, &iwe, rsn_ie);
600+ start = iwe_stream_add_point(info, start, stop,
601+ &iwe, rsn_ie);
574602 }
575603 }
576604
577- { //parsing WPS IE
605+ /* parsing WPS IE */
606+ {
578607 uint cnt = 0,total_ielen;
579608 u8 *wpsie_ptr=NULL;
580609 uint wps_ielen = 0;
@@ -602,13 +631,14 @@ static char *translate_scan(struct rtw_adapter *padapter,
602631 /* Add quality statistics */
603632 iwe.cmd = IWEVQUAL;
604633 iwe.u.qual.updated = IW_QUAL_QUAL_UPDATED | IW_QUAL_LEVEL_UPDATED | IW_QUAL_NOISE_INVALID
605- #ifdef CONFIG_SIGNAL_DISPLAY_DBM
634+#ifdef CONFIG_SIGNAL_DISPLAY_DBM
606635 | IW_QUAL_DBM
607- #endif
636+#endif
608637 ;
609638
610- if ( check_fwstate(pmlmepriv, _FW_LINKED)== _TRUE &&
611- is_same_network(&pmlmepriv->cur_network.network, &pnetwork->network)) {
639+ if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE &&
640+ is_same_network(&pmlmepriv->cur_network.network,
641+ &pnetwork->network)) {
612642 ss = padapter->recvpriv.signal_strength;
613643 sq = padapter->recvpriv.signal_qual;
614644 } else {
@@ -617,14 +647,14 @@ static char *translate_scan(struct rtw_adapter *padapter,
617647 }
618648
619649
620- #ifdef CONFIG_SIGNAL_DISPLAY_DBM
650+#ifdef CONFIG_SIGNAL_DISPLAY_DBM
621651 iwe.u.qual.level = (u8) translate_percentage_to_dbm(ss);//dbm
622- #else
652+#else
623653 iwe.u.qual.level = (u8)ss;//%
624- #ifdef CONFIG_BT_COEXIST
654+#ifdef CONFIG_BT_COEXIST
625655 BT_SignalCompensation(padapter, &iwe.u.qual.level, NULL);
626- #endif // CONFIG_BT_COEXIST
627- #endif
656+#endif // CONFIG_BT_COEXIST
657+#endif
628658
629659 iwe.u.qual.qual = (u8)sq; // signal quality
630660
Show on old repository browser