BigW Consortium Gitlab

Commit f297cd05 by David Clark

Updates after getting ifup/ifdown working

parent d30c8150
......@@ -57,7 +57,7 @@ static __inline size_t mt7697q_get_free_words(const struct mt7697q_spec *qs)
return mt7697q_get_capacity(qs) - mt7697q_get_num_words(qs);
}
static int mt7697q_send_init(u8 tx_ch, u8 rx_ch, struct mt7697q_spec *qs)
static int mt7697q_wr_init(u8 tx_ch, u8 rx_ch, struct mt7697q_spec *qs)
{
struct mt7697_queue_init_req req;
int ret;
......@@ -279,11 +279,6 @@ static int mt7697q_proc_queue_rsp(struct mt7697q_spec *qs)
__func__);
break;
case MT7697_CMD_QUEUE_UNUSED_RSP:
dev_dbg(qs->qinfo->dev, "%s(): --> QUEUE UNUSED RSP\n",
__func__);
break;
case MT7697_CMD_QUEUE_RESET_RSP:
dev_dbg(qs->qinfo->dev, "%s(): --> QUEUE RESET RSP\n",
__func__);
......@@ -445,7 +440,45 @@ cleanup:
return ret;
}
int mt7697q_send_reset(void *tx_hndl, void* rx_hndl)
int mt7697q_wr_unused(void *tx_hndl, void* rx_hndl)
{
struct mt7697q_spec *qsM2S = (struct mt7697q_spec*)tx_hndl;
struct mt7697q_spec *qsS2M = (struct mt7697q_spec*)rx_hndl;
struct mt7697_queue_reset_req req;
int ret;
req.cmd.len = sizeof(struct mt7697_queue_reset_req);
req.cmd.grp = MT7697_CMD_GRP_QUEUE;
req.cmd.type = MT7697_CMD_QUEUE_UNUSED;
req.m2s_ch = qsM2S->ch;
req.s2m_ch = qsS2M->ch;
qsM2S->data.flags &= ~BF_GET(qsM2S->data.flags, MT7697_QUEUE_FLAGS_IN_USE_OFFSET,
MT7697_QUEUE_FLAGS_IN_USE_WIDTH);
qsS2M->data.flags &= ~BF_GET(qsS2M->data.flags, MT7697_QUEUE_FLAGS_IN_USE_OFFSET,
MT7697_QUEUE_FLAGS_IN_USE_WIDTH);
dev_dbg(qsM2S->qinfo->dev, "%s(): <-- QUEUE UNUSED(%u/%u)\n",
__func__, req.m2s_ch, req.s2m_ch);
ret = mt7697q_write(qsM2S, (const u32*)&req,
LEN_TO_WORD(req.cmd.len));
if (ret != LEN_TO_WORD(req.cmd.len)) {
dev_err(qsM2S->qinfo->dev,
"%s(): mt7697q_write() failed(%d != %d)\n",
__func__, ret, LEN_TO_WORD(req.cmd.len));
ret = (ret < 0) ? ret:-EIO;
goto cleanup;
}
ret = 0;
cleanup:
return ret;
}
EXPORT_SYMBOL(mt7697q_wr_unused);
int mt7697q_wr_reset(void *tx_hndl, void* rx_hndl)
{
struct mt7697q_spec *qsM2S = (struct mt7697q_spec*)tx_hndl;
struct mt7697q_spec *qsS2M = (struct mt7697q_spec*)rx_hndl;
......@@ -476,7 +509,7 @@ cleanup:
return ret;
}
EXPORT_SYMBOL(mt7697q_send_reset);
EXPORT_SYMBOL(mt7697q_wr_reset);
int mt7697q_init(u8 tx_ch, u8 rx_ch, void *priv, rx_hndlr rx_fcn,
void** tx_hndl, void** rx_hndl)
......@@ -573,9 +606,9 @@ int mt7697q_init(u8 tx_ch, u8 rx_ch, void *priv, rx_hndlr rx_fcn,
qsRx->data.flags |= BF_DEFINE(1, MT7697_QUEUE_FLAGS_IN_USE_OFFSET,
MT7697_QUEUE_FLAGS_IN_USE_WIDTH);
ret = mt7697q_send_init(tx_ch, rx_ch, qsTx);
ret = mt7697q_wr_init(tx_ch, rx_ch, qsTx);
if (ret < 0) {
dev_err(qinfo->dev, "%s(): mt7697q_send_init() failed(%d)\n",
dev_err(qinfo->dev, "%s(): mt7697q_wr_init() failed(%d)\n",
__func__, ret);
goto cleanup;
}
......
......@@ -23,7 +23,6 @@
((x) % sizeof(u32) ? 1:0))
#define mt7697_queue_init_rsp mt7697q_rsp_hdr
#define mt7697_queue_unused_rsp mt7697q_rsp_hdr
#define mt7697_queue_reset_rsp mt7697q_rsp_hdr
enum mt7697q_dir
......@@ -42,7 +41,6 @@ enum mt7697q_cmd_types {
MT7697_CMD_QUEUE_INIT = 0,
MT7697_CMD_QUEUE_INIT_RSP,
MT7697_CMD_QUEUE_UNUSED,
MT7697_CMD_QUEUE_UNUSED_RSP,
MT7697_CMD_QUEUE_RESET,
MT7697_CMD_QUEUE_RESET_RSP,
};
......@@ -91,9 +89,9 @@ u32 mt7697q_flags_get_in_use(u32);
u32 mt7697q_flags_get_dir(u32);
int mt7697q_init(u8, u8, void*, rx_hndlr, void**, void**);
int mt7697q_wr_reset(void*, void*);
int mt7697q_wr_unused(void*, void*);
size_t mt7697q_read(void*, u32*, size_t);
size_t mt7697q_write(void*, const u32*, size_t);
int mt7697q_send_reset(void*, void*);
#endif
......@@ -22,9 +22,12 @@
struct mt7697_cfg80211_info;
struct mt7697_vif;
int mt7697_cfg80211_new_sta(struct mt7697_vif*, const u8*);
int mt7697_cfg80211_del_sta(struct mt7697_vif*, const u8*);
int mt7697_cfg80211_connect_event(struct mt7697_vif*, const u8*, u32);
struct mt7697_cfg80211_info *mt7697_cfg80211_create(void);
void mt7697_cfg80211_stop(struct mt7697_vif *vif);
int mt7697_cfg80211_stop(struct mt7697_vif*);
int mt7697_cfg80211_get_params(struct mt7697_cfg80211_info*);
int mt7697_cfg80211_init(struct mt7697_cfg80211_info*);
void mt7697_cfg80211_cleanup(struct mt7697_cfg80211_info*);
void mt7697_cfg80211_destroy(struct mt7697_cfg80211_info*);
......
......@@ -32,7 +32,9 @@
#define MT7697_CH_MAX_5G_CHANNEL 216
#define MT7697_SCAN_MAX_ITEMS 16
#define MT7697_IFACE_MAX_CNT 2
#define MT7697_IFACE_MAX_CNT 4
#define MT7697_IFACE_NAME_LEN 32
#define MT7697_MAX_STA 10
#define MT7697_MAX_MC_FILTERS_PER_LIST 7
#define MT7697_MAX_COOKIE_NUM 180
#define MT7697_TX_TIMEOUT 10
......@@ -98,24 +100,24 @@ struct mt7697_cfg80211_info {
u32 cookie_count;
struct mt7697_cookie cookie_mem[MT7697_MAX_COOKIE_NUM];
struct workqueue_struct *tx_workq;
struct work_struct tx_work;
struct mt7697_tx_raw_packet tx_req;
u8 rx_data[LEN32_ALIGNED(IEEE80211_MAX_FRAME_LEN)];
u8 probe_data[LEN32_ALIGNED(IEEE80211_MAX_DATA_LEN)];
enum mt7697_port_type port_type;
enum mt7697_radio_state radio_state;
enum mt7697_wifi_phy_mode_t wireless_mode;
enum mt7697_wifi_phy_mode_t hw_wireless_mode;
struct mac_address mac_addr;
struct mt7697_wifi_config_t wifi_cfg;
int listen_interval;
enum mt7697_wifi_rx_filter_t rx_filter;
u8 smart_conn_filter;
u8 reg_rx_hndlr;
struct list_head vif_list;
spinlock_t vif_list_lock;
u8 num_vif;
unsigned int vif_start;
unsigned int vif_max;
u8 max_norm_iface;
u8 avail_idx_map;
......@@ -134,8 +136,13 @@ struct mt7697_key {
u32 cipher;
};
struct mt7697_sta {
struct list_head next;
u8 bssid[ETH_ALEN];
};
struct mt7697_vif {
struct list_head list;
struct list_head next;
struct wireless_dev wdev;
struct net_device *ndev;
struct mt7697_cfg80211_info *cfg;
......@@ -163,6 +170,11 @@ struct mt7697_vif {
enum mt7697_wifi_encrypt_type_t grp_crypto;
u8 grp_crypto_len;
spinlock_t sta_list_lock;
struct list_head sta_list;
u8 sta_count;
u8 sta_max;
u8 def_txkey_index;
struct mt7697_key keys[MT7697_MAX_KEY_INDEX + 1];
......@@ -197,9 +209,9 @@ static inline struct mt7697_vif *mt7697_vif_from_wdev(struct wireless_dev *wdev)
void mt7697_init_netdev(struct net_device*);
struct mt7697_vif *mt7697_get_vif_by_idx(struct mt7697_cfg80211_info*, u8);
struct mt7697_vif *mt7697_get_vif_by_idx(struct mt7697_cfg80211_info*, u32);
struct wireless_dev *mt7697_interface_add(struct mt7697_cfg80211_info*,
const char*, enum nl80211_iftype, u8 fw_vif_idx);
const char*, enum nl80211_iftype, u8);
void mt7697_tx_work(struct work_struct *);
int mt7697_data_tx(struct sk_buff*, struct net_device*);
int mt7697_rx_data(struct mt7697_cfg80211_info*, u32, u32);
......
......@@ -67,6 +67,60 @@ static int mt7697_wext_giwfreq(struct net_device *ndev,
return 0;
}
static int mt7697_wext_siwmode(struct net_device *ndev,
struct iw_request_info *info,
u32 *mode, char *extra)
{
struct mt7697_cfg80211_info *cfg = mt7697_priv(ndev);
struct wireless_dev *wdev = ndev->ieee80211_ptr;
struct mt7697_vif *vif = mt7697_vif_from_wdev(wdev);
int ret = 0;
dev_dbg(cfg->dev, "%s(): mode(%u)\n", __func__, *mode);
switch (*mode) {
case IW_MODE_MASTER:
if (cfg->wifi_cfg.opmode != MT7697_WIFI_MODE_AP_ONLY) {
cfg->wifi_cfg.opmode = MT7697_WIFI_MODE_AP_ONLY;
cfg->port_type = MT7697_PORT_AP;
vif->wdev.iftype = NL80211_IFTYPE_AP;
ret = mt7697_wr_set_op_mode_req(cfg);
if (ret < 0) {
dev_err(cfg->dev,
"%s(): mt7697_wr_set_op_mode_req() failed(%d)\n",
__func__, ret);
goto cleanup;
}
}
break;
case IW_MODE_INFRA:
if (cfg->wifi_cfg.opmode != MT7697_WIFI_MODE_STA_ONLY) {
cfg->wifi_cfg.opmode = MT7697_WIFI_MODE_STA_ONLY;
cfg->port_type = MT7697_PORT_STA;
vif->wdev.iftype = NL80211_IFTYPE_STATION;
ret = mt7697_wr_set_op_mode_req(cfg);
if (ret < 0) {
dev_err(cfg->dev,
"%s(): mt7697_wr_set_op_mode_req() failed(%d)\n",
__func__, ret);
goto cleanup;
}
}
break;
default:
dev_err(cfg->dev, "%s(): unsupported mode(%u)\n",
__func__, *mode);
ret = -EINVAL;
goto cleanup;
}
cleanup:
return ret;
}
static int mt7697_wext_giwrange(struct net_device *ndev,
struct iw_request_info *info,
struct iw_point *dwrq, char *extra)
......@@ -213,9 +267,10 @@ static int mt7697_wext_siwessid(struct net_device *ndev,
__func__, wdev->iftype, ssid);
/* call only for station! */
if (WARN_ON(wdev->iftype != NL80211_IFTYPE_STATION)) {
dev_warn(cfg->dev, "%s(): iftype(%u != %u)\n",
__func__, wdev->iftype, NL80211_IFTYPE_STATION);
if (WARN_ON((wdev->iftype != NL80211_IFTYPE_STATION) &&
(wdev->iftype != NL80211_IFTYPE_AP))) {
dev_warn(cfg->dev, "%s(): unsupported iftype(%u)\n",
__func__, wdev->iftype);
ret = -EINVAL;
goto cleanup;
}
......@@ -230,30 +285,39 @@ static int mt7697_wext_siwessid(struct net_device *ndev,
memset(vif->ssid, 0, sizeof(vif->ssid));
vif->ssid_len = len;
memcpy(vif->ssid, ssid, len);
ret = mt7697_wr_set_ssid_req(cfg, MT7697_PORT_STA, len, ssid);
memcpy(wdev->ssid, ssid, len);
wdev->ssid_len = len;
ret = mt7697_wr_set_ssid_req(cfg, len, ssid);
if (ret < 0) {
dev_err(cfg->dev, "%s(): mt7697_wr_set_ssid_req() failed(%d)\n",
dev_err(cfg->dev,
"%s(): mt7697_wr_set_ssid_req() failed(%d)\n",
__func__, ret);
goto cleanup;
}
ret = mt7697_wr_set_bssid_req(cfg, vif->req_bssid);
if (ret < 0) {
dev_err(cfg->dev, "%s(): mt7697_wr_set_channel_req() failed(%d)\n",
__func__, ret);
goto cleanup;
if (cfg->wifi_cfg.opmode == MT7697_WIFI_MODE_STA_ONLY) {
ret = mt7697_wr_set_bssid_req(cfg, vif->req_bssid);
if (ret < 0) {
dev_err(cfg->dev,
"%s(): mt7697_wr_set_channel_req() failed(%d)\n",
__func__, ret);
goto cleanup;
}
}
if (vif->ch_hint > 0) {
ret = mt7697_wr_set_channel_req(cfg, MT7697_PORT_STA, vif->ch_hint);
ret = mt7697_wr_set_channel_req(cfg, vif->ch_hint);
if (ret < 0) {
dev_err(cfg->dev, "%s(): mt7697_wr_set_channel_req() failed(%d)\n",
dev_err(cfg->dev,
"%s(): mt7697_wr_set_channel_req() failed(%d)\n",
__func__, ret);
goto cleanup;
}
}
ret = mt7697_wr_set_pmk_req(cfg, MT7697_PORT_STA, vif->pmk);
ret = mt7697_wr_set_pmk_req(cfg, vif->pmk);
if (ret < 0) {
dev_err(cfg->dev, "%s(): mt7697_wr_set_pmk_req() failed(%d)\n",
__func__, ret);
......@@ -262,7 +326,8 @@ static int mt7697_wext_siwessid(struct net_device *ndev,
if (len > 0) {
if (test_bit(CONNECTED, &vif->flags)) {
dev_dbg(cfg->dev, "%s(): already connected\n", __func__);
dev_dbg(cfg->dev, "%s(): already connected\n",
__func__);
goto cleanup;
}
......@@ -275,9 +340,10 @@ static int mt7697_wext_siwessid(struct net_device *ndev,
goto cleanup;
}
ret = mt7697_wr_reload_settings_req(cfg);
ret = mt7697_wr_reload_settings_req(cfg, vif->fw_vif_idx);
if (ret < 0) {
dev_err(cfg->dev, "%s(): mt7697_wr_reload_settings_req() failed(%d)\n",
dev_err(cfg->dev,
"%s(): mt7697_wr_reload_settings_req() failed(%d)\n",
__func__, ret);
goto cleanup;
}
......@@ -406,7 +472,7 @@ static int mt7697_wext_siwencodeext(struct net_device *ndev,
dev_dbg(cfg->dev, "%s(): iftype(%u)\n", __func__, wdev->iftype);
if (wdev->iftype != NL80211_IFTYPE_STATION &&
wdev->iftype != NL80211_IFTYPE_ADHOC) {
wdev->iftype != NL80211_IFTYPE_AP) {
dev_err(cfg->dev, "%s(): iftype(%d) not supported\n",
__func__, wdev->iftype);
ret = -EOPNOTSUPP;
......@@ -419,12 +485,18 @@ static int mt7697_wext_siwencodeext(struct net_device *ndev,
DUMP_PREFIX_OFFSET, 16, 1, ext->key, ext->key_len, 0);
memcpy(vif->pmk, ext->key, ext->key_len);
}
else {
dev_err(cfg->dev, "%s(): alg(%d) not supported\n",
__func__, ext->alg);
ret = -EOPNOTSUPP;
goto cleanup;
if (wdev->iftype == NL80211_IFTYPE_AP) {
ret = mt7697_wr_set_security_mode_req(cfg,
MT7697_WIFI_AUTH_MODE_WPA2_PSK,
MT7697_WIFI_ENCRYPT_TYPE_AES_ENABLED);
if (ret < 0) {
dev_err(cfg->dev,
"%s(): mt7697_wr_set_security_mode_req() failed(%d)\n",
__func__, ret);
goto cleanup;
}
}
}
cleanup:
......@@ -445,7 +517,7 @@ static const iw_handler mt7697_wireless_handler[] = {
[IW_IOCTL_IDX(SIOCGIWNAME)] = (iw_handler) cfg80211_wext_giwname,
[IW_IOCTL_IDX(SIOCSIWFREQ)] = (iw_handler) mt7697_wext_siwfreq,
[IW_IOCTL_IDX(SIOCGIWFREQ)] = (iw_handler) mt7697_wext_giwfreq,
[IW_IOCTL_IDX(SIOCSIWMODE)] = (iw_handler) cfg80211_wext_siwmode,
[IW_IOCTL_IDX(SIOCSIWMODE)] = (iw_handler) mt7697_wext_siwmode,
[IW_IOCTL_IDX(SIOCGIWMODE)] = (iw_handler) cfg80211_wext_giwmode,
[IW_IOCTL_IDX(SIOCGIWRANGE)] = (iw_handler) mt7697_wext_giwrange,
[IW_IOCTL_IDX(SIOCSIWAP)] = (iw_handler) mt7697_wext_siwap,
......@@ -461,9 +533,6 @@ static const iw_handler mt7697_wireless_handler[] = {
[IW_IOCTL_IDX(SIOCGIWRTS)] = (iw_handler) cfg80211_wext_giwrts,
[IW_IOCTL_IDX(SIOCSIWFRAG)] = (iw_handler) cfg80211_wext_siwfrag,
[IW_IOCTL_IDX(SIOCGIWFRAG)] = (iw_handler) cfg80211_wext_giwfrag,
// [IW_IOCTL_IDX(SIOCSIWTXPOW)] = (iw_handler) cfg80211_wext_siwtxpower,
// [IW_IOCTL_IDX(SIOCGIWTXPOW)] = (iw_handler) cfg80211_wext_giwtxpower,
// [IW_IOCTL_IDX(SIOCSIWRETRY)] = (iw_handler) cfg80211_wext_siwretry,
[IW_IOCTL_IDX(SIOCGIWRETRY)] = (iw_handler) cfg80211_wext_giwretry,
[IW_IOCTL_IDX(SIOCSIWENCODE)] = (iw_handler) mt7697_wext_siwencode,
[IW_IOCTL_IDX(SIOCGIWENCODE)] = (iw_handler) mt7697_wext_giwencode,
......@@ -475,7 +544,6 @@ static const iw_handler mt7697_wireless_handler[] = {
[IW_IOCTL_IDX(SIOCGIWAUTH)] = (iw_handler) mt7697_wext_giwauth,
[IW_IOCTL_IDX(SIOCSIWENCODEEXT)]= (iw_handler) mt7697_wext_siwencodeext,
[IW_IOCTL_IDX(SIOCGIWENCODEEXT)]= (iw_handler) mt7697_wext_giwencodeext,
// [IW_IOCTL_IDX(SIOCSIWPMKSA)] = (iw_handler) cfg80211_wext_siwpmksa,
};
const struct iw_handler_def mt7697_wireless_hndlrs = {
......
......@@ -24,6 +24,10 @@
#include "core.h"
#include "cfg80211.h"
static int itf_idx_start = 1;
module_param(itf_idx_start, int, S_IRUGO);
MODULE_PARM_DESC(itf_idx_start, "MT7697 interface start index");
static struct platform_device *pdev = NULL;
static int mt7697_open(struct net_device *ndev)
......@@ -51,10 +55,8 @@ static int mt7697_stop(struct net_device *ndev)
dev_dbg(cfg->dev, "%s(): stop net device\n", __func__);
netif_stop_queue(ndev);
mt7697_cfg80211_stop(vif);
clear_bit(WLAN_ENABLED, &vif->flags);
return 0;
}
......@@ -64,14 +66,6 @@ static struct net_device_stats *mt7697_get_stats(struct net_device *dev)
return &vif->net_stats;
}
static int mt7697_set_features(struct net_device *ndev,
netdev_features_t features)
{
struct mt7697_cfg80211_info *cfg = mt7697_priv(ndev);
dev_dbg(cfg->dev, "%s(): net device set features\n", __func__);
return 0;
}
static void mt7697_set_multicast_list(struct net_device *ndev)
{
struct mt7697_cfg80211_info *cfg = mt7697_priv(ndev);
......@@ -112,8 +106,9 @@ static void mt7697_init_hw_start(struct work_struct *work)
dev_dbg(cfg->dev, "%s(): init mt7697 queue(%u/%u)\n",
__func__, MT7697_MAC80211_QUEUE_TX, MT7697_MAC80211_QUEUE_RX);
err = cfg->hif_ops->init(MT7697_MAC80211_QUEUE_TX,
MT7697_MAC80211_QUEUE_RX, cfg, mt7697_proc_80211cmd,
&cfg->txq_hdl, &cfg->rxq_hdl);
MT7697_MAC80211_QUEUE_RX, cfg,
mt7697_proc_80211cmd,
&cfg->txq_hdl, &cfg->rxq_hdl);
if (err < 0) {
dev_err(cfg->dev, "%s(): queue(%u) init() failed(%d)\n",
__func__, MT7697_MAC80211_QUEUE_TX, err);
......@@ -127,54 +122,6 @@ static void mt7697_init_hw_start(struct work_struct *work)
goto failed;
}
err = mt7697_wr_get_wireless_mode_req(cfg, MT7697_PORT_STA);
if (err < 0) {
dev_err(cfg->dev,
"%s(): mt7697_wr_get_wireless_mode_req() failed(%d)\n",
__func__, err);
goto failed;
}
err = mt7697_wr_get_rx_filter_req(cfg);
if (err < 0) {
dev_err(cfg->dev,
"%s(): mt7697_wr_get_rx_filter_req() failed(%d)\n",
__func__, err);
goto failed;
}
err = mt7697_wr_get_smart_conn_filter_req(cfg);
if (err < 0) {
dev_err(cfg->dev,
"%s(): mt7697_wr_get_smart_conn_filter_req() failed(%d)\n",
__func__, err);
goto failed;
}
err = mt7697_wr_get_listen_interval_req(cfg);
if (err < 0) {
dev_err(cfg->dev,
"%s(): mt7697_wr_get_listen_interval_req() failed(%d)\n",
__func__, err);
goto failed;
}
err = mt7697_wr_get_radio_state_req(cfg);
if (err < 0) {
dev_err(cfg->dev,
"%s(): mt7697_wr_get_radio_state_req() failed(%d)\n",
__func__, err);
goto failed;
}
err = mt7697_wr_mac_addr_req(cfg, MT7697_PORT_STA);
if (err < 0) {
dev_err(cfg->dev,
"%s(): mt7697_wr_mac_addr_req() failed(%d)\n",
__func__, err);
goto failed;
}
failed:
return;
}
......@@ -184,7 +131,6 @@ static const struct net_device_ops mt7697_netdev_ops = {
.ndo_stop = mt7697_stop,
.ndo_start_xmit = mt7697_data_tx,
.ndo_get_stats = mt7697_get_stats,
.ndo_set_features = mt7697_set_features,
.ndo_set_rx_mode = mt7697_set_multicast_list,
};
......@@ -196,7 +142,7 @@ void mt7697_init_netdev(struct net_device *ndev)
ndev->watchdog_timeo = MT7697_TX_TIMEOUT;
ndev->needed_headroom = sizeof(struct ieee80211_hdr) +
sizeof(struct mt7697_llc_snap_hdr);
ndev->hw_features |= NETIF_F_HW_CSUM | NETIF_F_RXCSUM;
ndev->hw_features |= NETIF_F_IP_CSUM | NETIF_F_RXCSUM;
}
static const struct mt7697q_if_ops if_ops = {
......@@ -224,7 +170,7 @@ static void mt7697_cookie_cleanup(struct mt7697_cfg80211_info *cfg)
cfg->cookie_count = 0;
}
static int mt7697_probe(struct platform_device *pdev)
static int __init mt7697_probe(struct platform_device *pdev)
{
struct wiphy *wiphy;
struct mt7697_cfg80211_info *cfg;
......@@ -241,6 +187,15 @@ static int mt7697_probe(struct platform_device *pdev)
}
sema_init(&cfg->sem, 1);
cfg->tx_workq = create_singlethread_workqueue(DRVNAME);
if (!cfg->tx_workq) {
dev_err(&pdev->dev,
"%s(): mt7697_cfg80211_create() failed()\n",
__func__);
err = -ENOMEM;
goto failed;
}
INIT_WORK(&cfg->init_work, mt7697_init_hw_start);
INIT_WORK(&cfg->tx_work, mt7697_tx_work);
......@@ -251,6 +206,9 @@ static int mt7697_probe(struct platform_device *pdev)
cfg->dev = &pdev->dev;
mt7697_cookie_init(cfg);
cfg->vif_start = itf_idx_start;
cfg->vif_max = MT7697_MAX_STA;
err = mt7697_cfg80211_init(cfg);
if (err < 0) {
dev_err(&pdev->dev,
......@@ -274,31 +232,32 @@ failed:
static int mt7697_remove(struct platform_device *pdev)
{
struct mt7697_cfg80211_info *cfg = platform_get_drvdata(pdev);
int ret;
ret = mt7697q_send_reset(cfg->txq_hdl, cfg->rxq_hdl);
if (ret < 0) {
dev_err(&pdev->dev, "%s(): mt7697q_send_reset() failed(%d)\n",
__func__, ret);
goto failed;
}
mt7697_cookie_cleanup(cfg);
mt7697_cfg80211_cleanup(cfg);
mt7697_cfg80211_destroy(cfg);
mt7697_cookie_cleanup(cfg);
dev_dbg(&pdev->dev, "%s(): removed.\n", __func__);
platform_set_drvdata(pdev, NULL);
pr_info(DRVNAME" %s(): removed.\n", __func__);
return 0;
}
failed:
return ret;
static int mt7697_release(struct platform_device *pdev)
{
pr_info(DRVNAME" %s(): released.\n", __func__);
return 0;
}
static struct platform_device mt7697_platform_device = {
.name = DRVNAME,
.id = PLATFORM_DEVID_NONE,
.dev = {
.release = mt7697_release,
},
};
static struct platform_driver mt7697_platform_driver = {
.driver = {
.name = DRVNAME,
.owner = THIS_MODULE,
.bus = &platform_bus_type,
},
.probe = mt7697_probe,
......@@ -309,41 +268,31 @@ static int __init mt7697_init(void)
{
int ret;
pr_info(DRVNAME" initialize\n");
ret = platform_driver_register(&mt7697_platform_driver);
pr_info(DRVNAME" init\n");
ret = platform_device_register(&mt7697_platform_device);
if (ret) {
pr_err(DRVNAME" %s(): platform_driver_register() failed(%d)\n",
pr_err(DRVNAME" %s(): platform_device_register() failed(%d)\n",
__func__, ret);
goto cleanup;
}
pdev = platform_device_alloc(DRVNAME, -1);
if (!pdev) {
pr_err(DRVNAME" %s(): platform_device_alloc() failed\n",
__func__);
platform_driver_unregister(&mt7697_platform_driver);
ret = -ENOMEM;
goto cleanup;
}
ret = platform_device_add(pdev);
ret = platform_driver_register(&mt7697_platform_driver);
if (ret) {
pr_err(DRVNAME" %s(): platform_device_add() failed(%d)\n",
pr_err(DRVNAME" %s(): platform_driver_register() failed(%d)\n",
__func__, ret);
platform_device_del(pdev);
goto cleanup;
}
platform_device_put(pdev);
cleanup:
return ret;
}
static void __exit mt7697_exit(void)
{
pr_info(DRVNAME" exit\n");
platform_device_del(pdev);
platform_driver_unregister(&mt7697_platform_driver);
platform_device_unregister(&mt7697_platform_device);
pr_info(DRVNAME" exit\n");
}
module_init(mt7697_init);
......@@ -354,7 +303,6 @@ void mt7697_disconnect_timer_hndlr(unsigned long ptr)
struct net_device *ndev = (struct net_device *)ptr;
struct mt7697_vif *vif = netdev_priv(ndev);
// ath6kl_init_profile_info(vif);
schedule_work(&vif->disconnect_work);
}
......@@ -365,23 +313,15 @@ int mt7697_disconnect(struct mt7697_vif *vif)
dev_dbg(vif->cfg->dev, "%s(): disconnect\n", __func__);
if (test_bit(CONNECTED, &vif->flags) ||
test_bit(CONNECT_PEND, &vif->flags)) {
if (vif->cfg->reg_rx_hndlr) {
/* ret = mt7697_wr_set_op_mode_req(vif->cfg,
vif->cfg->wifi_cfg.opmode);
if (ret < 0) {
dev_err(vif->cfg->dev,
"%s(): mt7697_wr_set_op_mode_req() failed(%d)\n",
__func__, ret);
goto failed;
}
*/
ret = mt7697_wr_unreg_rx_hndlr_req(vif->cfg);
if (ret < 0) {
dev_err(vif->cfg->dev,
"%s(): mt7697_wr_unreg_rx_hndlr_req() failed(%d)\n",
__func__, ret);
goto failed;
}
if (vif->sme_state == SME_CONNECTING)
cfg80211_connect_result(vif->ndev, vif->bssid,
NULL, 0,
NULL, 0,
WLAN_STATUS_UNSPECIFIED_FAILURE,
GFP_KERNEL);
else if (vif->sme_state == SME_CONNECTED) {
cfg80211_disconnected(vif->ndev, 0,
NULL, 0, GFP_KERNEL);
}
ret = mt7697_wr_disconnect_req(vif->cfg, vif->fw_vif_idx,
......@@ -390,7 +330,49 @@ int mt7697_disconnect(struct mt7697_vif *vif)
dev_err(vif->cfg->dev,
"%s(): mt7697_wr_disconnect_req() failed(%d)\n",
__func__, ret);
goto failed;
goto cleanup;
}
memset(vif->ssid, 0, IEEE80211_MAX_SSID_LEN);
ret = mt7697_wr_set_ssid_req(vif->cfg, IEEE80211_MAX_SSID_LEN, vif->ssid);
if (ret < 0) {
dev_err(vif->cfg->dev,
"%s(): mt7697_wr_set_ssid_req() failed(%d)\n",
__func__, ret);
goto cleanup;
}
memset(vif->req_bssid, 0, ETH_ALEN);
ret = mt7697_wr_set_bssid_req(vif->cfg, vif->req_bssid);
if (ret < 0) {
dev_err(vif->cfg->dev,
"%s(): mt7697_wr_set_channel_req() failed(%d)\n",
__func__, ret);
goto cleanup;
}
memset(vif->pmk, 0, MT7697_WIFI_LENGTH_PMK);
ret = mt7697_wr_set_pmk_req(vif->cfg, vif->pmk);
if (ret < 0) {
dev_err(vif->cfg->dev, "%s(): mt7697_wr_set_pmk_req() failed(%d)\n",
__func__, ret);
goto cleanup;
}
ret = mt7697_wr_reload_settings_req(vif->cfg, vif->fw_vif_idx);
if (ret < 0) {
dev_err(vif->cfg->dev,
"%s(): mt7697_wr_reload_settings_req() failed(%d)\n",
__func__, ret);
goto cleanup;
}
ret = mt7697q_wr_unused(vif->cfg->txq_hdl, vif->cfg->rxq_hdl);
if (ret < 0) {
dev_err(vif->cfg->dev,
"%s(): mt7697q_wr_unused() failed(%d)\n",
__func__, ret);
goto cleanup;
}
/*
......@@ -401,7 +383,7 @@ int mt7697_disconnect(struct mt7697_vif *vif)
clear_bit(CONNECT_PEND, &vif->flags);
}
failed:
cleanup:
return ret;
}
......
......@@ -18,78 +18,16 @@
#include "common.h"
#include "core.h"
static int mt7697_80211_to_ethernet(struct sk_buff *skb,
static int mt7697_ethernet_to_80211(struct sk_buff *skb,
struct net_device *ndev)
{
struct mt7697_cfg80211_info *cfg = mt7697_priv(ndev);
struct mt7697_vif *vif = netdev_priv(ndev);
struct ieee80211_hdr *hdr = (struct ieee80211_hdr*) skb->data;
struct ethhdr *ehdr;
u8 *payload;
u16 hdrlen, ethertype;
__be16 len;
u8 dst[ETH_ALEN];
u8 src[ETH_ALEN] __aligned(2);
int ret = 0;
print_hex_dump(KERN_DEBUG, DRVNAME" --> Rx 802.11 Frame",
DUMP_PREFIX_OFFSET, 16, 1, skb->data, skb->len, 0);
if (unlikely(!ieee80211_is_data_present(hdr->frame_control))) {
dev_warn(cfg->dev, "%s(): no data present\n", __func__);
ret = -EINVAL;
goto cleanup;
}
hdrlen = ieee80211_hdrlen(hdr->frame_control);
/* convert IEEE 802.11 header + possible LLC headers into Ethernet
* header
* IEEE 802.11 address fields:
* ToDS FromDS Addr1 Addr2 Addr3 Addr4
* 0 0 DA SA BSSID n/a
* 0 1 DA BSSID SA n/a
* 1 0 BSSID SA DA n/a
* 1 1 RA TA DA SA
*/
memcpy(dst, ieee80211_get_DA(hdr), ETH_ALEN);
memcpy(src, ieee80211_get_SA(hdr), ETH_ALEN);
if (!pskb_may_pull(skb, hdrlen + 8)) {
dev_warn(cfg->dev, "%s(): pskb_may_pull() failed\n", __func__);
ret = -EINVAL;
goto cleanup;
}
payload = skb->data + hdrlen;
ethertype = (payload[6] << 8) | payload[7];
skb_pull(skb, hdrlen);
len = htons(skb->len);
ehdr = (struct ethhdr*)skb_push(skb, sizeof(struct ethhdr));
memcpy(ehdr->h_dest, dst, ETH_ALEN);
memcpy(ehdr->h_source, src, ETH_ALEN);
ehdr->h_proto = len;
print_hex_dump(KERN_DEBUG, DRVNAME" Rx 802.3 Frame ",
DUMP_PREFIX_OFFSET, 16, 1, skb->data, skb->len, 0);
if (!is_broadcast_ether_addr(ehdr->h_dest))
vif->net_stats.multicast++;
cleanup:
return ret;
}
static void mt7697_ethernet_to_80211(struct sk_buff *skb,
struct net_device *ndev)
{
struct ieee80211_hdr hdr;
struct mt7697_cfg80211_info *cfg = mt7697_priv(ndev);
struct mt7697_vif *vif = netdev_priv(ndev);
struct ethhdr *eth_hdr = (struct ethhdr*)skb->data;
struct mt7697_llc_snap_hdr *llc_hdr;
u8 *datap;
u8 *datap;
int ret = 0;
__be16 type = eth_hdr->h_proto;
__le16 fc;
u16 hdrlen;
......@@ -97,17 +35,39 @@ static void mt7697_ethernet_to_80211(struct sk_buff *skb,
dev_dbg(cfg->dev, "%s(): Tx 802.3 Frame len(%u)\n",
__func__, skb->len);
print_hex_dump(KERN_DEBUG, DRVNAME" 802.3 Frame ", DUMP_PREFIX_OFFSET,
16, 1, skb->data, skb->len, 0);
16, 1, skb->data, skb->len, 0);
fc = cpu_to_le16(IEEE80211_FTYPE_DATA | IEEE80211_STYPE_DATA);
fc |= cpu_to_le16(IEEE80211_FCTL_TODS);
/* DA BSSID SA */
hdr.frame_control = fc;
switch (vif->wdev.iftype) {
case NL80211_IFTYPE_STATION:
fc |= cpu_to_le16(IEEE80211_FCTL_TODS);
/* BSSID SA DA */
hdr.frame_control = fc;
memcpy(hdr.addr1, vif->bssid, ETH_ALEN);
memcpy(hdr.addr2, eth_hdr->h_source, ETH_ALEN);
memcpy(hdr.addr3, eth_hdr->h_dest, ETH_ALEN);
break;
case NL80211_IFTYPE_AP:
fc |= cpu_to_le16(IEEE80211_FCTL_FROMDS);
/* DA BSSID SA */
hdr.frame_control = fc;
memcpy(hdr.addr1, eth_hdr->h_dest, ETH_ALEN);
memcpy(hdr.addr2, vif->bssid, ETH_ALEN);
memcpy(hdr.addr3, eth_hdr->h_source, ETH_ALEN);
break;
default:
dev_warn(cfg->dev, "%s(): unsupported iftype(%d)\n",
__func__, vif->wdev.iftype);
ret = -EINVAL;
goto cleanup;
}
hdr.duration_id = 0;
memcpy(hdr.addr1, vif->bssid, ETH_ALEN);
memcpy(hdr.addr2, eth_hdr->h_source, ETH_ALEN);
memcpy(hdr.addr3, eth_hdr->h_dest, ETH_ALEN);
hdr.seq_ctrl = 0;
hdrlen = sizeof(struct ieee80211_hdr_3addr);
......@@ -129,6 +89,9 @@ static void mt7697_ethernet_to_80211(struct sk_buff *skb,
__func__, skb->len);
print_hex_dump(KERN_DEBUG, DRVNAME" <-- Tx 802.11 Frame ",
DUMP_PREFIX_OFFSET, 16, 1, skb->data, skb->len, 0);
cleanup:
return ret;
}
int mt7697_data_tx(struct sk_buff *skb, struct net_device *ndev)
......@@ -162,7 +125,12 @@ int mt7697_data_tx(struct sk_buff *skb, struct net_device *ndev)
}
}
mt7697_ethernet_to_80211(skb, ndev);
ret = mt7697_ethernet_to_80211(skb, ndev);
if (ret < 0) {
dev_err(cfg->dev, "%s(): mt7697_ethernet_to_80211() failed(%d)\n",
__func__, ret);
goto cleanup;
}
cookie = mt7697_alloc_cookie(cfg);
if (cookie == NULL) {
......@@ -173,7 +141,13 @@ int mt7697_data_tx(struct sk_buff *skb, struct net_device *ndev)
dev_dbg(cfg->dev, "%s(): tx cookie/cnt(0x%p/%u)\n",
__func__, cookie, cfg->cookie_count);
cookie->skb = skb;
schedule_work(&cfg->tx_work);
ret = queue_work(cfg->tx_workq, &cfg->tx_work);
if (ret < 0) {
dev_err(cfg->dev, "%s(): queue_work() failed(%d)\n",
__func__, ret);
goto cleanup;
}
return NETDEV_TX_OK;
......@@ -216,7 +190,6 @@ void mt7697_tx_work(struct work_struct *work)
goto cleanup;
}
ret = mt7697_wr_tx_raw_packet(cfg, cookie->skb->data,
cookie->skb->len);
if (ret < 0) {
......@@ -286,22 +259,27 @@ int mt7697_rx_data(struct mt7697_cfg80211_info *cfg, u32 len, u32 if_idx)
memcpy(skb->data, cfg->rx_data, len);
skb->dev = vif->ndev;
ret = mt7697_80211_to_ethernet(skb, vif->ndev);
if (ret < 0) {
dev_err(cfg->dev,
"%s(): mt7697_80211_to_ethernet() failed(%d)\n",
__func__, ret);
goto cleanup;
}
vif->net_stats.rx_packets++;
vif->net_stats.rx_bytes += len;
netif_rx_ni(skb);
skb->protocol = eth_type_trans(skb, skb->dev);
ret = netif_rx_ni(skb);
if (ret != NET_RX_SUCCESS) {
if (ret == NET_RX_DROP) {
dev_warn(cfg->dev, "%s(): rx frame dropped\n", __func__);
vif->net_stats.rx_dropped++;
ret = 0;
goto cleanup;
}
dev_err(cfg->dev, "%s(): netif_rx_ni() failed(%d)\n", __func__, ret);
goto cleanup;
}
cleanup:
if (ret < 0) {
vif->net_stats.tx_errors++;
vif->net_stats.rx_errors++;
if (skb) dev_kfree_skb(skb);
}
......
......@@ -36,7 +36,7 @@
/**@brief Specifies 20MHz | 40MHz bandwidth in the 2.4GHz band.
*/
#define MT7697_WIFI_IOT_COMMAND_CONFIG_BANDWIDTH_2040MHZ (MT7697_WIFI_IOT_COMMAND_CONFIG_BANDWIDTH_20MHZ | \
MT7697_WIFI_IOT_COMMAND_CONFIG_BANDWIDTH_40MHZ)
MT7697_WIFI_IOT_COMMAND_CONFIG_BANDWIDTH_40MHZ)
/**
* @brief Station operation mode. In this mode the device works as a Wi-Fi client.
......@@ -50,7 +50,8 @@
/**
* @brief Repeater mode. There are two virtual ports in repeater mode, one is #WIFI_PORT_AP, and the other is #WIFI_PORT_APCLI.
* Both ports should be configured to operate on the same channel with the same bandwidth, while their other settings can be different. For example, both ports can have different MAC addresses and security modes.
* Both ports should be configured to operate on the same channel with the same bandwidth, while their other settings can be different.
* For example, both ports can have different MAC addresses and security modes.
*/
#define MT7697_WIFI_MODE_REPEATER (3)
......@@ -63,7 +64,7 @@
*/
#define MT7697_WIFI_MODE_MONITOR (4)
enum mt7697_port_types {
enum mt7697_port_type {
MT7697_PORT_STA = 0,
MT7697_PORT_APCLI = MT7697_PORT_STA,
MT7697_PORT_AP,
......@@ -192,9 +193,9 @@ struct mt7697_wifi_ap_config_t {
/** @brief Wi-Fi configuration for initialization.
*/
struct mt7697_wifi_config_t {
u8 opmode; /**< The operation mode. The value should be #WIFI_MODE_STA_ONLY, #WIFI_MODE_AP_ONLY, #WIFI_MODE_REPEATER or #WIFI_MODE_MONITOR*/
struct mt7697_wifi_sta_config_t sta_cfg; /**< The configurations for the STA. It should be set when the OPMODE is #WIFI_MODE_STA_ONLY or #WIFI_MODE_REPEATER. */
struct mt7697_wifi_ap_config_t ap_cfg; /**< The configurations for the AP. It should be set when the OPMODE is #WIFI_MODE_AP_ONLY or #WIFI_MODE_REPEATER. */
u8 opmode; /**< The operation mode. The value should be #WIFI_MODE_STA_ONLY, #WIFI_MODE_AP_ONLY, #WIFI_MODE_REPEATER or #WIFI_MODE_MONITOR*/
struct mt7697_wifi_sta_config_t sta; /**< The configurations for the STA. It should be set when the OPMODE is #WIFI_MODE_STA_ONLY or #WIFI_MODE_REPEATER. */
struct mt7697_wifi_ap_config_t ap; /**< The configurations for the AP. It should be set when the OPMODE is #WIFI_MODE_AP_ONLY or #WIFI_MODE_REPEATER. */
} __attribute__((__packed__));
#endif
......@@ -33,9 +33,6 @@
#define mt7697_get_listen_interval_req mt7697q_cmd_hdr
#define mt7697_get_smart_conn_filter_req mt7697q_cmd_hdr
#define mt7697_scan_stop mt7697q_cmd_hdr
#define mt7697_register_rx_hndlr_req mt7697q_cmd_hdr
#define mt7697_unregister_rx_hndlr_req mt7697q_cmd_hdr
#define mt7697_reload_settings_req mt7697q_cmd_hdr
#define mt7697_set_wireless_mode_rsp mt7697q_rsp_hdr
#define mt7697_set_radio_state_rsp mt7697q_rsp_hdr
......@@ -49,8 +46,6 @@
#define mt7697_set_ssid_rsp mt7697q_rsp_hdr
#define mt7697_set_security_mode_rsp mt7697q_rsp_hdr
#define mt7697_scan_stop_rsp mt7697q_rsp_hdr
#define mt7697_register_rx_hndlr_rsp mt7697q_rsp_hdr
#define mt7697_unregister_rx_hndlr_rsp mt7697q_rsp_hdr
#define mt7697_reload_settings_rsp mt7697q_rsp_hdr
#define mt7697_disconnect_rsp mt7697q_rsp_hdr
......@@ -80,11 +75,7 @@ enum mt7697_wifi_cmd_types {
MT7697_CMD_GET_RADIO_STATE_REQ,
MT7697_CMD_GET_RADIO_STATE_RSP,
MT7697_CMD_SET_RADIO_STATE_REQ,
MT7697_CMD_SET_RADIO_STATE_RSP,
MT7697_CMD_GET_RX_FILTER_REQ,
MT7697_CMD_GET_RX_FILTER_RSP,
MT7697_CMD_SET_RX_FILTER_REQ,
MT7697_CMD_SET_RX_FILTER_RSP,
MT7697_CMD_SET_RADIO_STATE_RSP,
MT7697_CMD_GET_LISTEN_INTERVAL_REQ,
MT7697_CMD_GET_LISTEN_INTERVAL_RSP,
MT7697_CMD_SET_LISTEN_INTERVAL_REQ,
......@@ -92,15 +83,7 @@ enum mt7697_wifi_cmd_types {
MT7697_CMD_SET_SECURITY_MODE_REQ,
MT7697_CMD_SET_SECURITY_MODE_RSP,
MT7697_CMD_GET_SECURITY_MODE_REQ,
MT7697_CMD_GET_SECURITY_MODE_RSP,
MT7697_CMD_GET_SMART_CONN_FILTER_REQ,
MT7697_CMD_GET_SMART_CONN_FILTER_RSP,
MT7697_CMD_SET_SMART_CONN_FILTER_REQ,
MT7697_CMD_SET_SMART_CONN_FILTER_RSP,
MT7697_CMD_REGISTER_RX_HNDLR_REQ,
MT7697_CMD_REGISTER_RX_HNDLR_RSP,
MT7697_CMD_UNREGISTER_RX_HNDLR_REQ,
MT7697_CMD_UNREGISTER_RX_HNDLR_RSP,
MT7697_CMD_GET_SECURITY_MODE_RSP,
MT7697_CMD_SCAN_IND,
MT7697_CMD_SCAN_REQ,
MT7697_CMD_SCAN_RSP,
......@@ -174,26 +157,6 @@ struct mt7697_set_radio_state_req {
__be32 state;
} __attribute__((packed, aligned(4)));
struct mt7697_get_rx_filter_rsp {
struct mt7697q_rsp_hdr rsp;
__be32 rx_filter;
} __attribute__((packed, aligned(4)));
struct mt7697_set_rx_filter_req {
struct mt7697q_cmd_hdr cmd;
__be32 rx_filter;
} __attribute__((packed, aligned(4)));
struct mt7697_get_smart_conn_filter_rsp {
struct mt7697q_rsp_hdr rsp;
__be32 flag;
} __attribute__((packed, aligned(4)));
struct mt7697_set_smart_conn_filter_req {
struct mt7697q_cmd_hdr cmd;
__be32 flag;
} __attribute__((packed, aligned(4)));
struct mt7697_get_listen_interval_rsp {
struct mt7697q_rsp_hdr rsp;
__be32 interval;
......@@ -204,6 +167,11 @@ struct mt7697_set_listen_interval_req {
__be32 interval;
} __attribute__((packed, aligned(4)));
struct mt7697_reload_settings_req {
struct mt7697q_cmd_hdr cmd;
__be32 if_idx;
} __attribute__((packed, aligned(4)));
struct mt7697_scan_req {
struct mt7697q_cmd_hdr cmd;
__be32 if_idx;
......@@ -307,35 +275,27 @@ struct mt7697_rx_raw_packet {
u8 data[];
} __attribute__((packed, aligned(4)));
int mt7697_wr_init(struct mt7697_cfg80211_info*);
int mt7697_wr_reset(struct mt7697_cfg80211_info*);
int mt7697_wr_set_wireless_mode_req(struct mt7697_cfg80211_info*, u8, u8);
int mt7697_wr_get_wireless_mode_req(struct mt7697_cfg80211_info*, u8);
int mt7697_wr_set_pmk_req(struct mt7697_cfg80211_info*, u8, const u8[MT7697_WIFI_LENGTH_PMK]);
int mt7697_wr_set_channel_req(struct mt7697_cfg80211_info*, u8, u8);
int mt7697_wr_set_bssid_req(struct mt7697_cfg80211_info*, const u8[ETH_ALEN]);
int mt7697_wr_set_ssid_req(struct mt7697_cfg80211_info*, u8, u8, const u8[]);
int mt7697_wr_reload_settings_req(struct mt7697_cfg80211_info*);
int mt7697_wr_mac_addr_req(struct mt7697_cfg80211_info*, u8);
int mt7697_wr_cfg_req(struct mt7697_cfg80211_info*);
int mt7697_wr_reg_rx_hndlr_req(struct mt7697_cfg80211_info*);
int mt7697_wr_unreg_rx_hndlr_req(struct mt7697_cfg80211_info*);
int mt7697_wr_set_op_mode_req(struct mt7697_cfg80211_info*, u8);
int mt7697_wr_get_radio_state_req(struct mt7697_cfg80211_info*);
int mt7697_wr_set_radio_state_req(struct mt7697_cfg80211_info*, u8);
int mt7697_wr_get_rx_filter_req(struct mt7697_cfg80211_info*);
int mt7697_wr_set_rx_filter_req(struct mt7697_cfg80211_info*, u32);
int mt7697_wr_get_smart_conn_filter_req(struct mt7697_cfg80211_info*);
int mt7697_wr_set_smart_conn_filter_req(struct mt7697_cfg80211_info*, u8);
int mt7697_wr_get_listen_interval_req(struct mt7697_cfg80211_info*);
int mt7697_wr_set_listen_interval_req(struct mt7697_cfg80211_info*, u32);
int mt7697_wr_scan_req(struct mt7697_cfg80211_info*, u32,
const struct cfg80211_scan_request*);
int mt7697_wr_set_security_mode_req(struct mt7697_cfg80211_info*, u8, u8, u8);
int mt7697_wr_get_security_mode_req(struct mt7697_cfg80211_info*, u32, u8);
int mt7697_wr_scan_stop_req(struct mt7697_cfg80211_info*);
int mt7697_wr_disconnect_req(struct mt7697_cfg80211_info*, u32, const u8*);
int mt7697_wr_set_wireless_mode_req(const struct mt7697_cfg80211_info*, u8);
int mt7697_wr_get_wireless_mode_req(const struct mt7697_cfg80211_info*);
int mt7697_wr_set_pmk_req(const struct mt7697_cfg80211_info*,
const u8[MT7697_WIFI_LENGTH_PMK]);
int mt7697_wr_set_channel_req(const struct mt7697_cfg80211_info*, u8);
int mt7697_wr_set_bssid_req(const struct mt7697_cfg80211_info*, const u8[ETH_ALEN]);
int mt7697_wr_set_ssid_req(const struct mt7697_cfg80211_info*, u8, const u8[]);
int mt7697_wr_reload_settings_req(const struct mt7697_cfg80211_info*, u8);
int mt7697_wr_mac_addr_req(const struct mt7697_cfg80211_info*);
int mt7697_wr_cfg_req(const struct mt7697_cfg80211_info*);
int mt7697_wr_set_op_mode_req(const struct mt7697_cfg80211_info*);
int mt7697_wr_get_radio_state_req(const struct mt7697_cfg80211_info*);
int mt7697_wr_set_radio_state_req(const struct mt7697_cfg80211_info*, u8);
int mt7697_wr_get_listen_interval_req(const struct mt7697_cfg80211_info*);
int mt7697_wr_set_listen_interval_req(const struct mt7697_cfg80211_info*, u32);
int mt7697_wr_scan_req(const struct mt7697_cfg80211_info*, u32,
const struct cfg80211_scan_request*);
int mt7697_wr_set_security_mode_req(const struct mt7697_cfg80211_info*, u8, u8);
int mt7697_wr_get_security_mode_req(const struct mt7697_cfg80211_info*, u32);
int mt7697_wr_scan_stop_req(const struct mt7697_cfg80211_info*);
int mt7697_wr_disconnect_req(const struct mt7697_cfg80211_info*, u32, const u8*);
int mt7697_wr_tx_raw_packet(struct mt7697_cfg80211_info*, const u8*, u32);
int mt7697_proc_data(void*);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment