forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-10-22 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5
kernel/drivers/net/wireless/ath/ath9k/htc_drv_init.c
....@@ -463,7 +463,7 @@
463463 atomic_inc(&priv->wmi->m_rmw_cnt);
464464 }
465465
466
-static u32 ath9k_reg_rmw_single(void *hw_priv,
466
+static void ath9k_reg_rmw_single(void *hw_priv,
467467 u32 reg_offset, u32 set, u32 clr)
468468 {
469469 struct ath_hw *ah = hw_priv;
....@@ -471,7 +471,6 @@
471471 struct ath9k_htc_priv *priv = (struct ath9k_htc_priv *) common->priv;
472472 struct register_rmw buf, buf_ret;
473473 int ret;
474
- u32 val = 0;
475474
476475 buf.reg = cpu_to_be32(reg_offset);
477476 buf.set = cpu_to_be32(set);
....@@ -485,7 +484,6 @@
485484 ath_dbg(common, WMI, "REGISTER RMW FAILED:(0x%04x, %d)\n",
486485 reg_offset, ret);
487486 }
488
- return val;
489487 }
490488
491489 static u32 ath9k_reg_rmw(void *hw_priv, u32 reg_offset, u32 set, u32 clr)
....@@ -647,10 +645,8 @@
647645 spin_lock_init(&priv->tx.tx_lock);
648646 mutex_init(&priv->mutex);
649647 mutex_init(&priv->htc_pm_lock);
650
- tasklet_init(&priv->rx_tasklet, ath9k_rx_tasklet,
651
- (unsigned long)priv);
652
- tasklet_init(&priv->tx_failed_tasklet, ath9k_tx_failed_tasklet,
653
- (unsigned long)priv);
648
+ tasklet_setup(&priv->rx_tasklet, ath9k_rx_tasklet);
649
+ tasklet_setup(&priv->tx_failed_tasklet, ath9k_tx_failed_tasklet);
654650 INIT_DELAYED_WORK(&priv->ani_work, ath9k_htc_ani_work);
655651 INIT_WORK(&priv->ps_work, ath9k_ps_work);
656652 INIT_WORK(&priv->fatal_work, ath9k_fatal_work);
....@@ -782,6 +778,8 @@
782778 SET_IEEE80211_PERM_ADDR(hw, common->macaddr);
783779
784780 wiphy_ext_feature_set(hw->wiphy, NL80211_EXT_FEATURE_CQM_RSSI_LIST);
781
+ wiphy_ext_feature_set(hw->wiphy,
782
+ NL80211_EXT_FEATURE_MULTICAST_REGISTRATIONS);
785783 }
786784
787785 static int ath9k_init_firmware_version(struct ath9k_htc_priv *priv)
....@@ -946,7 +944,6 @@
946944 priv->hw = hw;
947945 priv->htc = htc_handle;
948946 priv->dev = dev;
949
- htc_handle->drv_priv = priv;
950947 SET_IEEE80211_DEV(hw, priv->dev);
951948
952949 ret = ath9k_htc_wait_for_target(priv);
....@@ -967,13 +964,15 @@
967964 if (ret)
968965 goto err_init;
969966
967
+ htc_handle->drv_priv = priv;
968
+
970969 return 0;
971970
972971 err_init:
973972 ath9k_stop_wmi(priv);
974973 hif_dev = (struct hif_device_usb *)htc_handle->hif_dev;
975974 ath9k_hif_usb_dealloc_urbs(hif_dev);
976
- ath9k_destoy_wmi(priv);
975
+ ath9k_destroy_wmi(priv);
977976 err_free:
978977 ieee80211_free_hw(hw);
979978 return ret;
....@@ -989,6 +988,8 @@
989988
990989 ath9k_deinit_device(htc_handle->drv_priv);
991990 ath9k_stop_wmi(htc_handle->drv_priv);
991
+ ath9k_hif_usb_dealloc_urbs((struct hif_device_usb *)htc_handle->hif_dev);
992
+ ath9k_destroy_wmi(htc_handle->drv_priv);
992993 ieee80211_free_hw(htc_handle->drv_priv->hw);
993994 }
994995 }