Commit 9c87758c authored by Stanislaw Gruszka's avatar Stanislaw Gruszka Committed by Kalle Valo

rt2x00: call sta_add/remove directly in rt2800

Only rt2800 subdriver of rt2x00 implement sta_add() and sta_remove(),
we do not need generic version of those.
Signed-off-by: default avatarStanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent f56324ba
...@@ -1557,12 +1557,13 @@ static void rt2800_set_max_psdu_len(struct rt2x00_dev *rt2x00dev) ...@@ -1557,12 +1557,13 @@ static void rt2800_set_max_psdu_len(struct rt2x00_dev *rt2x00dev)
rt2800_register_write(rt2x00dev, MAX_LEN_CFG, reg); rt2800_register_write(rt2x00dev, MAX_LEN_CFG, reg);
} }
int rt2800_sta_add(struct rt2x00_dev *rt2x00dev, struct ieee80211_vif *vif, int rt2800_sta_add(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
struct ieee80211_sta *sta) struct ieee80211_sta *sta)
{ {
int wcid; struct rt2x00_dev *rt2x00dev = hw->priv;
struct rt2x00_sta *sta_priv = sta_to_rt2x00_sta(sta);
struct rt2800_drv_data *drv_data = rt2x00dev->drv_data; struct rt2800_drv_data *drv_data = rt2x00dev->drv_data;
struct rt2x00_sta *sta_priv = sta_to_rt2x00_sta(sta);
int wcid;
/* /*
* Limit global maximum TX AMPDU length to smallest value of all * Limit global maximum TX AMPDU length to smallest value of all
...@@ -1608,8 +1609,10 @@ int rt2800_sta_add(struct rt2x00_dev *rt2x00dev, struct ieee80211_vif *vif, ...@@ -1608,8 +1609,10 @@ int rt2800_sta_add(struct rt2x00_dev *rt2x00dev, struct ieee80211_vif *vif,
} }
EXPORT_SYMBOL_GPL(rt2800_sta_add); EXPORT_SYMBOL_GPL(rt2800_sta_add);
int rt2800_sta_remove(struct rt2x00_dev *rt2x00dev, struct ieee80211_sta *sta) int rt2800_sta_remove(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
struct ieee80211_sta *sta)
{ {
struct rt2x00_dev *rt2x00dev = hw->priv;
struct rt2800_drv_data *drv_data = rt2x00dev->drv_data; struct rt2800_drv_data *drv_data = rt2x00dev->drv_data;
struct rt2x00_sta *sta_priv = sta_to_rt2x00_sta(sta); struct rt2x00_sta *sta_priv = sta_to_rt2x00_sta(sta);
int wcid = sta_priv->wcid; int wcid = sta_priv->wcid;
......
...@@ -208,9 +208,10 @@ int rt2800_config_shared_key(struct rt2x00_dev *rt2x00dev, ...@@ -208,9 +208,10 @@ int rt2800_config_shared_key(struct rt2x00_dev *rt2x00dev,
int rt2800_config_pairwise_key(struct rt2x00_dev *rt2x00dev, int rt2800_config_pairwise_key(struct rt2x00_dev *rt2x00dev,
struct rt2x00lib_crypto *crypto, struct rt2x00lib_crypto *crypto,
struct ieee80211_key_conf *key); struct ieee80211_key_conf *key);
int rt2800_sta_add(struct rt2x00_dev *rt2x00dev, struct ieee80211_vif *vif, int rt2800_sta_add(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
struct ieee80211_sta *sta);
int rt2800_sta_remove(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
struct ieee80211_sta *sta); struct ieee80211_sta *sta);
int rt2800_sta_remove(struct rt2x00_dev *rt2x00dev, struct ieee80211_sta *sta);
void rt2800_config_filter(struct rt2x00_dev *rt2x00dev, void rt2800_config_filter(struct rt2x00_dev *rt2x00dev,
const unsigned int filter_flags); const unsigned int filter_flags);
void rt2800_config_intf(struct rt2x00_dev *rt2x00dev, struct rt2x00_intf *intf, void rt2800_config_intf(struct rt2x00_dev *rt2x00dev, struct rt2x00_intf *intf,
......
...@@ -311,8 +311,8 @@ static const struct ieee80211_ops rt2800pci_mac80211_ops = { ...@@ -311,8 +311,8 @@ static const struct ieee80211_ops rt2800pci_mac80211_ops = {
.get_stats = rt2x00mac_get_stats, .get_stats = rt2x00mac_get_stats,
.get_key_seq = rt2800_get_key_seq, .get_key_seq = rt2800_get_key_seq,
.set_rts_threshold = rt2800_set_rts_threshold, .set_rts_threshold = rt2800_set_rts_threshold,
.sta_add = rt2x00mac_sta_add, .sta_add = rt2800_sta_add,
.sta_remove = rt2x00mac_sta_remove, .sta_remove = rt2800_sta_remove,
.bss_info_changed = rt2x00mac_bss_info_changed, .bss_info_changed = rt2x00mac_bss_info_changed,
.conf_tx = rt2800_conf_tx, .conf_tx = rt2800_conf_tx,
.get_tsf = rt2800_get_tsf, .get_tsf = rt2800_get_tsf,
...@@ -377,8 +377,6 @@ static const struct rt2x00lib_ops rt2800pci_rt2x00_ops = { ...@@ -377,8 +377,6 @@ static const struct rt2x00lib_ops rt2800pci_rt2x00_ops = {
.config_erp = rt2800_config_erp, .config_erp = rt2800_config_erp,
.config_ant = rt2800_config_ant, .config_ant = rt2800_config_ant,
.config = rt2800_config, .config = rt2800_config,
.sta_add = rt2800_sta_add,
.sta_remove = rt2800_sta_remove,
}; };
static const struct rt2x00_ops rt2800pci_ops = { static const struct rt2x00_ops rt2800pci_ops = {
......
...@@ -150,8 +150,8 @@ static const struct ieee80211_ops rt2800soc_mac80211_ops = { ...@@ -150,8 +150,8 @@ static const struct ieee80211_ops rt2800soc_mac80211_ops = {
.get_stats = rt2x00mac_get_stats, .get_stats = rt2x00mac_get_stats,
.get_key_seq = rt2800_get_key_seq, .get_key_seq = rt2800_get_key_seq,
.set_rts_threshold = rt2800_set_rts_threshold, .set_rts_threshold = rt2800_set_rts_threshold,
.sta_add = rt2x00mac_sta_add, .sta_add = rt2800_sta_add,
.sta_remove = rt2x00mac_sta_remove, .sta_remove = rt2800_sta_remove,
.bss_info_changed = rt2x00mac_bss_info_changed, .bss_info_changed = rt2x00mac_bss_info_changed,
.conf_tx = rt2800_conf_tx, .conf_tx = rt2800_conf_tx,
.get_tsf = rt2800_get_tsf, .get_tsf = rt2800_get_tsf,
...@@ -216,8 +216,6 @@ static const struct rt2x00lib_ops rt2800soc_rt2x00_ops = { ...@@ -216,8 +216,6 @@ static const struct rt2x00lib_ops rt2800soc_rt2x00_ops = {
.config_erp = rt2800_config_erp, .config_erp = rt2800_config_erp,
.config_ant = rt2800_config_ant, .config_ant = rt2800_config_ant,
.config = rt2800_config, .config = rt2800_config,
.sta_add = rt2800_sta_add,
.sta_remove = rt2800_sta_remove,
}; };
static const struct rt2x00_ops rt2800soc_ops = { static const struct rt2x00_ops rt2800soc_ops = {
......
...@@ -797,8 +797,8 @@ static const struct ieee80211_ops rt2800usb_mac80211_ops = { ...@@ -797,8 +797,8 @@ static const struct ieee80211_ops rt2800usb_mac80211_ops = {
.get_stats = rt2x00mac_get_stats, .get_stats = rt2x00mac_get_stats,
.get_key_seq = rt2800_get_key_seq, .get_key_seq = rt2800_get_key_seq,
.set_rts_threshold = rt2800_set_rts_threshold, .set_rts_threshold = rt2800_set_rts_threshold,
.sta_add = rt2x00mac_sta_add, .sta_add = rt2800_sta_add,
.sta_remove = rt2x00mac_sta_remove, .sta_remove = rt2800_sta_remove,
.bss_info_changed = rt2x00mac_bss_info_changed, .bss_info_changed = rt2x00mac_bss_info_changed,
.conf_tx = rt2800_conf_tx, .conf_tx = rt2800_conf_tx,
.get_tsf = rt2800_get_tsf, .get_tsf = rt2800_get_tsf,
...@@ -858,8 +858,6 @@ static const struct rt2x00lib_ops rt2800usb_rt2x00_ops = { ...@@ -858,8 +858,6 @@ static const struct rt2x00lib_ops rt2800usb_rt2x00_ops = {
.config_erp = rt2800_config_erp, .config_erp = rt2800_config_erp,
.config_ant = rt2800_config_ant, .config_ant = rt2800_config_ant,
.config = rt2800_config, .config = rt2800_config,
.sta_add = rt2800_sta_add,
.sta_remove = rt2800_sta_remove,
}; };
static void rt2800usb_queue_init(struct data_queue *queue) static void rt2800usb_queue_init(struct data_queue *queue)
......
...@@ -1457,10 +1457,6 @@ int rt2x00mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, ...@@ -1457,10 +1457,6 @@ int rt2x00mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
#else #else
#define rt2x00mac_set_key NULL #define rt2x00mac_set_key NULL
#endif /* CONFIG_RT2X00_LIB_CRYPTO */ #endif /* CONFIG_RT2X00_LIB_CRYPTO */
int rt2x00mac_sta_add(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
struct ieee80211_sta *sta);
int rt2x00mac_sta_remove(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
struct ieee80211_sta *sta);
void rt2x00mac_sw_scan_start(struct ieee80211_hw *hw, void rt2x00mac_sw_scan_start(struct ieee80211_hw *hw,
struct ieee80211_vif *vif, struct ieee80211_vif *vif,
const u8 *mac_addr); const u8 *mac_addr);
......
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