old mode 100644new mode 100755| .. | .. |
|---|
| 475 | 475 | #endif /* WL_CFG80211_P2P_DEV_IF */ |
|---|
| 476 | 476 | static s32 wl_cfg80211_config_default_key(struct wiphy *wiphy, |
|---|
| 477 | 477 | struct net_device *dev, |
|---|
| 478 | | -#if defined(CFG80211_BKPORT_MLO) |
|---|
| 479 | | - int link_id, |
|---|
| 480 | | -#endif |
|---|
| 481 | 478 | u8 key_idx, bool unicast, bool multicast); |
|---|
| 482 | 479 | static s32 wl_cfg80211_add_key(struct wiphy *wiphy, struct net_device *dev, |
|---|
| 483 | | -#if defined(CFG80211_BKPORT_MLO) |
|---|
| 484 | | - int link_id, |
|---|
| 485 | | -#endif |
|---|
| 486 | 480 | u8 key_idx, bool pairwise, const u8 *mac_addr, |
|---|
| 487 | 481 | struct key_params *params); |
|---|
| 488 | 482 | static s32 wl_cfg80211_del_key(struct wiphy *wiphy, struct net_device *dev, |
|---|
| 489 | | -#if defined(CFG80211_BKPORT_MLO) |
|---|
| 490 | | - int link_id, |
|---|
| 491 | | -#endif |
|---|
| 492 | 483 | u8 key_idx, bool pairwise, const u8 *mac_addr); |
|---|
| 493 | 484 | static s32 wl_cfg80211_get_key(struct wiphy *wiphy, struct net_device *dev, |
|---|
| 494 | | -#if defined(CFG80211_BKPORT_MLO) |
|---|
| 495 | | - int link_id, |
|---|
| 496 | | -#endif |
|---|
| 497 | 485 | u8 key_idx, bool pairwise, const u8 *mac_addr, |
|---|
| 498 | 486 | void *cookie, void (*callback) (void *cookie, |
|---|
| 499 | 487 | struct key_params *params)); |
|---|
| 500 | 488 | static s32 wl_cfg80211_config_default_mgmt_key(struct wiphy *wiphy, |
|---|
| 501 | | - struct net_device *dev, |
|---|
| 502 | | -#if defined(CFG80211_BKPORT_MLO) |
|---|
| 503 | | - int link_id, |
|---|
| 504 | | -#endif |
|---|
| 505 | | - u8 key_idx); |
|---|
| 489 | + struct net_device *dev, u8 key_idx); |
|---|
| 506 | 490 | #if defined(WL_SUPPORT_BACKPORTED_KPATCHES) || (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0)) |
|---|
| 507 | 491 | static s32 wl_cfg80211_mgmt_tx_cancel_wait(struct wiphy *wiphy, |
|---|
| 508 | 492 | bcm_struct_cfgdev *cfgdev, u64 cookie); |
|---|
| .. | .. |
|---|
| 595 | 579 | bcm_struct_cfgdev *cfgdev, const wl_event_msg_t *e, void *data); |
|---|
| 596 | 580 | static s32 wl_bss_connect_done(struct bcm_cfg80211 *cfg, struct net_device *ndev, |
|---|
| 597 | 581 | const wl_event_msg_t *e, void *data, bool completed); |
|---|
| 582 | +#ifdef DHD_LOSSLESS_ROAMING |
|---|
| 598 | 583 | static s32 wl_bss_roaming_done(struct bcm_cfg80211 *cfg, struct net_device *ndev, |
|---|
| 599 | 584 | const wl_event_msg_t *e, void *data); |
|---|
| 585 | +#endif /* DHD_LOSSLESS_ROAMING */ |
|---|
| 600 | 586 | static s32 wl_notify_mic_status(struct bcm_cfg80211 *cfg, bcm_struct_cfgdev *cfgdev, |
|---|
| 601 | 587 | const wl_event_msg_t *e, void *data); |
|---|
| 602 | 588 | #ifdef BT_WIFI_HANDOVER |
|---|
| .. | .. |
|---|
| 2305 | 2291 | |
|---|
| 2306 | 2292 | WL_ERR(("%s: starts to read %s. Axi error \n", __FUNCTION__, filename)); |
|---|
| 2307 | 2293 | |
|---|
| 2308 | | - fp = dhd_filp_open(filename, O_RDONLY, 0); |
|---|
| 2294 | + fp = filp_open(filename, O_RDONLY, 0); |
|---|
| 2309 | 2295 | |
|---|
| 2310 | 2296 | if (IS_ERR(fp) || (fp == NULL)) { |
|---|
| 2311 | 2297 | WL_ERR(("%s: Couldn't read the file, err %ld,File [%s] No previous axi error \n", |
|---|
| .. | .. |
|---|
| 2313 | 2299 | return ret; |
|---|
| 2314 | 2300 | } |
|---|
| 2315 | 2301 | |
|---|
| 2316 | | - dhd_kernel_read_compat(fp, fp->f_pos, (char *)dhd->axi_err_dump, sizeof(dhd_axi_error_dump_t)); |
|---|
| 2317 | | - dhd_filp_close(fp, NULL); |
|---|
| 2302 | + kernel_read_compat(fp, fp->f_pos, (char *)dhd->axi_err_dump, sizeof(dhd_axi_error_dump_t)); |
|---|
| 2303 | + filp_close(fp, NULL); |
|---|
| 2318 | 2304 | |
|---|
| 2319 | 2305 | /* Delete axi error info file */ |
|---|
| 2320 | 2306 | if (dhd_file_delete(filename) < 0) { |
|---|
| .. | .. |
|---|
| 3196 | 3182 | |
|---|
| 3197 | 3183 | if (addr) { |
|---|
| 3198 | 3184 | ifflags |= WL_INTERFACE_MAC_USE; |
|---|
| 3199 | | - if (dhd_conf_legacy_chip_check(cfg->pub)) { |
|---|
| 3185 | + if (wl_legacy_chip_check(ndev)) { |
|---|
| 3200 | 3186 | iface.flags = ifflags; |
|---|
| 3201 | 3187 | memcpy(&iface.mac_addr.octet, addr, ETH_ALEN); |
|---|
| 3202 | 3188 | } |
|---|
| .. | .. |
|---|
| 3209 | 3195 | #endif /* WLEASYMESH */ |
|---|
| 3210 | 3196 | |
|---|
| 3211 | 3197 | /* Pass ver = 0 for fetching the interface_create iovar version */ |
|---|
| 3212 | | - if (dhd_conf_legacy_chip_check(cfg->pub)) { |
|---|
| 3198 | + if (wl_legacy_chip_check(ndev)) { |
|---|
| 3213 | 3199 | bzero(&iface_v0, sizeof(iface_v0)); |
|---|
| 3214 | 3200 | iface_v0.ver = WL_INTERFACE_CREATE_VER_0; |
|---|
| 3215 | 3201 | iface_v0.flags = iftype | ifflags; |
|---|
| .. | .. |
|---|
| 6397 | 6383 | |
|---|
| 6398 | 6384 | if (assoc_info.reassoc) { |
|---|
| 6399 | 6385 | /* Handle roam to same ESS */ |
|---|
| 6400 | | -#ifdef DHD_LOSSLESS_ROAMING |
|---|
| 6401 | | - wl_ext_send_event_msg(dev, WLC_E_ROAM_PREP, WLC_E_STATUS_SUCCESS, WLC_E_REASON_LOW_RSSI); |
|---|
| 6402 | | -#endif |
|---|
| 6403 | 6386 | if ((err = wl_handle_reassoc(cfg, dev, &assoc_info)) != BCME_OK) { |
|---|
| 6404 | 6387 | goto fail; |
|---|
| 6405 | 6388 | } |
|---|
| .. | .. |
|---|
| 6554 | 6537 | WL_TRACE_HW4(("Aborting the scan! \n")); |
|---|
| 6555 | 6538 | wl_cfgscan_cancel_scan(cfg); |
|---|
| 6556 | 6539 | } |
|---|
| 6557 | | - if (conn_in_progress || connected || |
|---|
| 6558 | | -#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2) || defined(CFG80211_BKPORT_MLO) |
|---|
| 6559 | | - wdev->u.client.ssid_len |
|---|
| 6560 | | -#else |
|---|
| 6561 | | - wdev->ssid_len |
|---|
| 6562 | | -#endif |
|---|
| 6563 | | - ) { |
|---|
| 6564 | | -#ifdef WL_EXT_IAPSTA |
|---|
| 6565 | | - wl_ext_in4way_sync(dev, 0, WL_EXT_STATUS_PRE_DISCONNECTING, NULL); |
|---|
| 6566 | | -#endif |
|---|
| 6540 | + if (conn_in_progress || connected || wdev->ssid_len) { |
|---|
| 6567 | 6541 | scbval.val = reason_code; |
|---|
| 6568 | 6542 | memcpy(&scbval.ea, curbssid, ETHER_ADDR_LEN); |
|---|
| 6569 | 6543 | scbval.val = htod32(scbval.val); |
|---|
| .. | .. |
|---|
| 6608 | 6582 | * and issue disconnect indication if required. |
|---|
| 6609 | 6583 | */ |
|---|
| 6610 | 6584 | |
|---|
| 6611 | | -#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2) || defined(CFG80211_BKPORT_MLO) |
|---|
| 6612 | | - // terence 20220911: fix me |
|---|
| 6613 | | - if (wdev->links[0].client.current_bss || wdev->u.client.ssid_len) |
|---|
| 6614 | | -#else |
|---|
| 6615 | | - if (wdev->current_bss || wdev->ssid_len) |
|---|
| 6616 | | -#endif |
|---|
| 6617 | | - { |
|---|
| 6585 | + if (wdev->current_bss || wdev->ssid_len) { |
|---|
| 6618 | 6586 | WL_INFORM_MEM(("report disconnect event\n")); |
|---|
| 6619 | 6587 | CFG80211_DISCONNECTED(dev, 0, NULL, 0, false, GFP_KERNEL); |
|---|
| 6620 | 6588 | } |
|---|
| .. | .. |
|---|
| 6719 | 6687 | |
|---|
| 6720 | 6688 | static s32 |
|---|
| 6721 | 6689 | wl_cfg80211_config_default_key(struct wiphy *wiphy, struct net_device *dev, |
|---|
| 6722 | | -#if defined(CFG80211_BKPORT_MLO) |
|---|
| 6723 | | - int link_id, |
|---|
| 6724 | | -#endif |
|---|
| 6725 | 6690 | u8 key_idx, bool unicast, bool multicast) |
|---|
| 6726 | 6691 | { |
|---|
| 6727 | 6692 | struct bcm_cfg80211 *cfg = wiphy_priv(wiphy); |
|---|
| .. | .. |
|---|
| 6766 | 6731 | s32 bssidx; |
|---|
| 6767 | 6732 | s32 mode = wl_get_mode_by_netdev(cfg, dev); |
|---|
| 6768 | 6733 | |
|---|
| 6769 | | - WL_MSG(dev->name, "key index (%d) for %pM\n", key_idx, mac_addr); |
|---|
| 6734 | + WL_MSG(dev->name, "key index (%d)\n", key_idx); |
|---|
| 6770 | 6735 | if ((bssidx = wl_get_bssidx_by_wdev(cfg, dev->ieee80211_ptr)) < 0) { |
|---|
| 6771 | 6736 | WL_ERR(("Find p2p index from wdev(%p) failed\n", dev->ieee80211_ptr)); |
|---|
| 6772 | 6737 | return BCME_ERROR; |
|---|
| .. | .. |
|---|
| 6933 | 6898 | |
|---|
| 6934 | 6899 | static s32 |
|---|
| 6935 | 6900 | wl_cfg80211_add_key(struct wiphy *wiphy, struct net_device *dev, |
|---|
| 6936 | | -#if defined(CFG80211_BKPORT_MLO) |
|---|
| 6937 | | - int link_id, |
|---|
| 6938 | | -#endif |
|---|
| 6939 | 6901 | u8 key_idx, bool pairwise, const u8 *mac_addr, |
|---|
| 6940 | 6902 | struct key_params *params) |
|---|
| 6941 | 6903 | { |
|---|
| .. | .. |
|---|
| 7135 | 7097 | |
|---|
| 7136 | 7098 | static s32 |
|---|
| 7137 | 7099 | wl_cfg80211_del_key(struct wiphy *wiphy, struct net_device *dev, |
|---|
| 7138 | | -#if defined(CFG80211_BKPORT_MLO) |
|---|
| 7139 | | - int link_id, |
|---|
| 7140 | | -#endif |
|---|
| 7141 | 7100 | u8 key_idx, bool pairwise, const u8 *mac_addr) |
|---|
| 7142 | 7101 | { |
|---|
| 7143 | 7102 | struct wl_wsec_key key; |
|---|
| .. | .. |
|---|
| 7201 | 7160 | /* NOTE : this function cannot work as is and is never called */ |
|---|
| 7202 | 7161 | static s32 |
|---|
| 7203 | 7162 | wl_cfg80211_get_key(struct wiphy *wiphy, struct net_device *dev, |
|---|
| 7204 | | -#if defined(CFG80211_BKPORT_MLO) |
|---|
| 7205 | | - int link_id, |
|---|
| 7206 | | -#endif |
|---|
| 7207 | 7163 | u8 key_idx, bool pairwise, const u8 *mac_addr, void *cookie, |
|---|
| 7208 | 7164 | void (*callback) (void *cookie, struct key_params * params)) |
|---|
| 7209 | 7165 | { |
|---|
| .. | .. |
|---|
| 7278 | 7234 | |
|---|
| 7279 | 7235 | static s32 |
|---|
| 7280 | 7236 | wl_cfg80211_config_default_mgmt_key(struct wiphy *wiphy, |
|---|
| 7281 | | - struct net_device *dev, |
|---|
| 7282 | | -#if defined(CFG80211_BKPORT_MLO) |
|---|
| 7283 | | - int link_id, |
|---|
| 7284 | | -#endif |
|---|
| 7285 | | - u8 key_idx) |
|---|
| 7237 | + struct net_device *dev, u8 key_idx) |
|---|
| 7286 | 7238 | { |
|---|
| 7287 | 7239 | #ifdef MFP |
|---|
| 7288 | 7240 | /* Firmware seems to use hard coded index for Group Mgmt Key. |
|---|
| .. | .. |
|---|
| 10266 | 10218 | } |
|---|
| 10267 | 10219 | #endif /* WL_SUPPORT_ACS */ |
|---|
| 10268 | 10220 | |
|---|
| 10269 | | -#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0) |
|---|
| 10270 | | -static int |
|---|
| 10271 | | -wl_cfg80211_get_channel(struct wiphy *wiphy, struct wireless_dev *wdev, |
|---|
| 10272 | | -#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2) || defined(CFG80211_BKPORT_MLO) |
|---|
| 10273 | | - unsigned int link_id, |
|---|
| 10274 | | -#endif |
|---|
| 10275 | | - struct cfg80211_chan_def *chandef) |
|---|
| 10276 | | -{ |
|---|
| 10277 | | - struct bcm_cfg80211 *cfg = wiphy_priv(wiphy); |
|---|
| 10278 | | - u32 chanspec = 0; |
|---|
| 10279 | | - int ret = 0; |
|---|
| 10280 | | - |
|---|
| 10281 | | - RETURN_EIO_IF_NOT_UP(cfg); |
|---|
| 10282 | | - if (NULL == wdev->netdev) { |
|---|
| 10283 | | - /* the P2P interface may temporary use wdev without ndev */ |
|---|
| 10284 | | - return -EINVAL; |
|---|
| 10285 | | - } |
|---|
| 10286 | | - |
|---|
| 10287 | | - if ((ret = wldev_iovar_getint(wdev->netdev, "chanspec", (s32 *)&chanspec) != BCME_OK)) { |
|---|
| 10288 | | - return ret; |
|---|
| 10289 | | - } |
|---|
| 10290 | | - if (!chandef || (wl_chspec_chandef(chanspec, chandef, wiphy) != BCME_OK)) { |
|---|
| 10291 | | - return BCME_ERROR; |
|---|
| 10292 | | - } |
|---|
| 10293 | | - return 0; |
|---|
| 10294 | | -} |
|---|
| 10295 | | -#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION (3, 6, 0) */ |
|---|
| 10296 | | - |
|---|
| 10297 | 10221 | static struct cfg80211_ops wl_cfg80211_ops = { |
|---|
| 10298 | 10222 | .add_virtual_intf = wl_cfg80211_add_virtual_iface, |
|---|
| 10299 | 10223 | .del_virtual_intf = wl_cfg80211_del_virtual_iface, |
|---|
| .. | .. |
|---|
| 10391 | 10315 | .update_ft_ies = wl_cfg80211_update_ft_ies, |
|---|
| 10392 | 10316 | #endif /* WLFBT */ |
|---|
| 10393 | 10317 | #endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0) */ |
|---|
| 10394 | | -#if LINUX_VERSION_CODE >= KERNEL_VERSION (3, 6, 0) |
|---|
| 10395 | | - .get_channel = wl_cfg80211_get_channel, |
|---|
| 10396 | | -#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION (3, 6, 0) */ |
|---|
| 10397 | 10318 | }; |
|---|
| 10398 | 10319 | |
|---|
| 10399 | 10320 | s32 wl_mode_to_nl80211_iftype(s32 mode) |
|---|
| .. | .. |
|---|
| 10432 | 10353 | GCC_DIAGNOSTIC_POP(); |
|---|
| 10433 | 10354 | if (iter->ndev) { |
|---|
| 10434 | 10355 | if (wl_get_drv_status(cfg, AP_CREATED, iter->ndev)) { |
|---|
| 10435 | | - WL_ERR(("AP active. skip coutry ccode change\n")); |
|---|
| 10356 | + WL_ERR(("AP active. skip coutry ccode change")); |
|---|
| 10436 | 10357 | return false; |
|---|
| 10437 | 10358 | } |
|---|
| 10438 | 10359 | } |
|---|
| .. | .. |
|---|
| 10440 | 10361 | |
|---|
| 10441 | 10362 | #ifdef WL_NAN |
|---|
| 10442 | 10363 | if (wl_cfgnan_is_enabled(cfg) && wl_cfgnan_is_dp_active(net)) { |
|---|
| 10443 | | - WL_ERR(("NDP established. skip coutry ccode change\n")); |
|---|
| 10364 | + WL_ERR(("NDP established. skip coutry ccode change")); |
|---|
| 10444 | 10365 | return false; |
|---|
| 10445 | 10366 | } |
|---|
| 10446 | 10367 | #endif /* WL_NAN */ |
|---|
| .. | .. |
|---|
| 10977 | 10898 | #endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0)) && defined(SUPPORT_RANDOM_MAC_SCAN) */ |
|---|
| 10978 | 10899 | |
|---|
| 10979 | 10900 | #if defined(WL_SAE) || defined(WL_CLIENT_SAE) |
|---|
| 10980 | | - if (dhd_conf_extsae_chip(dhd)) |
|---|
| 10901 | + if (wl_extsae_chip(dhd)) |
|---|
| 10981 | 10902 | wdev->wiphy->features |= NL80211_FEATURE_SAE; |
|---|
| 10982 | 10903 | #endif /* WL_SAE || WL_CLIENT_SAE */ |
|---|
| 10983 | 10904 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 13, 0)) && defined(BCMSUP_4WAY_HANDSHAKE) |
|---|
| .. | .. |
|---|
| 10994 | 10915 | wiphy_ext_feature_set(wdev->wiphy, NL80211_EXT_FEATURE_HIGH_ACCURACY_SCAN); |
|---|
| 10995 | 10916 | wdev->wiphy->features |= NL80211_FEATURE_LOW_PRIORITY_SCAN; |
|---|
| 10996 | 10917 | #endif /* WL_SCAN_TYPE */ |
|---|
| 10918 | + |
|---|
| 10919 | +#ifdef DHD_PNO_FLAG |
|---|
| 10920 | + wiphy_ext_feature_set(wdev->wiphy, NL80211_EXT_FEATURE_SCHED_SCAN_RELATIVE_RSSI); |
|---|
| 10921 | +#endif |
|---|
| 10997 | 10922 | |
|---|
| 10998 | 10923 | /* Now we can register wiphy with cfg80211 module */ |
|---|
| 10999 | 10924 | err = wiphy_register(wdev->wiphy); |
|---|
| .. | .. |
|---|
| 12330 | 12255 | memcpy(&emsg, as->event_msg, sizeof(wl_event_msg_t)); |
|---|
| 12331 | 12256 | ret = wl_ext_in4way_sync(ndev, STA_REASSOC_RETRY, |
|---|
| 12332 | 12257 | WL_EXT_STATUS_RECONNECT, &emsg); |
|---|
| 12333 | | - if (ret == BCME_ERROR) |
|---|
| 12258 | + if (ret) |
|---|
| 12334 | 12259 | return 0; |
|---|
| 12335 | 12260 | } |
|---|
| 12336 | 12261 | wl_ext_iapsta_enable_master_if(ndev, FALSE); |
|---|
| .. | .. |
|---|
| 12486 | 12411 | memcpy(&emsg, as->event_msg, sizeof(wl_event_msg_t)); |
|---|
| 12487 | 12412 | ret = wl_ext_in4way_sync(ndev, STA_REASSOC_RETRY, |
|---|
| 12488 | 12413 | WL_EXT_STATUS_RECONNECT, &emsg); |
|---|
| 12489 | | - if (ret == BCME_BADADDR) { |
|---|
| 12490 | | - u8 *curbssid = NULL; |
|---|
| 12491 | | - curbssid = wl_read_prof(cfg, ndev, WL_PROF_BSSID); |
|---|
| 12492 | | - if (curbssid) |
|---|
| 12493 | | - (void)memcpy_s(as->addr, ETH_ALEN, curbssid, ETH_ALEN); |
|---|
| 12494 | | - } |
|---|
| 12495 | | - else if (ret == BCME_ERROR) |
|---|
| 12414 | + if (ret) |
|---|
| 12496 | 12415 | return 0; |
|---|
| 12497 | 12416 | } |
|---|
| 12498 | 12417 | #endif |
|---|
| .. | .. |
|---|
| 12616 | 12535 | wl_ext_iapsta_restart_master(ndev); |
|---|
| 12617 | 12536 | } |
|---|
| 12618 | 12537 | #endif |
|---|
| 12619 | | - |
|---|
| 12620 | | - if (wl_get_drv_status(cfg, DISCONNECTING, ndev)) { |
|---|
| 12621 | | - /* If DISCONNECTING bit is set, mark locally generated */ |
|---|
| 12622 | | - loc_gen = 1; |
|---|
| 12623 | | - } |
|---|
| 12624 | 12538 | |
|---|
| 12625 | 12539 | CFG80211_DISCONNECTED(ndev, reason, ie_ptr, ie_len, |
|---|
| 12626 | 12540 | loc_gen, GFP_KERNEL); |
|---|
| .. | .. |
|---|
| 12868 | 12782 | " connect state. Ignore\n")); |
|---|
| 12869 | 12783 | goto exit; |
|---|
| 12870 | 12784 | } |
|---|
| 12871 | | - |
|---|
| 12872 | | -#ifdef WL_ROAM_WAR |
|---|
| 12873 | | - if (event_type == WLC_E_JOIN) |
|---|
| 12874 | | - bzero((u8*)&cfg->roaming_bssid, ETHER_ADDR_LEN); |
|---|
| 12875 | | - else if (wl_get_drv_status(cfg, CONNECTED, ndev)) { |
|---|
| 12876 | | - if (event_type == WLC_E_AUTH && ntoh32(e->status) == WLC_E_STATUS_SUCCESS) |
|---|
| 12877 | | - bcopy(&e->addr, &cfg->roaming_bssid, ETHER_ADDR_LEN); |
|---|
| 12878 | | - else if (event_type == WLC_E_DEAUTH && |
|---|
| 12879 | | - !ETHER_ISNULLADDR(&cfg->roaming_bssid.octet) && |
|---|
| 12880 | | - memcmp(&e->addr, &cfg->roaming_bssid, ETHER_ADDR_LEN)) { |
|---|
| 12881 | | - WL_MSG(ndev->name, "skip WLC_E_DEAUTH(%pM), roaming_bssid %pM\n", |
|---|
| 12882 | | - &e->addr, &cfg->roaming_bssid); |
|---|
| 12883 | | - goto exit; |
|---|
| 12884 | | - } |
|---|
| 12885 | | - } |
|---|
| 12886 | | -#endif /* WL_ROAM_WAR */ |
|---|
| 12887 | 12785 | |
|---|
| 12888 | 12786 | if (wl_get_drv_status(cfg, CONNECTING, ndev)) { |
|---|
| 12889 | 12787 | assoc_state = WL_STATE_ASSOCIATING; |
|---|
| .. | .. |
|---|
| 13581 | 13479 | return err; |
|---|
| 13582 | 13480 | } |
|---|
| 13583 | 13481 | |
|---|
| 13482 | +#ifdef DHD_LOSSLESS_ROAMING |
|---|
| 13584 | 13483 | static s32 |
|---|
| 13585 | 13484 | wl_bss_roaming_done(struct bcm_cfg80211 *cfg, struct net_device *ndev, |
|---|
| 13586 | 13485 | const wl_event_msg_t *e, void *data) |
|---|
| .. | .. |
|---|
| 13588 | 13487 | struct wl_connect_info *conn_info = wl_to_conn(cfg); |
|---|
| 13589 | 13488 | s32 err = 0; |
|---|
| 13590 | 13489 | u8 *curbssid; |
|---|
| 13591 | | - chanspec_t *chanspec, cur_chanspec; |
|---|
| 13490 | + chanspec_t *chanspec; |
|---|
| 13592 | 13491 | scb_val_t scbval; |
|---|
| 13593 | 13492 | #if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 39)) || \ |
|---|
| 13594 | 13493 | defined(WL_COMPAT_WIRELESS) |
|---|
| 13595 | 13494 | struct wiphy *wiphy = bcmcfg_to_wiphy(cfg); |
|---|
| 13596 | 13495 | struct ieee80211_channel *notify_channel = NULL; |
|---|
| 13597 | 13496 | u32 freq; |
|---|
| 13598 | | - u32 cur_channel, orig_channel; |
|---|
| 13497 | + u32 cur_channel, cur_chanspec, orig_channel; |
|---|
| 13599 | 13498 | #endif /* LINUX_VERSION > 2.6.39 || WL_COMPAT_WIRELESS */ |
|---|
| 13600 | 13499 | #if (defined(CONFIG_ARCH_MSM) && defined(CFG80211_ROAMED_API_UNIFIED)) || \ |
|---|
| 13601 | 13500 | (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)) || \ |
|---|
| .. | .. |
|---|
| 13636 | 13535 | cur_channel = wf_chspec_ctlchan(wl_chspec_driver_to_host(cur_chanspec)); |
|---|
| 13637 | 13536 | orig_channel = wf_chspec_ctlchan(wl_chspec_driver_to_host(*chanspec)); |
|---|
| 13638 | 13537 | if (dhdp->conf->chip != BCM43569_CHIP_ID) { |
|---|
| 13639 | | - if (((orig_channel == cur_channel) && memcmp(ðer_null, &cfg->last_roamed_addr, ETHER_ADDR_LEN)) && |
|---|
| 13538 | + if ((orig_channel == cur_channel) && |
|---|
| 13640 | 13539 | ((memcmp(curbssid, &e->addr, ETHER_ADDR_LEN) == 0) || |
|---|
| 13641 | 13540 | (memcmp(&cfg->last_roamed_addr, &e->addr, ETHER_ADDR_LEN) == 0))) { |
|---|
| 13642 | | - WL_INFORM_MEM(("BSS already present, Skipping roamed event to upper layer\n")); |
|---|
| 13643 | | - WL_INFORM_MEM(("orig_chan/cur_chan=%d/%d, addr/curbssid/last_roamed_addr=%pM/%pM/%pM\n", |
|---|
| 13644 | | - orig_channel, cur_channel, |
|---|
| 13645 | | - (const u8*)(&e->addr), curbssid, (const u8*)(&cfg->last_roamed_addr))); |
|---|
| 13541 | + WL_DBG(("BSS already present, Skipping roamed event to upper layer\n")); |
|---|
| 13646 | 13542 | goto fail; |
|---|
| 13647 | 13543 | } |
|---|
| 13648 | 13544 | } |
|---|
| .. | .. |
|---|
| 13676 | 13572 | } |
|---|
| 13677 | 13573 | rssi = dtoh32(scbval.val); |
|---|
| 13678 | 13574 | |
|---|
| 13679 | | - WL_MSG(ndev->name, "%pM(chan=%s-%d/%sMHz) => %pM(chan=%s-%d/%sMHz, rssi: %3d)\n", |
|---|
| 13680 | | - curbssid, |
|---|
| 13681 | | - CHSPEC2BANDSTR(*chanspec), wf_chspec_ctlchan(*chanspec), |
|---|
| 13575 | + WL_MSG(ndev->name, "%pM(ch:%3d/%sMHz) => %pM(ch:%3d/%sMHz, rssi: %3d)\n", |
|---|
| 13576 | + curbssid, orig_channel, |
|---|
| 13682 | 13577 | CHSPEC_IS20(*chanspec)?"20": |
|---|
| 13683 | 13578 | CHSPEC_IS40(*chanspec)?"40": |
|---|
| 13684 | 13579 | CHSPEC_IS80(*chanspec)?"80": |
|---|
| 13685 | 13580 | CHSPEC_IS160(*chanspec)?"160":"??", |
|---|
| 13686 | | - (const u8*)(&e->addr), |
|---|
| 13687 | | - CHSPEC2BANDSTR(cur_chanspec), wf_chspec_ctlchan(cur_chanspec), |
|---|
| 13581 | + (const u8*)(&e->addr), cur_channel, |
|---|
| 13688 | 13582 | CHSPEC_IS20(cur_chanspec)?"20": |
|---|
| 13689 | 13583 | CHSPEC_IS40(cur_chanspec)?"40": |
|---|
| 13690 | 13584 | CHSPEC_IS80(cur_chanspec)?"80": |
|---|
| .. | .. |
|---|
| 13725 | 13619 | DHD_STATLOG_CTRL(dhdp, ST(REASSOC_INFORM), |
|---|
| 13726 | 13620 | dhd_net2idx(dhdp->info, ndev), 0); |
|---|
| 13727 | 13621 | #ifdef WL_EXT_IAPSTA |
|---|
| 13728 | | - wl_ext_in4way_sync(ndev, 0, WL_EXT_STATUS_ROAMED, NULL); |
|---|
| 13622 | + wl_ext_in4way_sync(ndev, 0, WL_EXT_STATUS_CONNECTED, NULL); |
|---|
| 13729 | 13623 | #endif |
|---|
| 13730 | 13624 | |
|---|
| 13731 | 13625 | #if (defined(CONFIG_ARCH_MSM) && defined(CFG80211_ROAMED_API_UNIFIED)) || \ |
|---|
| 13732 | 13626 | (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)) || \ |
|---|
| 13733 | 13627 | defined(WL_FILS_ROAM_OFFLD) || defined(CFG80211_ROAM_API_GE_4_12) |
|---|
| 13734 | 13628 | memset(&roam_info, 0, sizeof(struct cfg80211_roam_info)); |
|---|
| 13735 | | -#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2) || defined(CFG80211_BKPORT_MLO) |
|---|
| 13736 | | - roam_info.links[0].channel = notify_channel; |
|---|
| 13737 | | - roam_info.links[0].bssid = curbssid; |
|---|
| 13738 | | -#else |
|---|
| 13739 | 13629 | roam_info.channel = notify_channel; |
|---|
| 13740 | 13630 | roam_info.bssid = curbssid; |
|---|
| 13741 | | -#endif |
|---|
| 13742 | 13631 | roam_info.req_ie = conn_info->req_ie; |
|---|
| 13743 | 13632 | roam_info.req_ie_len = conn_info->req_ie_len; |
|---|
| 13744 | 13633 | roam_info.resp_ie = conn_info->resp_ie; |
|---|
| .. | .. |
|---|
| 13791 | 13680 | return err; |
|---|
| 13792 | 13681 | |
|---|
| 13793 | 13682 | fail: |
|---|
| 13794 | | -#ifdef WL_EXT_IAPSTA |
|---|
| 13795 | | - if (err) |
|---|
| 13796 | | - wl_ext_in4way_sync(ndev, STA_NO_BTC_IN4WAY, WL_EXT_STATUS_DISCONNECTED, NULL); |
|---|
| 13797 | | -#endif |
|---|
| 13798 | 13683 | #ifdef DHD_LOSSLESS_ROAMING |
|---|
| 13799 | 13684 | wl_del_roam_timeout(cfg); |
|---|
| 13800 | 13685 | #endif /* DHD_LOSSLESS_ROAMING */ |
|---|
| 13801 | 13686 | return err; |
|---|
| 13802 | 13687 | } |
|---|
| 13688 | +#endif /* DHD_LOSSLESS_ROAMING */ |
|---|
| 13803 | 13689 | |
|---|
| 13804 | 13690 | static bool |
|---|
| 13805 | 13691 | wl_cfg80211_verify_bss(struct bcm_cfg80211 *cfg, struct net_device *ndev, |
|---|
| .. | .. |
|---|
| 13935 | 13821 | |
|---|
| 13936 | 13822 | resp_params = (struct cfg80211_connect_resp_params *)params; |
|---|
| 13937 | 13823 | resp_params->status = status; |
|---|
| 13938 | | -#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2) || defined(CFG80211_BKPORT_MLO) |
|---|
| 13939 | | - resp_params->links[0].bssid = curbssid; |
|---|
| 13940 | | - resp_params->links[0].bss = CFG80211_GET_BSS(wiphy, NULL, curbssid, |
|---|
| 13941 | | - ssid->SSID, ssid->SSID_len); |
|---|
| 13942 | | -#else |
|---|
| 13943 | 13824 | resp_params->bssid = curbssid; |
|---|
| 13944 | 13825 | resp_params->bss = CFG80211_GET_BSS(wiphy, NULL, curbssid, |
|---|
| 13945 | 13826 | ssid->SSID, ssid->SSID_len); |
|---|
| 13946 | | -#endif |
|---|
| 13947 | | -#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2) || defined(CFG80211_BKPORT_MLO) |
|---|
| 13948 | | - if (!resp_params->links[0].bss) |
|---|
| 13949 | | -#else |
|---|
| 13950 | | - if (!resp_params->bss) |
|---|
| 13951 | | -#endif |
|---|
| 13952 | | - { |
|---|
| 13827 | + if (!resp_params->bss) { |
|---|
| 13953 | 13828 | WL_ERR(("null bss\n")); |
|---|
| 13954 | 13829 | return BCME_ERROR; |
|---|
| 13955 | 13830 | } |
|---|
| .. | .. |
|---|
| 14059 | 13934 | completed = false; |
|---|
| 14060 | 13935 | sec->auth_assoc_res_status = WLAN_STATUS_UNSPECIFIED_FAILURE; |
|---|
| 14061 | 13936 | } |
|---|
| 14062 | | -#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2) || defined(CFG80211_BKPORT_MLO) |
|---|
| 14063 | | - if (!ndev->ieee80211_ptr->u.client.ssid_len) |
|---|
| 14064 | | -#else |
|---|
| 14065 | | - if (!ndev->ieee80211_ptr->ssid_len) |
|---|
| 14066 | | -#endif |
|---|
| 14067 | | - { |
|---|
| 13937 | + if (!ndev->ieee80211_ptr->ssid_len) { |
|---|
| 14068 | 13938 | /* In certain cases, the delayed cfg80211 work from |
|---|
| 14069 | 13939 | * disconnect context will induce race conditions in |
|---|
| 14070 | 13940 | * which the ssid_len will be cleared, but dhd is in |
|---|
| .. | .. |
|---|
| 14092 | 13962 | |
|---|
| 14093 | 13963 | if (completed) { |
|---|
| 14094 | 13964 | WL_MSG(ndev->name, "Report connect result - connection succeeded\n"); |
|---|
| 13965 | +#ifdef WL_EXT_IAPSTA |
|---|
| 13966 | + wl_ext_in4way_sync(ndev, 0, WL_EXT_STATUS_CONNECTED, NULL); |
|---|
| 13967 | + wl_ext_iapsta_enable_master_if(ndev, TRUE); |
|---|
| 13968 | +#endif |
|---|
| 14095 | 13969 | } else { |
|---|
| 14096 | 13970 | WL_MSG(ndev->name, "Report connect result - connection failed\n"); |
|---|
| 14097 | 13971 | #ifdef WL_EXT_IAPSTA |
|---|
| .. | .. |
|---|
| 14140 | 14014 | } |
|---|
| 14141 | 14015 | #endif /* WAPI */ |
|---|
| 14142 | 14016 | } |
|---|
| 14143 | | - |
|---|
| 14144 | | -#ifdef WL_EXT_IAPSTA |
|---|
| 14145 | | - if (completed) { |
|---|
| 14146 | | - wl_ext_in4way_sync(ndev, 0, WL_EXT_STATUS_CONNECTED, NULL); |
|---|
| 14147 | | - wl_ext_iapsta_enable_master_if(ndev, TRUE); |
|---|
| 14148 | | - } |
|---|
| 14149 | | -#endif |
|---|
| 14150 | 14017 | |
|---|
| 14151 | 14018 | exit: |
|---|
| 14152 | 14019 | CLR_TS(cfg, conn_start); |
|---|
| .. | .. |
|---|
| 14757 | 14624 | wl_cfg80211_ccode_evt_handler(struct bcm_cfg80211 *cfg, bcm_struct_cfgdev *cfgdev, |
|---|
| 14758 | 14625 | const wl_event_msg_t *event, void *data) |
|---|
| 14759 | 14626 | { |
|---|
| 14760 | | - dhd_pub_t *dhd = cfg->pub; |
|---|
| 14761 | 14627 | s32 err = 0; |
|---|
| 14762 | 14628 | struct wiphy *wiphy = bcmcfg_to_wiphy(cfg); |
|---|
| 14763 | 14629 | char country_str[WLC_CNTRY_BUF_SZ] = { 0 }; |
|---|
| 14764 | 14630 | struct net_device *dev = bcmcfg_to_prmry_ndev(cfg); |
|---|
| 14631 | + wl_country_t cspec = {{0}, 0, {0}}; |
|---|
| 14765 | 14632 | |
|---|
| 14766 | 14633 | if (strlcpy(country_str, data, WL_CCODE_LEN + 1) >= WLC_CNTRY_BUF_SZ) { |
|---|
| 14767 | 14634 | return -EINVAL; |
|---|
| .. | .. |
|---|
| 14774 | 14641 | } |
|---|
| 14775 | 14642 | |
|---|
| 14776 | 14643 | WL_MSG(dev->name, "Updating new country %s\n", country_str); |
|---|
| 14777 | | - dhd_conf_country(dhd, "country", country_str); |
|---|
| 14644 | + |
|---|
| 14645 | + strlcpy(cspec.country_abbrev, country_str, WL_CCODE_LEN + 1); |
|---|
| 14646 | + strlcpy(cspec.ccode, country_str, WL_CCODE_LEN + 1); |
|---|
| 14647 | + err = dhd_conf_map_country_list(dhd_get_pub(dev), &cspec); |
|---|
| 14648 | + if (err) |
|---|
| 14649 | + dhd_get_customized_country_code(dev, (char *)&cspec.country_abbrev, &cspec); |
|---|
| 14650 | + err = dhd_conf_set_country(dhd_get_pub(dev), &cspec); |
|---|
| 14651 | + if (err < 0) { |
|---|
| 14652 | + WL_ERR(("set country for %s as %s rev %d failed\n", |
|---|
| 14653 | + country_str, cspec.ccode, cspec.rev)); |
|---|
| 14654 | + } |
|---|
| 14655 | + dhd_conf_fix_country(dhd_get_pub(dev)); |
|---|
| 14778 | 14656 | |
|---|
| 14779 | 14657 | /* Indicate to upper layer for regdom change */ |
|---|
| 14780 | 14658 | err = wl_update_wiphybands(cfg, true); |
|---|
| .. | .. |
|---|
| 14920 | 14798 | cfg->evt_handler[WLC_E_BSS_LOAD] = wl_cfg80211_bssload_report_event_handler; |
|---|
| 14921 | 14799 | #endif /* WL_CHAN_UTIL */ |
|---|
| 14922 | 14800 | #ifdef WL_TWT |
|---|
| 14923 | | - cfg->evt_handler[WLC_E_TWT] = wl_notify_twt_event; |
|---|
| 14924 | | -#else |
|---|
| 14925 | | -#ifdef WL_TWT_HAL_IF |
|---|
| 14926 | | - cfg->evt_handler[WLC_E_TWT] = wl_cfgvendor_notify_twt_event; |
|---|
| 14927 | | -#endif /* WL_TWT_HAL_IF */ |
|---|
| 14801 | + cfg->evt_handler[WLC_E_TWT_SETUP] = wl_notify_twt_event; |
|---|
| 14802 | + cfg->evt_handler[WLC_E_TWT_TEARDOWN] = wl_notify_twt_event; |
|---|
| 14803 | + cfg->evt_handler[WLC_E_TWT_INFO_FRM] = wl_notify_twt_event; |
|---|
| 14928 | 14804 | #endif /* WL_TWT */ |
|---|
| 14929 | 14805 | #ifdef WL_CLIENT_SAE |
|---|
| 14930 | 14806 | cfg->evt_handler[WLC_E_JOIN_START] = wl_notify_start_auth; |
|---|
| .. | .. |
|---|
| 15304 | 15180 | |
|---|
| 15305 | 15181 | wdev = ndev_to_wdev(dev); |
|---|
| 15306 | 15182 | if (!wdev) { |
|---|
| 15307 | | - WL_DBG(("wdev(%s) null. Do nothing\n", dev->name)); |
|---|
| 15183 | + WL_ERR(("wdev null. Do nothing\n")); |
|---|
| 15308 | 15184 | return NOTIFY_DONE; |
|---|
| 15309 | 15185 | } |
|---|
| 15310 | 15186 | |
|---|
| .. | .. |
|---|
| 15811 | 15687 | wl_destroy_event_handler(cfg); |
|---|
| 15812 | 15688 | wl_flush_eq(cfg); |
|---|
| 15813 | 15689 | wl_link_down(cfg); |
|---|
| 15690 | +#if defined (WL_SCHED_SCAN) && defined (SCHED_SCAN_DELAYED_WORK) |
|---|
| 15691 | + cancel_delayed_work_sync(&cfg->sched_scan_stop_work); |
|---|
| 15692 | +#endif /* WL_SCHED_SCAN */ |
|---|
| 15814 | 15693 | del_timer_sync(&cfg->scan_timeout); |
|---|
| 15815 | 15694 | #ifdef DHD_LOSSLESS_ROAMING |
|---|
| 15816 | 15695 | del_timer_sync(&cfg->roam_timeout); |
|---|
| .. | .. |
|---|
| 16077 | 15956 | INIT_WORK(&cfg->wlan_work, wl_cfg80211_work_handler); |
|---|
| 16078 | 15957 | #endif /* DHCP_SCAN_SUPPRESS */ |
|---|
| 16079 | 15958 | |
|---|
| 15959 | +#if defined (WL_SCHED_SCAN) && defined (SCHED_SCAN_DELAYED_WORK) |
|---|
| 15960 | + INIT_DELAYED_WORK(&cfg->sched_scan_stop_work, wl_cfgscan_sched_scan_stop_work); |
|---|
| 15961 | +#endif /* WL_SCHED_SCAN */ |
|---|
| 16080 | 15962 | INIT_DELAYED_WORK(&cfg->pm_enable_work, wl_cfg80211_work_handler); |
|---|
| 16081 | 15963 | INIT_DELAYED_WORK(&cfg->loc.work, wl_cfgscan_listen_complete_work); |
|---|
| 16082 | 15964 | INIT_DELAYED_WORK(&cfg->ap_work, wl_cfg80211_ap_timeout_work); |
|---|
| .. | .. |
|---|
| 16343 | 16225 | |
|---|
| 16344 | 16226 | #ifdef OEM_ANDROID |
|---|
| 16345 | 16227 | if (cfg->event_workq == NULL) { |
|---|
| 16346 | | - WL_ERR(("Event handler is not created (%s)\n", bcmevent_get_name(event_type))); |
|---|
| 16228 | + WL_ERR(("Event handler is not created\n")); |
|---|
| 16347 | 16229 | return; |
|---|
| 16348 | 16230 | } |
|---|
| 16349 | 16231 | #endif /* OEM_ANDROID */ |
|---|
| .. | .. |
|---|
| 17243 | 17125 | /* Start the event logging */ |
|---|
| 17244 | 17126 | wl_add_remove_eventmsg(ndev, WLC_E_TRACE, TRUE); |
|---|
| 17245 | 17127 | #endif /* SHOW_LOGTRACE */ |
|---|
| 17246 | | -#if defined(BCMDBUS) |
|---|
| 17247 | | - if (!dhd->dhd_console_ms) |
|---|
| 17248 | | - wl_add_remove_eventmsg(ndev, WLC_E_TRACE, FALSE); |
|---|
| 17249 | | -#endif |
|---|
| 17250 | 17128 | |
|---|
| 17251 | 17129 | (void)memcpy_s(wdev->wiphy->perm_addr, ETHER_ADDR_LEN, |
|---|
| 17252 | 17130 | bcmcfg_to_prmry_ndev(cfg)->perm_addr, ETHER_ADDR_LEN); |
|---|
| .. | .. |
|---|
| 17403 | 17281 | return err; |
|---|
| 17404 | 17282 | } |
|---|
| 17405 | 17283 | |
|---|
| 17406 | | -#ifdef BCMDBUS |
|---|
| 17407 | | -s32 |
|---|
| 17408 | | -__wl_cfg80211_up_resume(dhd_pub_t *dhd) |
|---|
| 17409 | | -{ |
|---|
| 17410 | | - struct net_device *ndev = dhd_linux_get_primary_netdev(dhd); |
|---|
| 17411 | | - struct bcm_cfg80211 *cfg; |
|---|
| 17412 | | - struct wireless_dev *wdev; |
|---|
| 17413 | | - s32 err = 0; |
|---|
| 17414 | | -#ifdef WL_HOST_BAND_MGMT |
|---|
| 17415 | | - s32 ret = 0; |
|---|
| 17416 | | -#endif /* WL_HOST_BAND_MGMT */ |
|---|
| 17417 | | - u16 wl_iftype = 0; |
|---|
| 17418 | | - u16 wl_mode = 0; |
|---|
| 17419 | | - |
|---|
| 17420 | | - WL_DBG(("In\n")); |
|---|
| 17421 | | - |
|---|
| 17422 | | - if (!ndev) |
|---|
| 17423 | | - return -EINVAL; |
|---|
| 17424 | | - cfg = wl_get_cfg(ndev); |
|---|
| 17425 | | - wdev = ndev->ieee80211_ptr; |
|---|
| 17426 | | - if (!cfg || !wdev) |
|---|
| 17427 | | - return -EINVAL; |
|---|
| 17428 | | - |
|---|
| 17429 | | -#if defined(BCMDONGLEHOST) |
|---|
| 17430 | | - err = dhd_config_dongle(cfg); |
|---|
| 17431 | | - if (unlikely(err)) |
|---|
| 17432 | | - return err; |
|---|
| 17433 | | -#endif /* defined(BCMDONGLEHOST) */ |
|---|
| 17434 | | - |
|---|
| 17435 | | -#ifdef SHOW_LOGTRACE |
|---|
| 17436 | | - /* Start the event logging */ |
|---|
| 17437 | | - wl_add_remove_eventmsg(ndev, WLC_E_TRACE, TRUE); |
|---|
| 17438 | | -#endif /* SHOW_LOGTRACE */ |
|---|
| 17439 | | -#if defined(BCMDBUS) |
|---|
| 17440 | | - if (!dhd->dhd_console_ms) |
|---|
| 17441 | | - wl_add_remove_eventmsg(ndev, WLC_E_TRACE, FALSE); |
|---|
| 17442 | | -#endif |
|---|
| 17443 | | - |
|---|
| 17444 | | - if (cfg80211_to_wl_iftype(wdev->iftype, &wl_iftype, &wl_mode) < 0) { |
|---|
| 17445 | | - return -EINVAL; |
|---|
| 17446 | | - } |
|---|
| 17447 | | - if (!dhd->fw_preinit) { |
|---|
| 17448 | | - err = wl_config_infra(cfg, ndev, wl_iftype); |
|---|
| 17449 | | - if (unlikely(err && err != -EINPROGRESS)) { |
|---|
| 17450 | | - WL_ERR(("wl_config_infra failed\n")); |
|---|
| 17451 | | - if (err == -1) { |
|---|
| 17452 | | - WL_ERR(("return error %d\n", err)); |
|---|
| 17453 | | - return err; |
|---|
| 17454 | | - } |
|---|
| 17455 | | - } |
|---|
| 17456 | | - } |
|---|
| 17457 | | - |
|---|
| 17458 | | -#ifdef WL_HOST_BAND_MGMT |
|---|
| 17459 | | - /* By default the curr_band is initialized to BAND_AUTO */ |
|---|
| 17460 | | - if ((ret = wl_cfg80211_set_band(ndev, WLC_BAND_AUTO)) < 0) { |
|---|
| 17461 | | - if (ret == BCME_UNSUPPORTED) { |
|---|
| 17462 | | - /* Don't fail the initialization, lets just |
|---|
| 17463 | | - * fall back to the original method |
|---|
| 17464 | | - */ |
|---|
| 17465 | | - WL_ERR(("WL_HOST_BAND_MGMT defined, " |
|---|
| 17466 | | - "but roam_band iovar not supported \n")); |
|---|
| 17467 | | - } else { |
|---|
| 17468 | | - WL_ERR(("roam_band failed. ret=%d", ret)); |
|---|
| 17469 | | - err = -1; |
|---|
| 17470 | | - } |
|---|
| 17471 | | - } |
|---|
| 17472 | | -#endif /* WL_HOST_BAND_MGMT */ |
|---|
| 17473 | | - return err; |
|---|
| 17474 | | -} |
|---|
| 17475 | | -#endif /* BCMDBUS */ |
|---|
| 17476 | | - |
|---|
| 17477 | 17284 | static s32 __wl_cfg80211_down(struct bcm_cfg80211 *cfg) |
|---|
| 17478 | 17285 | { |
|---|
| 17479 | 17286 | s32 err = 0; |
|---|
| .. | .. |
|---|
| 17622 | 17429 | struct wiphy *wiphy = bcmcfg_to_wiphy(cfg); |
|---|
| 17623 | 17430 | struct wireless_dev *wdev = ndev->ieee80211_ptr; |
|---|
| 17624 | 17431 | struct cfg80211_bss *bss = CFG80211_GET_BSS(wiphy, NULL, latest_bssid, |
|---|
| 17625 | | -#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2) || defined(CFG80211_BKPORT_MLO) |
|---|
| 17626 | | - wdev->u.client.ssid, wdev->u.client.ssid_len |
|---|
| 17627 | | -#else |
|---|
| 17628 | | - wdev->ssid, wdev->ssid_len |
|---|
| 17629 | | -#endif |
|---|
| 17630 | | - ); |
|---|
| 17432 | + wdev->ssid, wdev->ssid_len); |
|---|
| 17631 | 17433 | |
|---|
| 17632 | 17434 | BCM_REFERENCE(bss); |
|---|
| 17633 | 17435 | |
|---|
| .. | .. |
|---|
| 17786 | 17588 | if (init_roam_cache(cfg, ioctl_version) == 0) { |
|---|
| 17787 | 17589 | /* Enable support for Roam cache */ |
|---|
| 17788 | 17590 | cfg->rcc_enabled = true; |
|---|
| 17789 | | - WL_MSG(net->name, "Roam channel cache enabled\n"); |
|---|
| 17591 | + WL_ERR(("Roam channel cache enabled\n")); |
|---|
| 17790 | 17592 | } else { |
|---|
| 17791 | 17593 | WL_ERR(("Failed to enable RCC.\n")); |
|---|
| 17792 | 17594 | } |
|---|
| .. | .. |
|---|
| 19887 | 19689 | bssidx, &cfg->ioctl_buf_sync); |
|---|
| 19888 | 19690 | if (ret == BCME_OK) { |
|---|
| 19889 | 19691 | ies = (vndr_ie_buf_t *)cfg->ioctl_buf; |
|---|
| 19890 | | - WL_INFORM_MEM(("FW IE count:%d\n", ies->iecount)); |
|---|
| 19692 | + WL_INFORM_MEM(("FW IE count:%d ", ies->iecount)); |
|---|
| 19891 | 19693 | #ifdef GET_FW_IE_DATA |
|---|
| 19892 | 19694 | if (wl_dbg_level & WL_DBG_DBG) { |
|---|
| 19893 | 19695 | int i = 0; |
|---|