lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202305221334.lLu9dinQ-lkp@intel.com>
Date:   Mon, 22 May 2023 13:38:44 +0800
From:   kernel test robot <lkp@...el.com>
To:     Paul Cercueil <paul@...pouillou.net>
Cc:     llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
        linux-kernel@...r.kernel.org,
        Thomas Bogendoerfer <tsbogend@...ha.franken.de>
Subject: drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c:218:70: warning:
 division by zero is undefined

Hi Paul,

FYI, the error/warning was bisected to this commit, please ignore it if it's irrelevant.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   44c026a73be8038f03dbdeef028b642880cf1511
commit: c434b9f80b0923e6460031b0fd964f8b0bf3c6a6 MIPS: Kconfig: add MIPS_GENERIC_KERNEL symbol
date:   2 years, 8 months ago
config: mips-randconfig-r015-20230521
compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project b0fb98227c90adf2536c9ad644a74d5e92961111)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install mips cross compiling tool for clang build
        # apt-get install binutils-mips-linux-gnu
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c434b9f80b0923e6460031b0fd964f8b0bf3c6a6
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout c434b9f80b0923e6460031b0fd964f8b0bf3c6a6
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=mips olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash arch/mips/kernel/ drivers/staging/rtl8192u/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202305221334.lLu9dinQ-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c:218:70: warning: division by zero is undefined [-Wdivision-by-zero]
                         " Last beacon: %lums ago", (jiffies - network->last_scanned) / (HZ / 100));
                                                                                      ^ ~~~~~~~~~~
   drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c:259:39: warning: division by zero is undefined [-Wdivision-by-zero]
                                   (jiffies - network->last_scanned) / (HZ / 100));
                                                                     ^ ~~~~~~~~~~
   drivers/staging/rtl8192u/ieee80211/ieee80211.h:529:82: note: expanded from macro 'IEEE80211_DEBUG_SCAN'
   #define IEEE80211_DEBUG_SCAN(f, a...)   IEEE80211_DEBUG(IEEE80211_DL_SCAN, f, ## a)
                                                                                    ^
   drivers/staging/rtl8192u/ieee80211/ieee80211.h:452:43: note: expanded from macro 'IEEE80211_DEBUG'
     printk(KERN_DEBUG "ieee80211: " fmt, ## args); } while (0)
                                             ^~~~
   2 warnings generated.


vim +218 drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c

8fc8598e61f6f3 Jerry Chuang      2009-11-03   37  
8fc8598e61f6f3 Jerry Chuang      2009-11-03   38  #define MAX_CUSTOM_LEN 64
8fc8598e61f6f3 Jerry Chuang      2009-11-03   39  static inline char *rtl819x_translate_scan(struct ieee80211_device *ieee,
8fc8598e61f6f3 Jerry Chuang      2009-11-03   40  					   char *start, char *stop,
8fc8598e61f6f3 Jerry Chuang      2009-11-03   41  					   struct ieee80211_network *network,
8fc8598e61f6f3 Jerry Chuang      2009-11-03   42  					   struct iw_request_info *info)
8fc8598e61f6f3 Jerry Chuang      2009-11-03   43  {
8fc8598e61f6f3 Jerry Chuang      2009-11-03   44  	char custom[MAX_CUSTOM_LEN];
8fc8598e61f6f3 Jerry Chuang      2009-11-03   45  	char proto_name[IFNAMSIZ];
8fc8598e61f6f3 Jerry Chuang      2009-11-03   46  	char *pname = proto_name;
8fc8598e61f6f3 Jerry Chuang      2009-11-03   47  	char *p;
8fc8598e61f6f3 Jerry Chuang      2009-11-03   48  	struct iw_event iwe;
8fc8598e61f6f3 Jerry Chuang      2009-11-03   49  	int i, j;
8fc8598e61f6f3 Jerry Chuang      2009-11-03   50  	u16 max_rate, rate;
8fc8598e61f6f3 Jerry Chuang      2009-11-03   51  	static u8	EWC11NHTCap[] = {0x00, 0x90, 0x4c, 0x33};
8fc8598e61f6f3 Jerry Chuang      2009-11-03   52  
8fc8598e61f6f3 Jerry Chuang      2009-11-03   53  	/* First entry *MUST* be the AP MAC address */
8fc8598e61f6f3 Jerry Chuang      2009-11-03   54  	iwe.cmd = SIOCGIWAP;
8fc8598e61f6f3 Jerry Chuang      2009-11-03   55  	iwe.u.ap_addr.sa_family = ARPHRD_ETHER;
8fc8598e61f6f3 Jerry Chuang      2009-11-03   56  	memcpy(iwe.u.ap_addr.sa_data, network->bssid, ETH_ALEN);
8fc8598e61f6f3 Jerry Chuang      2009-11-03   57  	start = iwe_stream_add_event_rsl(info, start, stop, &iwe, IW_EV_ADDR_LEN);
8fc8598e61f6f3 Jerry Chuang      2009-11-03   58  	/* Remaining entries will be displayed in the order we provide them */
8fc8598e61f6f3 Jerry Chuang      2009-11-03   59  
8fc8598e61f6f3 Jerry Chuang      2009-11-03   60  	/* Add the ESSID */
8fc8598e61f6f3 Jerry Chuang      2009-11-03   61  	iwe.cmd = SIOCGIWESSID;
8fc8598e61f6f3 Jerry Chuang      2009-11-03   62  	iwe.u.data.flags = 1;
8fc8598e61f6f3 Jerry Chuang      2009-11-03   63  //	if (network->flags & NETWORK_EMPTY_ESSID) {
8fc8598e61f6f3 Jerry Chuang      2009-11-03   64  	if (network->ssid_len == 0) {
8fc8598e61f6f3 Jerry Chuang      2009-11-03   65  		iwe.u.data.length = sizeof("<hidden>");
8fc8598e61f6f3 Jerry Chuang      2009-11-03   66  		start = iwe_stream_add_point(info, start, stop, &iwe, "<hidden>");
8fc8598e61f6f3 Jerry Chuang      2009-11-03   67  	} else {
8fc8598e61f6f3 Jerry Chuang      2009-11-03   68  		iwe.u.data.length = min(network->ssid_len, (u8)32);
8fc8598e61f6f3 Jerry Chuang      2009-11-03   69  		start = iwe_stream_add_point(info, start, stop, &iwe, network->ssid);
8fc8598e61f6f3 Jerry Chuang      2009-11-03   70  	}
8fc8598e61f6f3 Jerry Chuang      2009-11-03   71  	/* Add the protocol name */
8fc8598e61f6f3 Jerry Chuang      2009-11-03   72  	iwe.cmd = SIOCGIWNAME;
f079bc30211ba5 Kulikov Vasiliy   2010-06-28   73  	for (i = 0; i < ARRAY_SIZE(ieee80211_modes); i++) {
8dd43050412508 Vatsala Narang    2019-04-26   74  		if (network->mode & BIT(i)) {
8fc8598e61f6f3 Jerry Chuang      2009-11-03   75  			sprintf(pname, ieee80211_modes[i].mode_string, ieee80211_modes[i].mode_size);
8fc8598e61f6f3 Jerry Chuang      2009-11-03   76  			pname += ieee80211_modes[i].mode_size;
8fc8598e61f6f3 Jerry Chuang      2009-11-03   77  		}
8fc8598e61f6f3 Jerry Chuang      2009-11-03   78  	}
8fc8598e61f6f3 Jerry Chuang      2009-11-03   79  	*pname = '\0';
8fc8598e61f6f3 Jerry Chuang      2009-11-03   80  	snprintf(iwe.u.name, IFNAMSIZ, "IEEE802.11%s", proto_name);
8fc8598e61f6f3 Jerry Chuang      2009-11-03   81  	start = iwe_stream_add_event_rsl(info, start, stop, &iwe, IW_EV_CHAR_LEN);
8fc8598e61f6f3 Jerry Chuang      2009-11-03   82  	/* Add mode */
8fc8598e61f6f3 Jerry Chuang      2009-11-03   83  	iwe.cmd = SIOCGIWMODE;
8fc8598e61f6f3 Jerry Chuang      2009-11-03   84  	if (network->capability &
8fc8598e61f6f3 Jerry Chuang      2009-11-03   85  	    (WLAN_CAPABILITY_BSS | WLAN_CAPABILITY_IBSS)) {
8fc8598e61f6f3 Jerry Chuang      2009-11-03   86  		if (network->capability & WLAN_CAPABILITY_BSS)
8fc8598e61f6f3 Jerry Chuang      2009-11-03   87  			iwe.u.mode = IW_MODE_MASTER;
8fc8598e61f6f3 Jerry Chuang      2009-11-03   88  		else
8fc8598e61f6f3 Jerry Chuang      2009-11-03   89  			iwe.u.mode = IW_MODE_ADHOC;
8fc8598e61f6f3 Jerry Chuang      2009-11-03   90  		start = iwe_stream_add_event_rsl(info, start, stop, &iwe, IW_EV_UINT_LEN);
8fc8598e61f6f3 Jerry Chuang      2009-11-03   91  	}
8fc8598e61f6f3 Jerry Chuang      2009-11-03   92  
8fc8598e61f6f3 Jerry Chuang      2009-11-03   93  	/* Add frequency/channel */
8fc8598e61f6f3 Jerry Chuang      2009-11-03   94  	iwe.cmd = SIOCGIWFREQ;
8fc8598e61f6f3 Jerry Chuang      2009-11-03   95  /*	iwe.u.freq.m = ieee80211_frequency(network->channel, network->mode);
8fc8598e61f6f3 Jerry Chuang      2009-11-03   96  	iwe.u.freq.e = 3; */
8fc8598e61f6f3 Jerry Chuang      2009-11-03   97  	iwe.u.freq.m = network->channel;
8fc8598e61f6f3 Jerry Chuang      2009-11-03   98  	iwe.u.freq.e = 0;
8fc8598e61f6f3 Jerry Chuang      2009-11-03   99  	iwe.u.freq.i = 0;
8fc8598e61f6f3 Jerry Chuang      2009-11-03  100  	start = iwe_stream_add_event_rsl(info, start, stop, &iwe, IW_EV_FREQ_LEN);
8fc8598e61f6f3 Jerry Chuang      2009-11-03  101  	/* Add encryption capability */
8fc8598e61f6f3 Jerry Chuang      2009-11-03  102  	iwe.cmd = SIOCGIWENCODE;
8fc8598e61f6f3 Jerry Chuang      2009-11-03  103  	if (network->capability & WLAN_CAPABILITY_PRIVACY)
8fc8598e61f6f3 Jerry Chuang      2009-11-03  104  		iwe.u.data.flags = IW_ENCODE_ENABLED | IW_ENCODE_NOKEY;
8fc8598e61f6f3 Jerry Chuang      2009-11-03  105  	else
8fc8598e61f6f3 Jerry Chuang      2009-11-03  106  		iwe.u.data.flags = IW_ENCODE_DISABLED;
8fc8598e61f6f3 Jerry Chuang      2009-11-03  107  	iwe.u.data.length = 0;
8fc8598e61f6f3 Jerry Chuang      2009-11-03  108  	start = iwe_stream_add_point(info, start, stop, &iwe, network->ssid);
8fc8598e61f6f3 Jerry Chuang      2009-11-03  109  	/* Add basic and extended rates */
8fc8598e61f6f3 Jerry Chuang      2009-11-03  110  	max_rate = 0;
8fc8598e61f6f3 Jerry Chuang      2009-11-03  111  	p = custom;
88b3673ec0d640 Rohit Sarkar      2019-09-10  112  	p += scnprintf(p, MAX_CUSTOM_LEN - (p - custom), " Rates (Mb/s): ");
8fc8598e61f6f3 Jerry Chuang      2009-11-03  113  	for (i = 0, j = 0; i < network->rates_len; ) {
8fc8598e61f6f3 Jerry Chuang      2009-11-03  114  		if (j < network->rates_ex_len &&
8fc8598e61f6f3 Jerry Chuang      2009-11-03  115  		    ((network->rates_ex[j] & 0x7F) <
8fc8598e61f6f3 Jerry Chuang      2009-11-03  116  		     (network->rates[i] & 0x7F)))
8fc8598e61f6f3 Jerry Chuang      2009-11-03  117  			rate = network->rates_ex[j++] & 0x7F;
8fc8598e61f6f3 Jerry Chuang      2009-11-03  118  		else
8fc8598e61f6f3 Jerry Chuang      2009-11-03  119  			rate = network->rates[i++] & 0x7F;
8fc8598e61f6f3 Jerry Chuang      2009-11-03  120  		if (rate > max_rate)
8fc8598e61f6f3 Jerry Chuang      2009-11-03  121  			max_rate = rate;
88b3673ec0d640 Rohit Sarkar      2019-09-10  122  		p += scnprintf(p, MAX_CUSTOM_LEN - (p - custom),
8fc8598e61f6f3 Jerry Chuang      2009-11-03  123  			      "%d%s ", rate >> 1, (rate & 1) ? ".5" : "");
8fc8598e61f6f3 Jerry Chuang      2009-11-03  124  	}
8fc8598e61f6f3 Jerry Chuang      2009-11-03  125  	for (; j < network->rates_ex_len; j++) {
8fc8598e61f6f3 Jerry Chuang      2009-11-03  126  		rate = network->rates_ex[j] & 0x7F;
88b3673ec0d640 Rohit Sarkar      2019-09-10  127  		p += scnprintf(p, MAX_CUSTOM_LEN - (p - custom),
8fc8598e61f6f3 Jerry Chuang      2009-11-03  128  			      "%d%s ", rate >> 1, (rate & 1) ? ".5" : "");
8fc8598e61f6f3 Jerry Chuang      2009-11-03  129  		if (rate > max_rate)
8fc8598e61f6f3 Jerry Chuang      2009-11-03  130  			max_rate = rate;
8fc8598e61f6f3 Jerry Chuang      2009-11-03  131  	}
8fc8598e61f6f3 Jerry Chuang      2009-11-03  132  
ee16d7d3e0128b Stephen Brennan   2019-08-21  133  	if (network->mode >= IEEE_N_24G) /* add N rate here */ {
2c6d0ee300c84a John Whitmore     2018-08-17  134  		struct ht_capability_ele *ht_cap = NULL;
8fc8598e61f6f3 Jerry Chuang      2009-11-03  135  		bool is40M = false, isShortGI = false;
8fc8598e61f6f3 Jerry Chuang      2009-11-03  136  		u8 max_mcs = 0;
8fc8598e61f6f3 Jerry Chuang      2009-11-03  137  		if (!memcmp(network->bssht.bdHTCapBuf, EWC11NHTCap, 4))
2c6d0ee300c84a John Whitmore     2018-08-17  138  			ht_cap = (struct ht_capability_ele *)&network->bssht.bdHTCapBuf[4];
8fc8598e61f6f3 Jerry Chuang      2009-11-03  139  		else
2c6d0ee300c84a John Whitmore     2018-08-17  140  			ht_cap = (struct ht_capability_ele *)&network->bssht.bdHTCapBuf[0];
8fc8598e61f6f3 Jerry Chuang      2009-11-03  141  		is40M = (ht_cap->ChlWidth) ? 1 : 0;
8fc8598e61f6f3 Jerry Chuang      2009-11-03  142  		isShortGI = (ht_cap->ChlWidth) ?
8fc8598e61f6f3 Jerry Chuang      2009-11-03  143  					((ht_cap->ShortGI40Mhz) ? 1 : 0) :
8fc8598e61f6f3 Jerry Chuang      2009-11-03  144  					((ht_cap->ShortGI20Mhz) ? 1 : 0);
8fc8598e61f6f3 Jerry Chuang      2009-11-03  145  
8fc8598e61f6f3 Jerry Chuang      2009-11-03  146  		max_mcs = HTGetHighestMCSRate(ieee, ht_cap->MCS, MCS_FILTER_ALL);
8fc8598e61f6f3 Jerry Chuang      2009-11-03  147  		rate = MCS_DATA_RATE[is40M][isShortGI][max_mcs & 0x7f];
8fc8598e61f6f3 Jerry Chuang      2009-11-03  148  		if (rate > max_rate)
8fc8598e61f6f3 Jerry Chuang      2009-11-03  149  			max_rate = rate;
8fc8598e61f6f3 Jerry Chuang      2009-11-03  150  	}
8fc8598e61f6f3 Jerry Chuang      2009-11-03  151  	iwe.cmd = SIOCGIWRATE;
8fc8598e61f6f3 Jerry Chuang      2009-11-03  152  	iwe.u.bitrate.fixed = iwe.u.bitrate.disabled = 0;
8fc8598e61f6f3 Jerry Chuang      2009-11-03  153  	iwe.u.bitrate.value = max_rate * 500000;
8fc8598e61f6f3 Jerry Chuang      2009-11-03  154  	start = iwe_stream_add_event_rsl(info, start, stop, &iwe,
8fc8598e61f6f3 Jerry Chuang      2009-11-03  155  				     IW_EV_PARAM_LEN);
8fc8598e61f6f3 Jerry Chuang      2009-11-03  156  	iwe.cmd = IWEVCUSTOM;
8fc8598e61f6f3 Jerry Chuang      2009-11-03  157  	iwe.u.data.length = p - custom;
8fc8598e61f6f3 Jerry Chuang      2009-11-03  158  	if (iwe.u.data.length)
8fc8598e61f6f3 Jerry Chuang      2009-11-03  159  		start = iwe_stream_add_point(info, start, stop, &iwe, custom);
8fc8598e61f6f3 Jerry Chuang      2009-11-03  160  	/* Add quality statistics */
8fc8598e61f6f3 Jerry Chuang      2009-11-03  161  	/* TODO: Fix these values... */
8fc8598e61f6f3 Jerry Chuang      2009-11-03  162  	iwe.cmd = IWEVQUAL;
8fc8598e61f6f3 Jerry Chuang      2009-11-03  163  	iwe.u.qual.qual = network->stats.signal;
8fc8598e61f6f3 Jerry Chuang      2009-11-03  164  	iwe.u.qual.level = network->stats.rssi;
8fc8598e61f6f3 Jerry Chuang      2009-11-03  165  	iwe.u.qual.noise = network->stats.noise;
8fc8598e61f6f3 Jerry Chuang      2009-11-03  166  	iwe.u.qual.updated = network->stats.mask & IEEE80211_STATMASK_WEMASK;
8fc8598e61f6f3 Jerry Chuang      2009-11-03  167  	if (!(network->stats.mask & IEEE80211_STATMASK_RSSI))
8fc8598e61f6f3 Jerry Chuang      2009-11-03  168  		iwe.u.qual.updated |= IW_QUAL_LEVEL_INVALID;
8fc8598e61f6f3 Jerry Chuang      2009-11-03  169  	if (!(network->stats.mask & IEEE80211_STATMASK_NOISE))
8fc8598e61f6f3 Jerry Chuang      2009-11-03  170  		iwe.u.qual.updated |= IW_QUAL_NOISE_INVALID;
8fc8598e61f6f3 Jerry Chuang      2009-11-03  171  	if (!(network->stats.mask & IEEE80211_STATMASK_SIGNAL))
8fc8598e61f6f3 Jerry Chuang      2009-11-03  172  		iwe.u.qual.updated |= IW_QUAL_QUAL_INVALID;
8fc8598e61f6f3 Jerry Chuang      2009-11-03  173  	iwe.u.qual.updated = 7;
8fc8598e61f6f3 Jerry Chuang      2009-11-03  174  	start = iwe_stream_add_event_rsl(info, start, stop, &iwe, IW_EV_QUAL_LEN);
8fc8598e61f6f3 Jerry Chuang      2009-11-03  175  	iwe.cmd = IWEVCUSTOM;
8fc8598e61f6f3 Jerry Chuang      2009-11-03  176  	p = custom;
8fc8598e61f6f3 Jerry Chuang      2009-11-03  177  
8fc8598e61f6f3 Jerry Chuang      2009-11-03  178  	iwe.u.data.length = p - custom;
8fc8598e61f6f3 Jerry Chuang      2009-11-03  179  	if (iwe.u.data.length)
8fc8598e61f6f3 Jerry Chuang      2009-11-03  180  		start = iwe_stream_add_point(info, start, stop, &iwe, custom);
e6c1ef6ce9dada Joel Pelaez Jorge 2014-05-23  181  
8fc8598e61f6f3 Jerry Chuang      2009-11-03  182  	if (ieee->wpa_enabled && network->wpa_ie_len) {
8fc8598e61f6f3 Jerry Chuang      2009-11-03  183  		char buf[MAX_WPA_IE_LEN * 2 + 30];
8fc8598e61f6f3 Jerry Chuang      2009-11-03  184  	//	printk("WPA IE\n");
8fc8598e61f6f3 Jerry Chuang      2009-11-03  185  		u8 *p = buf;
8fc8598e61f6f3 Jerry Chuang      2009-11-03  186  		p += sprintf(p, "wpa_ie=");
8fc8598e61f6f3 Jerry Chuang      2009-11-03  187  		for (i = 0; i < network->wpa_ie_len; i++) {
8fc8598e61f6f3 Jerry Chuang      2009-11-03  188  			p += sprintf(p, "%02x", network->wpa_ie[i]);
8fc8598e61f6f3 Jerry Chuang      2009-11-03  189  		}
8fc8598e61f6f3 Jerry Chuang      2009-11-03  190  
8fc8598e61f6f3 Jerry Chuang      2009-11-03  191  		memset(&iwe, 0, sizeof(iwe));
8fc8598e61f6f3 Jerry Chuang      2009-11-03  192  		iwe.cmd = IWEVCUSTOM;
8fc8598e61f6f3 Jerry Chuang      2009-11-03  193  		iwe.u.data.length = strlen(buf);
8fc8598e61f6f3 Jerry Chuang      2009-11-03  194  		start = iwe_stream_add_point(info, start, stop, &iwe, buf);
8fc8598e61f6f3 Jerry Chuang      2009-11-03  195  	}
8fc8598e61f6f3 Jerry Chuang      2009-11-03  196  
8fc8598e61f6f3 Jerry Chuang      2009-11-03  197  	if (ieee->wpa_enabled && network->rsn_ie_len) {
8fc8598e61f6f3 Jerry Chuang      2009-11-03  198  		char buf[MAX_WPA_IE_LEN * 2 + 30];
8fc8598e61f6f3 Jerry Chuang      2009-11-03  199  
8fc8598e61f6f3 Jerry Chuang      2009-11-03  200  		u8 *p = buf;
8fc8598e61f6f3 Jerry Chuang      2009-11-03  201  		p += sprintf(p, "rsn_ie=");
8fc8598e61f6f3 Jerry Chuang      2009-11-03  202  		for (i = 0; i < network->rsn_ie_len; i++) {
8fc8598e61f6f3 Jerry Chuang      2009-11-03  203  			p += sprintf(p, "%02x", network->rsn_ie[i]);
8fc8598e61f6f3 Jerry Chuang      2009-11-03  204  		}
8fc8598e61f6f3 Jerry Chuang      2009-11-03  205  
8fc8598e61f6f3 Jerry Chuang      2009-11-03  206  		memset(&iwe, 0, sizeof(iwe));
8fc8598e61f6f3 Jerry Chuang      2009-11-03  207  		iwe.cmd = IWEVCUSTOM;
8fc8598e61f6f3 Jerry Chuang      2009-11-03  208  		iwe.u.data.length = strlen(buf);
8fc8598e61f6f3 Jerry Chuang      2009-11-03  209  		start = iwe_stream_add_point(info, start, stop, &iwe, buf);
8fc8598e61f6f3 Jerry Chuang      2009-11-03  210  	}
8fc8598e61f6f3 Jerry Chuang      2009-11-03  211  
8fc8598e61f6f3 Jerry Chuang      2009-11-03  212  
8fc8598e61f6f3 Jerry Chuang      2009-11-03  213  	/* Add EXTRA: Age to display seconds since last beacon/probe response
8fc8598e61f6f3 Jerry Chuang      2009-11-03  214  	 * for given network. */
8fc8598e61f6f3 Jerry Chuang      2009-11-03  215  	iwe.cmd = IWEVCUSTOM;
8fc8598e61f6f3 Jerry Chuang      2009-11-03  216  	p = custom;
88b3673ec0d640 Rohit Sarkar      2019-09-10  217  	p += scnprintf(p, MAX_CUSTOM_LEN - (p - custom),
8fc8598e61f6f3 Jerry Chuang      2009-11-03 @218  		      " Last beacon: %lums ago", (jiffies - network->last_scanned) / (HZ / 100));
8fc8598e61f6f3 Jerry Chuang      2009-11-03  219  	iwe.u.data.length = p - custom;
8fc8598e61f6f3 Jerry Chuang      2009-11-03  220  	if (iwe.u.data.length)
8fc8598e61f6f3 Jerry Chuang      2009-11-03  221  		start = iwe_stream_add_point(info, start, stop, &iwe, custom);
8fc8598e61f6f3 Jerry Chuang      2009-11-03  222  
8fc8598e61f6f3 Jerry Chuang      2009-11-03  223  	return start;
8fc8598e61f6f3 Jerry Chuang      2009-11-03  224  }
8fc8598e61f6f3 Jerry Chuang      2009-11-03  225  

:::::: The code at line 218 was first introduced by commit
:::::: 8fc8598e61f6f384f3eaf1d9b09500c12af47b37 Staging: Added Realtek rtl8192u driver to staging

:::::: TO: Jerry Chuang <jerry-chuang@...ltek.com>
:::::: CC: Greg Kroah-Hartman <gregkh@...e.de>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

View attachment "config" of type "text/plain" (174556 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ