From e54def4ad8144ab15f826416e2e0f290ef1901b4 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 19 Jun 2024 23:00:30 +0200 Subject: Adding upstream version 6.9.2. Signed-off-by: Daniel Baumann --- drivers/staging/vt6655/card.c | 74 ++++++++++++++++++------------------ drivers/staging/vt6655/device_main.c | 6 ++- drivers/staging/vt6655/rxtx.h | 1 - 3 files changed, 42 insertions(+), 39 deletions(-) (limited to 'drivers/staging/vt6655') diff --git a/drivers/staging/vt6655/card.c b/drivers/staging/vt6655/card.c index 36183f2a64..688c870d89 100644 --- a/drivers/staging/vt6655/card.c +++ b/drivers/staging/vt6655/card.c @@ -81,9 +81,9 @@ static void vt6655_mac_set_bb_type(void __iomem *iobase, u32 mask) * Return Value: none */ static void calculate_ofdmr_parameter(unsigned char rate, - u8 bb_type, - unsigned char *tx_rate, - unsigned char *rsv_time) + u8 bb_type, + unsigned char *tx_rate, + unsigned char *rsv_time) { switch (rate) { case RATE_6M: @@ -288,7 +288,7 @@ bool card_set_phy_parameter(struct vnt_private *priv, u8 bb_type) * Return Value: none */ bool card_update_tsf(struct vnt_private *priv, unsigned char rx_rate, - u64 bss_timestamp) + u64 bss_timestamp) { u64 local_tsf; u64 tsf_offset = 0; @@ -297,7 +297,7 @@ bool card_update_tsf(struct vnt_private *priv, unsigned char rx_rate, if (bss_timestamp != local_tsf) { tsf_offset = card_get_tsf_offset(rx_rate, bss_timestamp, - local_tsf); + local_tsf); /* adjust TSF, HW's TSF add TSF Offset reg */ tsf_offset = le64_to_cpu(tsf_offset); iowrite32((u32)tsf_offset, priv->port_offset + MAC_REG_TSFOFST); @@ -321,7 +321,7 @@ bool card_update_tsf(struct vnt_private *priv, unsigned char rx_rate, * Return Value: true if succeed; otherwise false */ bool card_set_beacon_period(struct vnt_private *priv, - unsigned short beacon_interval) + unsigned short beacon_interval) { u64 next_tbtt; @@ -586,61 +586,61 @@ void card_set_rspinf(struct vnt_private *priv, u8 bb_type) /* RSPINF_a_6 */ calculate_ofdmr_parameter(RATE_6M, - bb_type, - &byTxRate, - &byRsvTime); + bb_type, + &byTxRate, + &byRsvTime); iowrite16(MAKEWORD(byTxRate, byRsvTime), priv->port_offset + MAC_REG_RSPINF_A_6); /* RSPINF_a_9 */ calculate_ofdmr_parameter(RATE_9M, - bb_type, - &byTxRate, - &byRsvTime); + bb_type, + &byTxRate, + &byRsvTime); iowrite16(MAKEWORD(byTxRate, byRsvTime), priv->port_offset + MAC_REG_RSPINF_A_9); /* RSPINF_a_12 */ calculate_ofdmr_parameter(RATE_12M, - bb_type, - &byTxRate, - &byRsvTime); + bb_type, + &byTxRate, + &byRsvTime); iowrite16(MAKEWORD(byTxRate, byRsvTime), priv->port_offset + MAC_REG_RSPINF_A_12); /* RSPINF_a_18 */ calculate_ofdmr_parameter(RATE_18M, - bb_type, - &byTxRate, - &byRsvTime); + bb_type, + &byTxRate, + &byRsvTime); iowrite16(MAKEWORD(byTxRate, byRsvTime), priv->port_offset + MAC_REG_RSPINF_A_18); /* RSPINF_a_24 */ calculate_ofdmr_parameter(RATE_24M, - bb_type, - &byTxRate, - &byRsvTime); + bb_type, + &byTxRate, + &byRsvTime); iowrite16(MAKEWORD(byTxRate, byRsvTime), priv->port_offset + MAC_REG_RSPINF_A_24); /* RSPINF_a_36 */ calculate_ofdmr_parameter(CARDwGetOFDMControlRate((void *)priv, - RATE_36M), - bb_type, - &byTxRate, - &byRsvTime); + RATE_36M), + bb_type, + &byTxRate, + &byRsvTime); iowrite16(MAKEWORD(byTxRate, byRsvTime), priv->port_offset + MAC_REG_RSPINF_A_36); /* RSPINF_a_48 */ calculate_ofdmr_parameter(CARDwGetOFDMControlRate((void *)priv, - RATE_48M), - bb_type, - &byTxRate, - &byRsvTime); + RATE_48M), + bb_type, + &byTxRate, + &byRsvTime); iowrite16(MAKEWORD(byTxRate, byRsvTime), priv->port_offset + MAC_REG_RSPINF_A_48); /* RSPINF_a_54 */ calculate_ofdmr_parameter(CARDwGetOFDMControlRate((void *)priv, - RATE_54M), - bb_type, - &byTxRate, - &byRsvTime); + RATE_54M), + bb_type, + &byTxRate, + &byRsvTime); iowrite16(MAKEWORD(byTxRate, byRsvTime), priv->port_offset + MAC_REG_RSPINF_A_54); /* RSPINF_a_72 */ calculate_ofdmr_parameter(CARDwGetOFDMControlRate((void *)priv, - RATE_54M), - bb_type, - &byTxRate, - &byRsvTime); + RATE_54M), + bb_type, + &byTxRate, + &byRsvTime); iowrite16(MAKEWORD(byTxRate, byRsvTime), priv->port_offset + MAC_REG_RSPINF_A_72); /* Set to Page0 */ VT6655_MAC_SELECT_PAGE0(priv->port_offset); diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c index b0b262de64..283804b49e 100644 --- a/drivers/staging/vt6655/device_main.c +++ b/drivers/staging/vt6655/device_main.c @@ -1515,7 +1515,7 @@ static void vnt_bss_info_changed(struct ieee80211_hw *hw, if (changed & BSS_CHANGED_TXPOWER) RFbSetPower(priv, priv->wCurrentRate, - conf->chandef.chan->hw_value); + conf->chanreq.oper.chan->hw_value); if (changed & BSS_CHANGED_BEACON_ENABLED) { dev_dbg(&priv->pcid->dev, @@ -1684,6 +1684,10 @@ static void vnt_reset_tsf(struct ieee80211_hw *hw, struct ieee80211_vif *vif) } static const struct ieee80211_ops vnt_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 = vnt_tx_80211, .wake_tx_queue = ieee80211_handle_wake_tx_queue, .start = vnt_start, diff --git a/drivers/staging/vt6655/rxtx.h b/drivers/staging/vt6655/rxtx.h index a67757c9bb..be1e5180d5 100644 --- a/drivers/staging/vt6655/rxtx.h +++ b/drivers/staging/vt6655/rxtx.h @@ -19,7 +19,6 @@ #define DEFAULT_MSDU_LIFETIME_RES_64us 8000 /* 64us */ #define DEFAULT_MGN_LIFETIME_RES_64us 125 /* 64us */ - /*--------------------- Export Definitions -------------------------*/ /*--------------------- Export Variables --------------------------*/ -- cgit v1.2.3