mirror of
https://github.com/nxp-imx/mwifiex.git
synced 2025-01-15 16:25:35 +00:00
mxm_wifiex: fix mlanutl fail on L5.15
When use mlanutl on L5.15, will meet below error logs: root@imx8mqevk:/usr/share/nxp_wireless# ./mlanutl mlan0 hssetpara 2 0xff 0xc8 3 400 mlanutl: Operation not supported mlanutl: hssetpara fail This is due to the net common api change the ndo_do_ioctl behavior, it splits out all the users of SIOCDEVPRIVATE ioctls into a separate ndo_siocdevprivate callback. All the ioctl functions through SIOCDEVPRIVATE in mlanutl.c will fail if not follow this upstream api change. So here change to use new ndo_siocdevprivate instead of ndo_do_ioctl on L5.15. Signed-off-by: Sherry Sun <sherry.sun@nxp.com> Approved-by: Tian Yang <yang.tian@nxp.com>
This commit is contained in:
parent
61d685b925
commit
b400ebe7fe
5 changed files with 35 additions and 0 deletions
|
@ -17178,12 +17178,21 @@ int wlan_get_scan_table_ret_entry(BSSDescriptor_t *pbss_desc, t_u8 **ppbuffer,
|
||||||
*
|
*
|
||||||
* @return 0 --success, otherwise fail
|
* @return 0 --success, otherwise fail
|
||||||
*/
|
*/
|
||||||
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0)
|
||||||
|
int woal_do_ioctl(struct net_device *dev, struct ifreq *req, void __user *data, int cmd)
|
||||||
|
#else
|
||||||
int woal_do_ioctl(struct net_device *dev, struct ifreq *req, int cmd)
|
int woal_do_ioctl(struct net_device *dev, struct ifreq *req, int cmd)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
ENTER();
|
ENTER();
|
||||||
|
|
||||||
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0)
|
||||||
|
if (in_compat_syscall()) /* not implemented yet */
|
||||||
|
return -EOPNOTSUPP;
|
||||||
|
#endif
|
||||||
|
|
||||||
PRINTM(MINFO, "woal_do_ioctl: ioctl cmd = 0x%x\n", cmd);
|
PRINTM(MINFO, "woal_do_ioctl: ioctl cmd = 0x%x\n", cmd);
|
||||||
switch (cmd) {
|
switch (cmd) {
|
||||||
case WOAL_ANDROID_DEF_CMD:
|
case WOAL_ANDROID_DEF_CMD:
|
||||||
|
|
|
@ -364,7 +364,11 @@ typedef struct _ssu_params_cfg {
|
||||||
|
|
||||||
#define PRIV_CMD_LPM "lpm"
|
#define PRIV_CMD_LPM "lpm"
|
||||||
|
|
||||||
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0)
|
||||||
|
int woal_do_ioctl(struct net_device *dev, struct ifreq *req, void __user *data, int cmd);
|
||||||
|
#else
|
||||||
int woal_do_ioctl(struct net_device *dev, struct ifreq *req, int cmd);
|
int woal_do_ioctl(struct net_device *dev, struct ifreq *req, int cmd);
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* For android private commands, fixed value of ioctl is used.
|
* For android private commands, fixed value of ioctl is used.
|
||||||
|
|
|
@ -3751,7 +3751,11 @@ const struct net_device_ops woal_netdev_ops = {
|
||||||
.ndo_open = woal_open,
|
.ndo_open = woal_open,
|
||||||
.ndo_start_xmit = woal_hard_start_xmit,
|
.ndo_start_xmit = woal_hard_start_xmit,
|
||||||
.ndo_stop = woal_close,
|
.ndo_stop = woal_close,
|
||||||
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0)
|
||||||
|
.ndo_siocdevprivate = woal_do_ioctl,
|
||||||
|
#else
|
||||||
.ndo_do_ioctl = woal_do_ioctl,
|
.ndo_do_ioctl = woal_do_ioctl,
|
||||||
|
#endif
|
||||||
.ndo_set_mac_address = woal_set_mac_address,
|
.ndo_set_mac_address = woal_set_mac_address,
|
||||||
.ndo_tx_timeout = woal_tx_timeout,
|
.ndo_tx_timeout = woal_tx_timeout,
|
||||||
.ndo_get_stats = woal_get_stats,
|
.ndo_get_stats = woal_get_stats,
|
||||||
|
@ -3826,7 +3830,11 @@ const struct net_device_ops woal_uap_netdev_ops = {
|
||||||
.ndo_open = woal_open,
|
.ndo_open = woal_open,
|
||||||
.ndo_start_xmit = woal_hard_start_xmit,
|
.ndo_start_xmit = woal_hard_start_xmit,
|
||||||
.ndo_stop = woal_close,
|
.ndo_stop = woal_close,
|
||||||
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0)
|
||||||
|
.ndo_siocdevprivate = woal_uap_do_ioctl,
|
||||||
|
#else
|
||||||
.ndo_do_ioctl = woal_uap_do_ioctl,
|
.ndo_do_ioctl = woal_uap_do_ioctl,
|
||||||
|
#endif
|
||||||
.ndo_set_mac_address = woal_set_mac_address,
|
.ndo_set_mac_address = woal_set_mac_address,
|
||||||
.ndo_tx_timeout = woal_tx_timeout,
|
.ndo_tx_timeout = woal_tx_timeout,
|
||||||
.ndo_get_stats = woal_get_stats,
|
.ndo_get_stats = woal_get_stats,
|
||||||
|
|
|
@ -4223,10 +4223,20 @@ void woal_uap_set_multicast_list(struct net_device *dev)
|
||||||
*
|
*
|
||||||
* @return 0 --success, otherwise fail
|
* @return 0 --success, otherwise fail
|
||||||
*/
|
*/
|
||||||
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0)
|
||||||
|
int woal_uap_do_ioctl(struct net_device *dev, struct ifreq *req, void __user *data, int cmd)
|
||||||
|
#else
|
||||||
int woal_uap_do_ioctl(struct net_device *dev, struct ifreq *req, int cmd)
|
int woal_uap_do_ioctl(struct net_device *dev, struct ifreq *req, int cmd)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
ENTER();
|
ENTER();
|
||||||
|
|
||||||
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0)
|
||||||
|
if (in_compat_syscall()) /* not implemented yet */
|
||||||
|
return -EOPNOTSUPP;
|
||||||
|
#endif
|
||||||
|
|
||||||
switch (cmd) {
|
switch (cmd) {
|
||||||
case WOAL_ANDROID_DEF_CMD:
|
case WOAL_ANDROID_DEF_CMD:
|
||||||
/** android default ioctl ID is SIOCDEVPRIVATE + 1 */
|
/** android default ioctl ID is SIOCDEVPRIVATE + 1 */
|
||||||
|
|
|
@ -531,7 +531,11 @@ typedef struct _domain_info_param {
|
||||||
int woal_set_get_uap_power_mode(moal_private *priv, t_u32 action,
|
int woal_set_get_uap_power_mode(moal_private *priv, t_u32 action,
|
||||||
mlan_ds_ps_mgmt *ps_mgmt);
|
mlan_ds_ps_mgmt *ps_mgmt);
|
||||||
void woal_uap_set_multicast_list(struct net_device *dev);
|
void woal_uap_set_multicast_list(struct net_device *dev);
|
||||||
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0)
|
||||||
|
int woal_uap_do_ioctl(struct net_device *dev, struct ifreq *req, void __user *data, int cmd);
|
||||||
|
#else
|
||||||
int woal_uap_do_ioctl(struct net_device *dev, struct ifreq *req, int cmd);
|
int woal_uap_do_ioctl(struct net_device *dev, struct ifreq *req, int cmd);
|
||||||
|
#endif
|
||||||
int woal_uap_bss_ctrl(moal_private *priv, t_u8 wait_option, int data);
|
int woal_uap_bss_ctrl(moal_private *priv, t_u8 wait_option, int data);
|
||||||
#ifdef UAP_CFG80211
|
#ifdef UAP_CFG80211
|
||||||
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 12, 0)
|
#if CFG80211_VERSION_CODE >= KERNEL_VERSION(3, 12, 0)
|
||||||
|
|
Loading…
Reference in a new issue