mac80211: make retry limits part of hw config
Instead of having a separate callback, use the HW config callback with a new flag to change retry limits. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
此提交包含在:
@@ -1574,7 +1574,6 @@ static const struct ieee80211_ops rt2400pci_mac80211_ops = {
|
||||
.config_interface = rt2x00mac_config_interface,
|
||||
.configure_filter = rt2x00mac_configure_filter,
|
||||
.get_stats = rt2x00mac_get_stats,
|
||||
.set_retry_limit = rt2400pci_set_retry_limit,
|
||||
.bss_info_changed = rt2x00mac_bss_info_changed,
|
||||
.conf_tx = rt2400pci_conf_tx,
|
||||
.get_tx_stats = rt2x00mac_get_tx_stats,
|
||||
@@ -1603,6 +1602,7 @@ static const struct rt2x00lib_ops rt2400pci_rt2x00_ops = {
|
||||
.config_intf = rt2400pci_config_intf,
|
||||
.config_erp = rt2400pci_config_erp,
|
||||
.config = rt2400pci_config,
|
||||
.set_retry_limit = rt2400pci_set_retry_limit,
|
||||
};
|
||||
|
||||
static const struct data_queue_desc rt2400pci_queue_rx = {
|
||||
|
@@ -1874,7 +1874,6 @@ static const struct ieee80211_ops rt2500pci_mac80211_ops = {
|
||||
.config_interface = rt2x00mac_config_interface,
|
||||
.configure_filter = rt2x00mac_configure_filter,
|
||||
.get_stats = rt2x00mac_get_stats,
|
||||
.set_retry_limit = rt2500pci_set_retry_limit,
|
||||
.bss_info_changed = rt2x00mac_bss_info_changed,
|
||||
.conf_tx = rt2x00mac_conf_tx,
|
||||
.get_tx_stats = rt2x00mac_get_tx_stats,
|
||||
@@ -1903,6 +1902,7 @@ static const struct rt2x00lib_ops rt2500pci_rt2x00_ops = {
|
||||
.config_intf = rt2500pci_config_intf,
|
||||
.config_erp = rt2500pci_config_erp,
|
||||
.config = rt2500pci_config,
|
||||
.set_retry_limit = rt2500pci_set_retry_limit,
|
||||
};
|
||||
|
||||
static const struct data_queue_desc rt2500pci_queue_rx = {
|
||||
|
@@ -599,6 +599,9 @@ struct rt2x00lib_ops {
|
||||
#define CONFIG_UPDATE_SLOT_TIME ( 1 << 5 )
|
||||
#define CONFIG_UPDATE_BEACON_INT ( 1 << 6 )
|
||||
#define CONFIG_UPDATE_ALL 0xffff
|
||||
|
||||
int (*set_retry_limit) (struct ieee80211_hw *hw,
|
||||
u32 short_limit, u32 long_limit);
|
||||
};
|
||||
|
||||
/*
|
||||
|
@@ -349,6 +349,15 @@ int rt2x00mac_config(struct ieee80211_hw *hw, u32 changed)
|
||||
if (!test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags))
|
||||
return 0;
|
||||
|
||||
if (changed & IEEE80211_CONF_CHANGE_RETRY_LIMITS) {
|
||||
rt2x00dev->ops->lib->set_retry_limit(hw,
|
||||
conf->short_frame_max_tx_count,
|
||||
conf->long_frame_max_tx_count);
|
||||
}
|
||||
changed &= ~IEEE80211_CONF_CHANGE_RETRY_LIMITS;
|
||||
if (!changed)
|
||||
return 0;
|
||||
|
||||
/*
|
||||
* Only change device state when the radio is enabled. It does not
|
||||
* matter what parameters we have configured when the radio is disabled
|
||||
|
@@ -2724,7 +2724,6 @@ static const struct ieee80211_ops rt61pci_mac80211_ops = {
|
||||
.configure_filter = rt2x00mac_configure_filter,
|
||||
.set_key = rt2x00mac_set_key,
|
||||
.get_stats = rt2x00mac_get_stats,
|
||||
.set_retry_limit = rt61pci_set_retry_limit,
|
||||
.bss_info_changed = rt2x00mac_bss_info_changed,
|
||||
.conf_tx = rt61pci_conf_tx,
|
||||
.get_tx_stats = rt2x00mac_get_tx_stats,
|
||||
@@ -2757,6 +2756,7 @@ static const struct rt2x00lib_ops rt61pci_rt2x00_ops = {
|
||||
.config_intf = rt61pci_config_intf,
|
||||
.config_erp = rt61pci_config_erp,
|
||||
.config = rt61pci_config,
|
||||
.set_retry_limit = rt61pci_set_retry_limit,
|
||||
};
|
||||
|
||||
static const struct data_queue_desc rt61pci_queue_rx = {
|
||||
|
@@ -2315,7 +2315,6 @@ static const struct ieee80211_ops rt73usb_mac80211_ops = {
|
||||
.configure_filter = rt2x00mac_configure_filter,
|
||||
.set_key = rt2x00mac_set_key,
|
||||
.get_stats = rt2x00mac_get_stats,
|
||||
.set_retry_limit = rt73usb_set_retry_limit,
|
||||
.bss_info_changed = rt2x00mac_bss_info_changed,
|
||||
.conf_tx = rt73usb_conf_tx,
|
||||
.get_tx_stats = rt2x00mac_get_tx_stats,
|
||||
@@ -2347,6 +2346,7 @@ static const struct rt2x00lib_ops rt73usb_rt2x00_ops = {
|
||||
.config_intf = rt73usb_config_intf,
|
||||
.config_erp = rt73usb_config_erp,
|
||||
.config = rt73usb_config,
|
||||
.set_retry_limit = rt73usb_set_retry_limit,
|
||||
};
|
||||
|
||||
static const struct data_queue_desc rt73usb_queue_rx = {
|
||||
|
新增問題並參考
封鎖使用者