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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 27 Nov 2017 12:24:48 +0100
From:   Johannes Berg <johannes@...solutions.net>
To:     ishraq.i.ashraf@...il.com, gregkh@...uxfoundation.org
Cc:     himanshujha199640@...il.com, goudapatilk@...il.com,
        insafonov@...il.com, dan.carpenter@...cle.com,
        devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3] staging: rtl8188eu: Fix private WEXT IOCTL calls

In addition to what Dan said,


> +static iw_handler rtw_handlers_private[] = {
> +	NULL,                          /* Empty */
> +	rtw_hostapd_sta_flush_pvt,     /* RTL871X_HOSTAPD_FLUSH */
> +	rtw_add_sta_pvt,               /* RTL871X_HOSTAPD_ADD_STA */
> +	rtw_del_sta_pvt,               /* RTL871X_HOSTAPD_REMOVE_STA */
> +	rtw_ioctl_get_sta_data_pvt,    /* RTL871X_HOSTAPD_GET_INFO_STA */
> +	rtw_get_sta_wpaie_pvt,         /* RTL871X_HOSTAPD_GET_WPAIE_STA */
> +	rtw_set_encryption_pvt,        /* RTL871X_SET_ENCRYPTION */
> +	NULL,                          /* RTL871X_GET_ENCRYPTION */
> +	NULL,                          /* RTL871X_HOSTAPD_SET_FLAGS_STA */
> +	NULL,                          /* RTL871X_HOSTAPD_GET_RID */
> +	NULL,                          /* RTL871X_HOSTAPD_SET_RID */
> +	NULL,                          /* RTL871X_HOSTAPD_SET_ASSOC_AP_ADDR */
> +	NULL,                          /* RTL871X_HOSTAPD_SET_GENERIC_ELEMENT */
> +	NULL,                          /* RTL871X_HOSTAPD_MLME */
> +	NULL,                          /* RTL871X_HOSTAPD_SCAN_REQ */
> +	NULL,                          /* RTL871X_HOSTAPD_STA_CLEAR_STATS */
> +	rtw_set_beacon_pvt,            /* RTL871X_HOSTAPD_SET_BEACON */
> +	rtw_set_wps_beacon_pvt,        /* RTL871X_HOSTAPD_SET_WPS_BEACON */
> +	rtw_set_wps_probe_resp_pvt,    /* RTL871X_HOSTAPD_SET_WPS_PROBE_RESP */
> +	rtw_set_wps_assoc_resp_pvt,    /* RTL871X_HOSTAPD_SET_WPS_ASSOC_RESP */
> +	rtw_set_hidden_ssid_pvt,       /* RTL871X_HOSTAPD_SET_HIDDEN_SSID */
> +	rtw_ioctl_set_macaddr_acl_pvt, /* RTL871X_HOSTAPD_SET_MACADDR_ACL */
> +	rtw_ioctl_acl_add_sta_pvt,     /* RTL871X_HOSTAPD_ACL_ADD_STA */
> +	rtw_ioctl_acl_remove_sta_pvt,  /* RTL871X_HOSTAPD_ACL_REMOVE_STA */
> +};
> 
You should probably use array element initializers:

static ... [] = {
	[RTL871X_HOSTAPD_FLUSH] = rtw_hostapd_sta_flush_pvt,
...
};

johannes

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ