mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
wifi: mac80211: simplify non-chanctx drivers
There are still surprisingly many non-chanctx drivers, but in mac80211 that code is a bit awkward. Simplify this by having those drivers assign 'emulated' ops, so that the mac80211 code can be more unified between non-chanctx/chanctx drivers. This cuts the number of places caring about it by about 15, which are scattered across - now they're fewer and no longer in the channel context handling. Link: https://msgid.link/20240129194108.6d0ead50f5cf.I60d093b2fc81ca1853925a4d0ac3a2337d5baa5b@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
@@ -1759,6 +1759,10 @@ static int adm8211_alloc_rings(struct ieee80211_hw *dev)
|
||||
}
|
||||
|
||||
static const struct ieee80211_ops adm8211_ops = {
|
||||
.add_chanctx = ieee80211_emulate_add_chanctx,
|
||||
.remove_chanctx = ieee80211_emulate_remove_chanctx,
|
||||
.change_chanctx = ieee80211_emulate_change_chanctx,
|
||||
.switch_vif_chanctx = ieee80211_emulate_switch_vif_chanctx,
|
||||
.tx = adm8211_tx,
|
||||
.wake_tx_queue = ieee80211_handle_wake_tx_queue,
|
||||
.start = adm8211_start,
|
||||
|
||||
@@ -1358,6 +1358,10 @@ static void ar5523_configure_filter(struct ieee80211_hw *hw,
|
||||
}
|
||||
|
||||
static const struct ieee80211_ops ar5523_ops = {
|
||||
.add_chanctx = ieee80211_emulate_add_chanctx,
|
||||
.remove_chanctx = ieee80211_emulate_remove_chanctx,
|
||||
.change_chanctx = ieee80211_emulate_change_chanctx,
|
||||
.switch_vif_chanctx = ieee80211_emulate_switch_vif_chanctx,
|
||||
.start = ar5523_start,
|
||||
.stop = ar5523_stop,
|
||||
.tx = ar5523_tx,
|
||||
|
||||
@@ -779,6 +779,10 @@ static int ath5k_set_ringparam(struct ieee80211_hw *hw, u32 tx, u32 rx)
|
||||
|
||||
|
||||
const struct ieee80211_ops ath5k_hw_ops = {
|
||||
.add_chanctx = ieee80211_emulate_add_chanctx,
|
||||
.remove_chanctx = ieee80211_emulate_remove_chanctx,
|
||||
.change_chanctx = ieee80211_emulate_change_chanctx,
|
||||
.switch_vif_chanctx = ieee80211_emulate_switch_vif_chanctx,
|
||||
.tx = ath5k_tx,
|
||||
.wake_tx_queue = ieee80211_handle_wake_tx_queue,
|
||||
.start = ath5k_start,
|
||||
|
||||
@@ -1868,6 +1868,10 @@ static void ath9k_htc_channel_switch_beacon(struct ieee80211_hw *hw,
|
||||
}
|
||||
|
||||
struct ieee80211_ops ath9k_htc_ops = {
|
||||
.add_chanctx = ieee80211_emulate_add_chanctx,
|
||||
.remove_chanctx = ieee80211_emulate_remove_chanctx,
|
||||
.change_chanctx = ieee80211_emulate_change_chanctx,
|
||||
.switch_vif_chanctx = ieee80211_emulate_switch_vif_chanctx,
|
||||
.tx = ath9k_htc_tx,
|
||||
.wake_tx_queue = ieee80211_handle_wake_tx_queue,
|
||||
.start = ath9k_htc_start,
|
||||
|
||||
@@ -2786,6 +2786,10 @@ static int ath9k_get_txpower(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
|
||||
}
|
||||
|
||||
struct ieee80211_ops ath9k_ops = {
|
||||
.add_chanctx = ieee80211_emulate_add_chanctx,
|
||||
.remove_chanctx = ieee80211_emulate_remove_chanctx,
|
||||
.change_chanctx = ieee80211_emulate_change_chanctx,
|
||||
.switch_vif_chanctx = ieee80211_emulate_switch_vif_chanctx,
|
||||
.tx = ath9k_tx,
|
||||
.start = ath9k_start,
|
||||
.stop = ath9k_stop,
|
||||
|
||||
@@ -1712,6 +1712,10 @@ static bool carl9170_tx_frames_pending(struct ieee80211_hw *hw)
|
||||
}
|
||||
|
||||
static const struct ieee80211_ops carl9170_ops = {
|
||||
.add_chanctx = ieee80211_emulate_add_chanctx,
|
||||
.remove_chanctx = ieee80211_emulate_remove_chanctx,
|
||||
.change_chanctx = ieee80211_emulate_change_chanctx,
|
||||
.switch_vif_chanctx = ieee80211_emulate_switch_vif_chanctx,
|
||||
.start = carl9170_op_start,
|
||||
.stop = carl9170_op_stop,
|
||||
.tx = carl9170_op_tx,
|
||||
|
||||
@@ -1347,6 +1347,10 @@ static void wcn36xx_sta_statistics(struct ieee80211_hw *hw, struct ieee80211_vif
|
||||
}
|
||||
|
||||
static const struct ieee80211_ops wcn36xx_ops = {
|
||||
.add_chanctx = ieee80211_emulate_add_chanctx,
|
||||
.remove_chanctx = ieee80211_emulate_remove_chanctx,
|
||||
.change_chanctx = ieee80211_emulate_change_chanctx,
|
||||
.switch_vif_chanctx = ieee80211_emulate_switch_vif_chanctx,
|
||||
.start = wcn36xx_start,
|
||||
.stop = wcn36xx_stop,
|
||||
.add_interface = wcn36xx_add_interface,
|
||||
|
||||
@@ -2178,6 +2178,10 @@ static int at76_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
|
||||
}
|
||||
|
||||
static const struct ieee80211_ops at76_ops = {
|
||||
.add_chanctx = ieee80211_emulate_add_chanctx,
|
||||
.remove_chanctx = ieee80211_emulate_remove_chanctx,
|
||||
.change_chanctx = ieee80211_emulate_change_chanctx,
|
||||
.switch_vif_chanctx = ieee80211_emulate_switch_vif_chanctx,
|
||||
.tx = at76_mac80211_tx,
|
||||
.wake_tx_queue = ieee80211_handle_wake_tx_queue,
|
||||
.add_interface = at76_add_interface,
|
||||
|
||||
@@ -5172,6 +5172,10 @@ static int b43_op_get_survey(struct ieee80211_hw *hw, int idx,
|
||||
}
|
||||
|
||||
static const struct ieee80211_ops b43_hw_ops = {
|
||||
.add_chanctx = ieee80211_emulate_add_chanctx,
|
||||
.remove_chanctx = ieee80211_emulate_remove_chanctx,
|
||||
.change_chanctx = ieee80211_emulate_change_chanctx,
|
||||
.switch_vif_chanctx = ieee80211_emulate_switch_vif_chanctx,
|
||||
.tx = b43_op_tx,
|
||||
.wake_tx_queue = ieee80211_handle_wake_tx_queue,
|
||||
.conf_tx = b43_op_conf_tx,
|
||||
|
||||
@@ -3531,6 +3531,10 @@ static int b43legacy_op_get_survey(struct ieee80211_hw *hw, int idx,
|
||||
}
|
||||
|
||||
static const struct ieee80211_ops b43legacy_hw_ops = {
|
||||
.add_chanctx = ieee80211_emulate_add_chanctx,
|
||||
.remove_chanctx = ieee80211_emulate_remove_chanctx,
|
||||
.change_chanctx = ieee80211_emulate_change_chanctx,
|
||||
.switch_vif_chanctx = ieee80211_emulate_switch_vif_chanctx,
|
||||
.tx = b43legacy_op_tx,
|
||||
.wake_tx_queue = ieee80211_handle_wake_tx_queue,
|
||||
.conf_tx = b43legacy_op_conf_tx,
|
||||
|
||||
@@ -959,6 +959,10 @@ static int brcms_ops_beacon_set_tim(struct ieee80211_hw *hw,
|
||||
}
|
||||
|
||||
static const struct ieee80211_ops brcms_ops = {
|
||||
.add_chanctx = ieee80211_emulate_add_chanctx,
|
||||
.remove_chanctx = ieee80211_emulate_remove_chanctx,
|
||||
.change_chanctx = ieee80211_emulate_change_chanctx,
|
||||
.switch_vif_chanctx = ieee80211_emulate_switch_vif_chanctx,
|
||||
.tx = brcms_ops_tx,
|
||||
.wake_tx_queue = ieee80211_handle_wake_tx_queue,
|
||||
.start = brcms_ops_start,
|
||||
|
||||
@@ -3432,6 +3432,10 @@ static const struct attribute_group il3945_attribute_group = {
|
||||
};
|
||||
|
||||
static struct ieee80211_ops il3945_mac_ops __ro_after_init = {
|
||||
.add_chanctx = ieee80211_emulate_add_chanctx,
|
||||
.remove_chanctx = ieee80211_emulate_remove_chanctx,
|
||||
.change_chanctx = ieee80211_emulate_change_chanctx,
|
||||
.switch_vif_chanctx = ieee80211_emulate_switch_vif_chanctx,
|
||||
.tx = il3945_mac_tx,
|
||||
.wake_tx_queue = ieee80211_handle_wake_tx_queue,
|
||||
.start = il3945_mac_start,
|
||||
|
||||
@@ -6301,6 +6301,10 @@ il4965_tx_queue_set_status(struct il_priv *il, struct il_tx_queue *txq,
|
||||
}
|
||||
|
||||
static const struct ieee80211_ops il4965_mac_ops = {
|
||||
.add_chanctx = ieee80211_emulate_add_chanctx,
|
||||
.remove_chanctx = ieee80211_emulate_remove_chanctx,
|
||||
.change_chanctx = ieee80211_emulate_change_chanctx,
|
||||
.switch_vif_chanctx = ieee80211_emulate_switch_vif_chanctx,
|
||||
.tx = il4965_mac_tx,
|
||||
.wake_tx_queue = ieee80211_handle_wake_tx_queue,
|
||||
.start = il4965_mac_start,
|
||||
|
||||
@@ -1570,6 +1570,10 @@ static void iwlagn_mac_sta_notify(struct ieee80211_hw *hw,
|
||||
}
|
||||
|
||||
const struct ieee80211_ops iwlagn_hw_ops = {
|
||||
.add_chanctx = ieee80211_emulate_add_chanctx,
|
||||
.remove_chanctx = ieee80211_emulate_remove_chanctx,
|
||||
.change_chanctx = ieee80211_emulate_change_chanctx,
|
||||
.switch_vif_chanctx = ieee80211_emulate_switch_vif_chanctx,
|
||||
.tx = iwlagn_mac_tx,
|
||||
.wake_tx_queue = ieee80211_handle_wake_tx_queue,
|
||||
.start = iwlagn_mac_start,
|
||||
|
||||
@@ -704,6 +704,10 @@ static void p54_set_coverage_class(struct ieee80211_hw *dev,
|
||||
}
|
||||
|
||||
static const struct ieee80211_ops p54_ops = {
|
||||
.add_chanctx = ieee80211_emulate_add_chanctx,
|
||||
.remove_chanctx = ieee80211_emulate_remove_chanctx,
|
||||
.change_chanctx = ieee80211_emulate_change_chanctx,
|
||||
.switch_vif_chanctx = ieee80211_emulate_switch_vif_chanctx,
|
||||
.tx = p54_tx_80211,
|
||||
.wake_tx_queue = ieee80211_handle_wake_tx_queue,
|
||||
.start = p54_start,
|
||||
|
||||
@@ -473,6 +473,10 @@ static int lbtf_op_get_survey(struct ieee80211_hw *hw, int idx,
|
||||
}
|
||||
|
||||
static const struct ieee80211_ops lbtf_ops = {
|
||||
.add_chanctx = ieee80211_emulate_add_chanctx,
|
||||
.remove_chanctx = ieee80211_emulate_remove_chanctx,
|
||||
.change_chanctx = ieee80211_emulate_change_chanctx,
|
||||
.switch_vif_chanctx = ieee80211_emulate_switch_vif_chanctx,
|
||||
.tx = lbtf_op_tx,
|
||||
.wake_tx_queue = ieee80211_handle_wake_tx_queue,
|
||||
.start = lbtf_op_start,
|
||||
|
||||
@@ -5610,6 +5610,10 @@ static void mwl8k_sw_scan_complete(struct ieee80211_hw *hw,
|
||||
}
|
||||
|
||||
static const struct ieee80211_ops mwl8k_ops = {
|
||||
.add_chanctx = ieee80211_emulate_add_chanctx,
|
||||
.remove_chanctx = ieee80211_emulate_remove_chanctx,
|
||||
.change_chanctx = ieee80211_emulate_change_chanctx,
|
||||
.switch_vif_chanctx = ieee80211_emulate_switch_vif_chanctx,
|
||||
.tx = mwl8k_tx,
|
||||
.wake_tx_queue = ieee80211_handle_wake_tx_queue,
|
||||
.start = mwl8k_start,
|
||||
|
||||
@@ -701,6 +701,10 @@ static void mt7603_tx(struct ieee80211_hw *hw,
|
||||
}
|
||||
|
||||
const struct ieee80211_ops mt7603_ops = {
|
||||
.add_chanctx = ieee80211_emulate_add_chanctx,
|
||||
.remove_chanctx = ieee80211_emulate_remove_chanctx,
|
||||
.change_chanctx = ieee80211_emulate_change_chanctx,
|
||||
.switch_vif_chanctx = ieee80211_emulate_switch_vif_chanctx,
|
||||
.tx = mt7603_tx,
|
||||
.start = mt7603_start,
|
||||
.stop = mt7603_stop,
|
||||
|
||||
@@ -59,6 +59,10 @@ mt76x0e_flush(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
|
||||
}
|
||||
|
||||
static const struct ieee80211_ops mt76x0e_ops = {
|
||||
.add_chanctx = ieee80211_emulate_add_chanctx,
|
||||
.remove_chanctx = ieee80211_emulate_remove_chanctx,
|
||||
.change_chanctx = ieee80211_emulate_change_chanctx,
|
||||
.switch_vif_chanctx = ieee80211_emulate_switch_vif_chanctx,
|
||||
.tx = mt76x02_tx,
|
||||
.start = mt76x0e_start,
|
||||
.stop = mt76x0e_stop,
|
||||
|
||||
@@ -118,6 +118,10 @@ static int mt76x0u_start(struct ieee80211_hw *hw)
|
||||
}
|
||||
|
||||
static const struct ieee80211_ops mt76x0u_ops = {
|
||||
.add_chanctx = ieee80211_emulate_add_chanctx,
|
||||
.remove_chanctx = ieee80211_emulate_remove_chanctx,
|
||||
.change_chanctx = ieee80211_emulate_change_chanctx,
|
||||
.switch_vif_chanctx = ieee80211_emulate_switch_vif_chanctx,
|
||||
.tx = mt76x02_tx,
|
||||
.start = mt76x0u_start,
|
||||
.stop = mt76x0u_stop,
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user