Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 711a1bcc authored by Vipin Mehta's avatar Vipin Mehta Committed by Greg Kroah-Hartman
Browse files

staging: ath6kl: Add configuration for excessive TX retry threshold



Adding host side interface to configure the excessive TX retry threshold.
It is used by the target to determine disconnection triggers. Additionally,
some definitions have been added to header file wmi.h to bridge the gap
for the newly added command.

Signed-off-by: default avatarVipin Mehta <vmehta@atheros.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 1581595d
Loading
Loading
Loading
Loading
+25 −11
Original line number Diff line number Diff line
@@ -433,6 +433,13 @@ typedef enum {
    WMI_SET_BTCOEX_BT_OPERATING_STATUS_CMDID,
    WMI_GET_BTCOEX_STATS_CMDID,
    WMI_GET_BTCOEX_CONFIG_CMDID,
    WMI_GET_PMK_CMDID,
    WMI_SET_PASSPHRASE_CMDID,
    WMI_ENABLE_WAC_CMDID,
    WMI_WAC_SCAN_REPLY_CMDID,
    WMI_WAC_CTRL_REQ_CMDID,
    WMI_SET_DIV_PARAMS_CMDID,
    WMI_SET_EXCESS_TX_RETRY_THRES_CMDID,
} WMI_COMMAND_ID;

/*
@@ -549,6 +556,13 @@ typedef PREPACK struct {
    u8 pmk[WMI_PMK_LEN];
} POSTPACK WMI_SET_PMK_CMD;

/*
 * WMI_SET_EXCESS_TX_RETRY_THRES_CMDID
 */
typedef PREPACK struct {
    A_UINT32 threshold;
} POSTPACK WMI_SET_EXCESS_TX_RETRY_THRES_CMD;

/*
 * WMI_ADD_CIPHER_KEY_CMDID
 */
+3 −0
Original line number Diff line number Diff line
@@ -421,6 +421,9 @@ wmi_set_wlan_conn_precedence_cmd(struct wmi_t *wmip, BT_WLAN_CONN_PRECEDENCE pre
int
wmi_set_pmk_cmd(struct wmi_t *wmip, u8 *pmk);

int
wmi_set_excess_tx_retry_thres_cmd(struct wmi_t *wmip, WMI_SET_EXCESS_TX_RETRY_THRES_CMD *cmd);

u16 wmi_ieee2freq (int chan);

u32 wmi_freq2ieee (u16 freq);
+1 −0
Original line number Diff line number Diff line
@@ -997,6 +997,7 @@ typedef enum {

#define AR6000_XIOCTL_WMI_SET_TX_SGI_PARAM              154

#define AR6000_XIOCTL_WMI_SET_EXCESS_TX_RETRY_THRES     161

/* used by AR6000_IOCTL_WMI_GETREV */
struct ar6000_version {
+7 −0
Original line number Diff line number Diff line
@@ -288,6 +288,13 @@ u8 xioctl_filter[] = {
(0xFF),                                         /* AR6000_XIOCTL_ADD_AP_INTERFACE                  152  */
(0xFF),                                         /* AR6000_XIOCTL_REMOVE_AP_INTERFACE               153  */
(0xFF),                                         /* AR6000_XIOCTL_WMI_SET_TX_SGI_PARAM              154  */
(INFRA_NETWORK | ADHOC_NETWORK),                /* AR6000_XIOCTL_WMI_SET_WPA_OFFLOAD_STATE         155  */
(INFRA_NETWORK | ADHOC_NETWORK),                /* AR6000_XIOCTL_WMI_SET_PASSPHRASE                156  */
(0xFF),
(0xFF),
(0xFF),
(0xFF),
(INFRA_NETWORK | ADHOC_NETWORK),                /* AR6000_XIOCTL_WMI_SET_EXCESS_TX_RETRY_THRES     161  */
};

#endif /*_WMI_FILTER_LINUX_H_*/
+28 −0
Original line number Diff line number Diff line
@@ -1329,6 +1329,28 @@ ar6000_xioctl_get_btcoex_stats_cmd(struct net_device * dev, char *userdata, stru
	return(ret);
}

static int
ar6000_xioctl_set_excess_tx_retry_thres_cmd(struct net_device * dev, char * userdata)
{
    AR_SOFTC_T     *ar     = (AR_SOFTC_T *)ar6k_priv(dev);
    WMI_SET_EXCESS_TX_RETRY_THRES_CMD cmd;
    int ret = 0;

    if (ar->arWmiReady == false) {
        return -EIO;
    }

    if (copy_from_user(&cmd, userdata, sizeof(cmd))) {
        return -EFAULT;
    }

    if (wmi_set_excess_tx_retry_thres_cmd(ar->arWmi, &cmd) != 0)
    {
        ret = -EINVAL;
    }
    return(ret);
}

#ifdef CONFIG_HOST_GPIO_SUPPORT
struct ar6000_gpio_intr_wait_cmd_s  gpio_intr_results;
/* gpio_reg_results and gpio_data_available are protected by arSem */
@@ -4660,6 +4682,12 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
#endif
            break;

        case AR6000_XIOCTL_WMI_SET_EXCESS_TX_RETRY_THRES:
        {
            ret = ar6000_xioctl_set_excess_tx_retry_thres_cmd(dev, userdata);
            break;
        }

        default:
            ret = -EOPNOTSUPP;
    }
Loading