forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-02-19 1c055e55a242a33e574e48be530e06770a210dcd
kernel/drivers/net/wireless/ath/wcn36xx/main.c
....@@ -39,10 +39,10 @@
3939 .max_power = 25, \
4040 }
4141
42
-#define CHAN5G(_freq, _idx) { \
42
+#define CHAN5G(_freq, _idx, _phy_val) { \
4343 .band = NL80211_BAND_5GHZ, \
4444 .center_freq = (_freq), \
45
- .hw_value = (_idx), \
45
+ .hw_value = (_phy_val) << HW_VALUE_PHY_SHIFT | HW_VALUE_CHANNEL(_idx), \
4646 .max_power = 25, \
4747 }
4848
....@@ -67,29 +67,29 @@
6767 };
6868
6969 static struct ieee80211_channel wcn_5ghz_channels[] = {
70
- CHAN5G(5180, 36),
71
- CHAN5G(5200, 40),
72
- CHAN5G(5220, 44),
73
- CHAN5G(5240, 48),
74
- CHAN5G(5260, 52),
75
- CHAN5G(5280, 56),
76
- CHAN5G(5300, 60),
77
- CHAN5G(5320, 64),
78
- CHAN5G(5500, 100),
79
- CHAN5G(5520, 104),
80
- CHAN5G(5540, 108),
81
- CHAN5G(5560, 112),
82
- CHAN5G(5580, 116),
83
- CHAN5G(5600, 120),
84
- CHAN5G(5620, 124),
85
- CHAN5G(5640, 128),
86
- CHAN5G(5660, 132),
87
- CHAN5G(5700, 140),
88
- CHAN5G(5745, 149),
89
- CHAN5G(5765, 153),
90
- CHAN5G(5785, 157),
91
- CHAN5G(5805, 161),
92
- CHAN5G(5825, 165)
70
+ CHAN5G(5180, 36, PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_LOW),
71
+ CHAN5G(5200, 40, PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_LOW),
72
+ CHAN5G(5220, 44, PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_HIGH),
73
+ CHAN5G(5240, 48, PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_HIGH),
74
+ CHAN5G(5260, 52, PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_LOW),
75
+ CHAN5G(5280, 56, PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_LOW),
76
+ CHAN5G(5300, 60, PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_HIGH),
77
+ CHAN5G(5320, 64, PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_HIGH),
78
+ CHAN5G(5500, 100, PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_LOW),
79
+ CHAN5G(5520, 104, PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_LOW),
80
+ CHAN5G(5540, 108, PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_HIGH),
81
+ CHAN5G(5560, 112, PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_HIGH),
82
+ CHAN5G(5580, 116, PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_LOW),
83
+ CHAN5G(5600, 120, PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_LOW),
84
+ CHAN5G(5620, 124, PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_HIGH),
85
+ CHAN5G(5640, 128, PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_HIGH),
86
+ CHAN5G(5660, 132, PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_LOW),
87
+ CHAN5G(5700, 140, PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_HIGH),
88
+ CHAN5G(5745, 149, PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_LOW),
89
+ CHAN5G(5765, 153, PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_LOW),
90
+ CHAN5G(5785, 157, PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_HIGH),
91
+ CHAN5G(5805, 161, PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_HIGH),
92
+ CHAN5G(5825, 165, 0)
9393 };
9494
9595 #define RATE(_bitrate, _hw_rate, _flags) { \
....@@ -347,8 +347,6 @@
347347
348348 wcn36xx_dbg(WCN36XX_DBG_MAC, "mac stop\n");
349349
350
- cancel_work_sync(&wcn->scan_work);
351
-
352350 mutex_lock(&wcn->scan_lock);
353351 if (wcn->scan_req) {
354352 struct cfg80211_scan_info scan_info = {
....@@ -369,11 +367,37 @@
369367 wcn36xx_dxe_free_ctl_blks(wcn);
370368 }
371369
370
+static void wcn36xx_change_ps(struct wcn36xx *wcn, bool enable)
371
+{
372
+ struct ieee80211_vif *vif = NULL;
373
+ struct wcn36xx_vif *tmp;
374
+
375
+ list_for_each_entry(tmp, &wcn->vif_list, list) {
376
+ vif = wcn36xx_priv_to_vif(tmp);
377
+ if (enable && !wcn->sw_scan) {
378
+ if (vif->bss_conf.ps) /* ps allowed ? */
379
+ wcn36xx_pmc_enter_bmps_state(wcn, vif);
380
+ } else {
381
+ wcn36xx_pmc_exit_bmps_state(wcn, vif);
382
+ }
383
+ }
384
+}
385
+
386
+static void wcn36xx_change_opchannel(struct wcn36xx *wcn, int ch)
387
+{
388
+ struct ieee80211_vif *vif = NULL;
389
+ struct wcn36xx_vif *tmp;
390
+
391
+ list_for_each_entry(tmp, &wcn->vif_list, list) {
392
+ vif = wcn36xx_priv_to_vif(tmp);
393
+ wcn36xx_smd_switch_channel(wcn, vif, ch);
394
+ }
395
+}
396
+
372397 static int wcn36xx_config(struct ieee80211_hw *hw, u32 changed)
373398 {
374399 struct wcn36xx *wcn = hw->priv;
375
- struct ieee80211_vif *vif = NULL;
376
- struct wcn36xx_vif *tmp;
400
+ int ret;
377401
378402 wcn36xx_dbg(WCN36XX_DBG_MAC, "mac config changed 0x%08x\n", changed);
379403
....@@ -383,23 +407,44 @@
383407 int ch = WCN36XX_HW_CHANNEL(wcn);
384408 wcn36xx_dbg(WCN36XX_DBG_MAC, "wcn36xx_config channel switch=%d\n",
385409 ch);
386
- list_for_each_entry(tmp, &wcn->vif_list, list) {
387
- vif = wcn36xx_priv_to_vif(tmp);
388
- wcn36xx_smd_switch_channel(wcn, vif, ch);
410
+
411
+ if (wcn->sw_scan_opchannel == ch && wcn->sw_scan_channel) {
412
+ /* If channel is the initial operating channel, we may
413
+ * want to receive/transmit regular data packets, then
414
+ * simply stop the scan session and exit PS mode.
415
+ */
416
+ if (wcn->sw_scan_channel)
417
+ wcn36xx_smd_end_scan(wcn, wcn->sw_scan_channel);
418
+ if (wcn->sw_scan_init) {
419
+ wcn36xx_smd_finish_scan(wcn, HAL_SYS_MODE_SCAN,
420
+ wcn->sw_scan_vif);
421
+ }
422
+ } else if (wcn->sw_scan) {
423
+ /* A scan is ongoing, do not change the operating
424
+ * channel, but start a scan session on the channel.
425
+ */
426
+ if (wcn->sw_scan_channel)
427
+ wcn36xx_smd_end_scan(wcn, wcn->sw_scan_channel);
428
+ if (!wcn->sw_scan_init) {
429
+ /* This can fail if we are unable to notify the
430
+ * operating channel.
431
+ */
432
+ ret = wcn36xx_smd_init_scan(wcn,
433
+ HAL_SYS_MODE_SCAN,
434
+ wcn->sw_scan_vif);
435
+ if (ret) {
436
+ mutex_unlock(&wcn->conf_mutex);
437
+ return -EIO;
438
+ }
439
+ }
440
+ wcn36xx_smd_start_scan(wcn, ch);
441
+ } else {
442
+ wcn36xx_change_opchannel(wcn, ch);
389443 }
390444 }
391445
392
- if (changed & IEEE80211_CONF_CHANGE_PS) {
393
- list_for_each_entry(tmp, &wcn->vif_list, list) {
394
- vif = wcn36xx_priv_to_vif(tmp);
395
- if (hw->conf.flags & IEEE80211_CONF_PS) {
396
- if (vif->bss_conf.ps) /* ps allowed ? */
397
- wcn36xx_pmc_enter_bmps_state(wcn, vif);
398
- } else {
399
- wcn36xx_pmc_exit_bmps_state(wcn, vif);
400
- }
401
- }
402
- }
446
+ if (changed & IEEE80211_CONF_CHANGE_PS)
447
+ wcn36xx_change_ps(wcn, hw->conf.flags & IEEE80211_CONF_PS);
403448
404449 mutex_unlock(&wcn->conf_mutex);
405450
....@@ -538,12 +583,14 @@
538583 if (IEEE80211_KEY_FLAG_PAIRWISE & key_conf->flags) {
539584 sta_priv->is_data_encrypted = true;
540585 /* Reconfigure bss with encrypt_type */
541
- if (NL80211_IFTYPE_STATION == vif->type)
586
+ if (NL80211_IFTYPE_STATION == vif->type) {
542587 wcn36xx_smd_config_bss(wcn,
543588 vif,
544589 sta,
545590 sta->addr,
546591 true);
592
+ wcn36xx_smd_config_sta(wcn, vif, sta);
593
+ }
547594
548595 wcn36xx_smd_set_stakey(wcn,
549596 vif_priv->encrypt_type,
....@@ -605,55 +652,26 @@
605652 return ret;
606653 }
607654
608
-static void wcn36xx_hw_scan_worker(struct work_struct *work)
609
-{
610
- struct wcn36xx *wcn = container_of(work, struct wcn36xx, scan_work);
611
- struct cfg80211_scan_request *req = wcn->scan_req;
612
- u8 channels[WCN36XX_HAL_PNO_MAX_NETW_CHANNELS_EX];
613
- struct cfg80211_scan_info scan_info = {};
614
- bool aborted = false;
615
- int i;
616
-
617
- wcn36xx_dbg(WCN36XX_DBG_MAC, "mac80211 scan %d channels worker\n", req->n_channels);
618
-
619
- for (i = 0; i < req->n_channels; i++)
620
- channels[i] = req->channels[i]->hw_value;
621
-
622
- wcn36xx_smd_update_scan_params(wcn, channels, req->n_channels);
623
-
624
- wcn36xx_smd_init_scan(wcn, HAL_SYS_MODE_SCAN);
625
- for (i = 0; i < req->n_channels; i++) {
626
- mutex_lock(&wcn->scan_lock);
627
- aborted = wcn->scan_aborted;
628
- mutex_unlock(&wcn->scan_lock);
629
-
630
- if (aborted)
631
- break;
632
-
633
- wcn->scan_freq = req->channels[i]->center_freq;
634
- wcn->scan_band = req->channels[i]->band;
635
-
636
- wcn36xx_smd_start_scan(wcn, req->channels[i]->hw_value);
637
- msleep(30);
638
- wcn36xx_smd_end_scan(wcn, req->channels[i]->hw_value);
639
-
640
- wcn->scan_freq = 0;
641
- }
642
- wcn36xx_smd_finish_scan(wcn, HAL_SYS_MODE_SCAN);
643
-
644
- scan_info.aborted = aborted;
645
- ieee80211_scan_completed(wcn->hw, &scan_info);
646
-
647
- mutex_lock(&wcn->scan_lock);
648
- wcn->scan_req = NULL;
649
- mutex_unlock(&wcn->scan_lock);
650
-}
651
-
652655 static int wcn36xx_hw_scan(struct ieee80211_hw *hw,
653656 struct ieee80211_vif *vif,
654657 struct ieee80211_scan_request *hw_req)
655658 {
656659 struct wcn36xx *wcn = hw->priv;
660
+ int i;
661
+
662
+ if (!get_feat_caps(wcn->fw_feat_caps, SCAN_OFFLOAD)) {
663
+ /* fallback to mac80211 software scan */
664
+ return 1;
665
+ }
666
+
667
+ /* For unknown reason, the hardware offloaded scan only works with
668
+ * 2.4Ghz channels, fallback to software scan in other cases.
669
+ */
670
+ for (i = 0; i < hw_req->req.n_channels; i++) {
671
+ if (hw_req->req.channels[i]->band != NL80211_BAND_2GHZ)
672
+ return 1;
673
+ }
674
+
657675 mutex_lock(&wcn->scan_lock);
658676 if (wcn->scan_req) {
659677 mutex_unlock(&wcn->scan_lock);
....@@ -664,12 +682,6 @@
664682 wcn->scan_req = &hw_req->req;
665683
666684 mutex_unlock(&wcn->scan_lock);
667
-
668
- if (!get_feat_caps(wcn->fw_feat_caps, SCAN_OFFLOAD)) {
669
- /* legacy manual/sw scan */
670
- schedule_work(&wcn->scan_work);
671
- return 0;
672
- }
673685
674686 return wcn36xx_smd_start_hw_scan(wcn, vif, &hw_req->req);
675687 }
....@@ -687,14 +699,39 @@
687699 /* ieee80211_scan_completed will be called on FW scan
688700 * indication */
689701 wcn36xx_smd_stop_hw_scan(wcn);
690
- } else {
691
- struct cfg80211_scan_info scan_info = {
692
- .aborted = true,
693
- };
694
-
695
- cancel_work_sync(&wcn->scan_work);
696
- ieee80211_scan_completed(wcn->hw, &scan_info);
697702 }
703
+}
704
+
705
+static void wcn36xx_sw_scan_start(struct ieee80211_hw *hw,
706
+ struct ieee80211_vif *vif,
707
+ const u8 *mac_addr)
708
+{
709
+ struct wcn36xx *wcn = hw->priv;
710
+ struct wcn36xx_vif *vif_priv = wcn36xx_vif_to_priv(vif);
711
+
712
+ wcn->sw_scan = true;
713
+ wcn->sw_scan_vif = vif;
714
+ wcn->sw_scan_channel = 0;
715
+ if (vif_priv->sta_assoc)
716
+ wcn->sw_scan_opchannel = WCN36XX_HW_CHANNEL(wcn);
717
+ else
718
+ wcn->sw_scan_opchannel = 0;
719
+}
720
+
721
+static void wcn36xx_sw_scan_complete(struct ieee80211_hw *hw,
722
+ struct ieee80211_vif *vif)
723
+{
724
+ struct wcn36xx *wcn = hw->priv;
725
+
726
+ /* ensure that any scan session is finished */
727
+ if (wcn->sw_scan_channel)
728
+ wcn36xx_smd_end_scan(wcn, wcn->sw_scan_channel);
729
+ if (wcn->sw_scan_init) {
730
+ wcn36xx_smd_finish_scan(wcn, HAL_SYS_MODE_SCAN,
731
+ wcn->sw_scan_vif);
732
+ }
733
+ wcn->sw_scan = false;
734
+ wcn->sw_scan_opchannel = 0;
698735 }
699736
700737 static void wcn36xx_update_allowed_rates(struct ieee80211_sta *sta,
....@@ -736,7 +773,16 @@
736773 sta->ht_cap.mcs.rx_mask,
737774 sizeof(sta->ht_cap.mcs.rx_mask));
738775 }
776
+
777
+ if (sta->vht_cap.vht_supported) {
778
+ sta_priv->supported_rates.op_rate_mode = STA_11ac;
779
+ sta_priv->supported_rates.vht_rx_mcs_map =
780
+ sta->vht_cap.vht_mcs.rx_mcs_map;
781
+ sta_priv->supported_rates.vht_tx_mcs_map =
782
+ sta->vht_cap.vht_mcs.tx_mcs_map;
783
+ }
739784 }
785
+
740786 void wcn36xx_set_default_rates(struct wcn36xx_hal_supported_rates *rates)
741787 {
742788 u16 ofdm_rates[WCN36XX_HAL_NUM_OFDM_RATES] = {
....@@ -763,6 +809,14 @@
763809 sizeof(*ofdm_rates) * WCN36XX_HAL_NUM_OFDM_RATES);
764810 rates->supported_mcs_set[0] = 0xFF;
765811 }
812
+
813
+void wcn36xx_set_default_rates_v1(struct wcn36xx_hal_supported_rates_v1 *rates)
814
+{
815
+ rates->op_rate_mode = STA_11ac;
816
+ rates->vht_rx_mcs_map = IEEE80211_VHT_MCS_SUPPORT_0_9;
817
+ rates->vht_tx_mcs_map = IEEE80211_VHT_MCS_SUPPORT_0_9;
818
+}
819
+
766820 static void wcn36xx_bss_info_changed(struct ieee80211_hw *hw,
767821 struct ieee80211_vif *vif,
768822 struct ieee80211_bss_conf *bss_conf,
....@@ -926,8 +980,6 @@
926980 out:
927981
928982 mutex_unlock(&wcn->conf_mutex);
929
-
930
- return;
931983 }
932984
933985 /* this is required when using IEEE80211_HW_HAS_RATE_CONTROL */
....@@ -1075,6 +1127,8 @@
10751127 enum ieee80211_ampdu_mlme_action action = params->action;
10761128 u16 tid = params->tid;
10771129 u16 *ssn = &params->ssn;
1130
+ int ret = 0;
1131
+ u8 session;
10781132
10791133 wcn36xx_dbg(WCN36XX_DBG_MAC, "mac ampdu action action %d tid %d\n",
10801134 action, tid);
....@@ -1084,10 +1138,11 @@
10841138 switch (action) {
10851139 case IEEE80211_AMPDU_RX_START:
10861140 sta_priv->tid = tid;
1087
- wcn36xx_smd_add_ba_session(wcn, sta, tid, ssn, 0,
1088
- get_sta_index(vif, sta_priv));
1089
- wcn36xx_smd_add_ba(wcn);
1090
- wcn36xx_smd_trigger_ba(wcn, get_sta_index(vif, sta_priv));
1141
+ session = wcn36xx_smd_add_ba_session(wcn, sta, tid, ssn, 0,
1142
+ get_sta_index(vif, sta_priv));
1143
+ wcn36xx_smd_add_ba(wcn, session);
1144
+ wcn36xx_smd_trigger_ba(wcn, get_sta_index(vif, sta_priv), tid,
1145
+ session);
10911146 break;
10921147 case IEEE80211_AMPDU_RX_STOP:
10931148 wcn36xx_smd_del_ba(wcn, tid, get_sta_index(vif, sta_priv));
....@@ -1097,7 +1152,7 @@
10971152 sta_priv->ampdu_state[tid] = WCN36XX_AMPDU_START;
10981153 spin_unlock_bh(&sta_priv->ampdu_lock);
10991154
1100
- ieee80211_start_tx_ba_cb_irqsafe(vif, sta->addr, tid);
1155
+ ret = IEEE80211_AMPDU_TX_START_IMMEDIATE;
11011156 break;
11021157 case IEEE80211_AMPDU_TX_OPERATIONAL:
11031158 spin_lock_bh(&sta_priv->ampdu_lock);
....@@ -1122,7 +1177,7 @@
11221177
11231178 mutex_unlock(&wcn->conf_mutex);
11241179
1125
- return 0;
1180
+ return ret;
11261181 }
11271182
11281183 static const struct ieee80211_ops wcn36xx_ops = {
....@@ -1141,6 +1196,8 @@
11411196 .set_key = wcn36xx_set_key,
11421197 .hw_scan = wcn36xx_hw_scan,
11431198 .cancel_hw_scan = wcn36xx_cancel_hw_scan,
1199
+ .sw_scan_start = wcn36xx_sw_scan_start,
1200
+ .sw_scan_complete = wcn36xx_sw_scan_complete,
11441201 .bss_info_changed = wcn36xx_bss_info_changed,
11451202 .set_rts_threshold = wcn36xx_set_rts_threshold,
11461203 .sta_add = wcn36xx_sta_add,
....@@ -1149,6 +1206,35 @@
11491206
11501207 CFG80211_TESTMODE_CMD(wcn36xx_tm_cmd)
11511208 };
1209
+
1210
+static void
1211
+wcn36xx_set_ieee80211_vht_caps(struct ieee80211_sta_vht_cap *vht_cap)
1212
+{
1213
+ vht_cap->vht_supported = true;
1214
+
1215
+ vht_cap->cap = (IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_3895 |
1216
+ IEEE80211_VHT_CAP_SHORT_GI_80 |
1217
+ IEEE80211_VHT_CAP_RXSTBC_1 |
1218
+ IEEE80211_VHT_CAP_SU_BEAMFORMEE_CAPABLE |
1219
+ IEEE80211_VHT_CAP_MU_BEAMFORMEE_CAPABLE |
1220
+ 3 << IEEE80211_VHT_CAP_BEAMFORMEE_STS_SHIFT |
1221
+ 7 << IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_SHIFT);
1222
+
1223
+ vht_cap->vht_mcs.rx_mcs_map =
1224
+ cpu_to_le16(IEEE80211_VHT_MCS_SUPPORT_0_9 |
1225
+ IEEE80211_VHT_MCS_NOT_SUPPORTED << 2 |
1226
+ IEEE80211_VHT_MCS_NOT_SUPPORTED << 4 |
1227
+ IEEE80211_VHT_MCS_NOT_SUPPORTED << 6 |
1228
+ IEEE80211_VHT_MCS_NOT_SUPPORTED << 8 |
1229
+ IEEE80211_VHT_MCS_NOT_SUPPORTED << 10 |
1230
+ IEEE80211_VHT_MCS_NOT_SUPPORTED << 12 |
1231
+ IEEE80211_VHT_MCS_NOT_SUPPORTED << 14);
1232
+
1233
+ vht_cap->vht_mcs.rx_highest = cpu_to_le16(433);
1234
+ vht_cap->vht_mcs.tx_highest = vht_cap->vht_mcs.rx_highest;
1235
+
1236
+ vht_cap->vht_mcs.tx_mcs_map = vht_cap->vht_mcs.rx_mcs_map;
1237
+}
11521238
11531239 static int wcn36xx_init_ieee80211(struct wcn36xx *wcn)
11541240 {
....@@ -1161,11 +1247,11 @@
11611247
11621248 ieee80211_hw_set(wcn->hw, TIMING_BEACON_ONLY);
11631249 ieee80211_hw_set(wcn->hw, AMPDU_AGGREGATION);
1164
- ieee80211_hw_set(wcn->hw, CONNECTION_MONITOR);
11651250 ieee80211_hw_set(wcn->hw, SUPPORTS_PS);
11661251 ieee80211_hw_set(wcn->hw, SIGNAL_DBM);
11671252 ieee80211_hw_set(wcn->hw, HAS_RATE_CONTROL);
11681253 ieee80211_hw_set(wcn->hw, SINGLE_SCAN_ON_ALL_BANDS);
1254
+ ieee80211_hw_set(wcn->hw, REPORTS_TX_ACK_STATUS);
11691255
11701256 wcn->hw->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION) |
11711257 BIT(NL80211_IFTYPE_AP) |
....@@ -1175,6 +1261,9 @@
11751261 wcn->hw->wiphy->bands[NL80211_BAND_2GHZ] = &wcn_band_2ghz;
11761262 if (wcn->rf_id != RF_IRIS_WCN3620)
11771263 wcn->hw->wiphy->bands[NL80211_BAND_5GHZ] = &wcn_band_5ghz;
1264
+
1265
+ if (wcn->rf_id == RF_IRIS_WCN3680)
1266
+ wcn36xx_set_ieee80211_vht_caps(&wcn_band_5ghz.vht_cap);
11781267
11791268 wcn->hw->wiphy->max_scan_ssids = WCN36XX_MAX_SCAN_SSIDS;
11801269 wcn->hw->wiphy->max_scan_ie_len = WCN36XX_MAX_SCAN_IE_LEN;
....@@ -1273,6 +1362,11 @@
12731362 if (iris_node) {
12741363 if (of_device_is_compatible(iris_node, "qcom,wcn3620"))
12751364 wcn->rf_id = RF_IRIS_WCN3620;
1365
+ if (of_device_is_compatible(iris_node, "qcom,wcn3660") ||
1366
+ of_device_is_compatible(iris_node, "qcom,wcn3660b"))
1367
+ wcn->rf_id = RF_IRIS_WCN3660;
1368
+ if (of_device_is_compatible(iris_node, "qcom,wcn3680"))
1369
+ wcn->rf_id = RF_IRIS_WCN3680;
12761370 of_node_put(iris_node);
12771371 }
12781372
....@@ -1324,8 +1418,6 @@
13241418 wcn36xx_err("failed to set DMA mask: %d\n", ret);
13251419 goto out_wq;
13261420 }
1327
-
1328
- INIT_WORK(&wcn->scan_work, wcn36xx_hw_scan_worker);
13291421
13301422 wcn->smd_channel = qcom_wcnss_open_channel(wcnss, "WLAN_CTRL", wcn36xx_smd_rsp_process, hw);
13311423 if (IS_ERR(wcn->smd_channel)) {