diff options
author | Arend van Spriel <arend@broadcom.com> | 2013-04-05 04:57:49 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-04-08 15:28:45 -0400 |
commit | a0f472aca2ff1d241afc5ac1e804b50b5f3be6a4 (patch) | |
tree | bbf97cbb4164dd0785d1e4d3577c765eb97939d0 /drivers/net/wireless | |
parent | f96aa07ecc2412c8be3a5473d1e765f223c31fd8 (diff) |
brcmfmac: use struct brcmf_if instance iso netdevice in escan functions
escan functionality is also required for P2P device operations so it
is better not to rely on struct netdevice instances.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Piotr Haber <phaber@broadcom.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmfmac/p2p.c | 17 | ||||
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c | 68 | ||||
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.h | 9 |
3 files changed, 42 insertions, 52 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/p2p.c b/drivers/net/wireless/brcm80211/brcmfmac/p2p.c index 454a8deb0f10..e587dfb5d256 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/p2p.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/p2p.c | |||
@@ -773,7 +773,7 @@ exit: | |||
773 | * validates the channels in the request. | 773 | * validates the channels in the request. |
774 | */ | 774 | */ |
775 | static s32 brcmf_p2p_run_escan(struct brcmf_cfg80211_info *cfg, | 775 | static s32 brcmf_p2p_run_escan(struct brcmf_cfg80211_info *cfg, |
776 | struct net_device *ndev, | 776 | struct brcmf_if *ifp, |
777 | struct cfg80211_scan_request *request, | 777 | struct cfg80211_scan_request *request, |
778 | u16 action) | 778 | u16 action) |
779 | { | 779 | { |
@@ -1261,7 +1261,7 @@ static void | |||
1261 | brcmf_p2p_stop_wait_next_action_frame(struct brcmf_cfg80211_info *cfg) | 1261 | brcmf_p2p_stop_wait_next_action_frame(struct brcmf_cfg80211_info *cfg) |
1262 | { | 1262 | { |
1263 | struct brcmf_p2p_info *p2p = &cfg->p2p; | 1263 | struct brcmf_p2p_info *p2p = &cfg->p2p; |
1264 | struct net_device *ndev = cfg->escan_info.ndev; | 1264 | struct brcmf_if *ifp = cfg->escan_info.ifp; |
1265 | 1265 | ||
1266 | if (test_bit(BRCMF_P2P_STATUS_SENDING_ACT_FRAME, &p2p->status) && | 1266 | if (test_bit(BRCMF_P2P_STATUS_SENDING_ACT_FRAME, &p2p->status) && |
1267 | (test_bit(BRCMF_P2P_STATUS_ACTION_TX_COMPLETED, &p2p->status) || | 1267 | (test_bit(BRCMF_P2P_STATUS_ACTION_TX_COMPLETED, &p2p->status) || |
@@ -1271,12 +1271,12 @@ brcmf_p2p_stop_wait_next_action_frame(struct brcmf_cfg80211_info *cfg) | |||
1271 | * So abort scan for off channel completion. | 1271 | * So abort scan for off channel completion. |
1272 | */ | 1272 | */ |
1273 | if (p2p->af_sent_channel) | 1273 | if (p2p->af_sent_channel) |
1274 | brcmf_notify_escan_complete(cfg, ndev, true, true); | 1274 | brcmf_notify_escan_complete(cfg, ifp, true, true); |
1275 | } else if (test_bit(BRCMF_P2P_STATUS_WAITING_NEXT_AF_LISTEN, | 1275 | } else if (test_bit(BRCMF_P2P_STATUS_WAITING_NEXT_AF_LISTEN, |
1276 | &p2p->status)) { | 1276 | &p2p->status)) { |
1277 | brcmf_dbg(TRACE, "*** Wake UP ** abort listen for next af frame\n"); | 1277 | brcmf_dbg(TRACE, "*** Wake UP ** abort listen for next af frame\n"); |
1278 | /* So abort scan to cancel listen */ | 1278 | /* So abort scan to cancel listen */ |
1279 | brcmf_notify_escan_complete(cfg, ndev, true, true); | 1279 | brcmf_notify_escan_complete(cfg, ifp, true, true); |
1280 | } | 1280 | } |
1281 | } | 1281 | } |
1282 | 1282 | ||
@@ -1637,6 +1637,7 @@ bool brcmf_p2p_send_action_frame(struct brcmf_cfg80211_info *cfg, | |||
1637 | struct brcmf_fil_af_params_le *af_params) | 1637 | struct brcmf_fil_af_params_le *af_params) |
1638 | { | 1638 | { |
1639 | struct brcmf_p2p_info *p2p = &cfg->p2p; | 1639 | struct brcmf_p2p_info *p2p = &cfg->p2p; |
1640 | struct brcmf_if *ifp = netdev_priv(ndev); | ||
1640 | struct brcmf_fil_action_frame_le *action_frame; | 1641 | struct brcmf_fil_action_frame_le *action_frame; |
1641 | struct brcmf_config_af_params config_af_params; | 1642 | struct brcmf_config_af_params config_af_params; |
1642 | struct afx_hdl *afx_hdl = &p2p->afx_hdl; | 1643 | struct afx_hdl *afx_hdl = &p2p->afx_hdl; |
@@ -1725,7 +1726,7 @@ bool brcmf_p2p_send_action_frame(struct brcmf_cfg80211_info *cfg, | |||
1725 | 1726 | ||
1726 | /* To make sure to send successfully action frame, turn off mpc */ | 1727 | /* To make sure to send successfully action frame, turn off mpc */ |
1727 | if (config_af_params.mpc_onoff == 0) | 1728 | if (config_af_params.mpc_onoff == 0) |
1728 | brcmf_set_mpc(netdev_priv(ndev), 0); | 1729 | brcmf_set_mpc(ifp, 0); |
1729 | 1730 | ||
1730 | /* set status and destination address before sending af */ | 1731 | /* set status and destination address before sending af */ |
1731 | if (p2p->next_af_subtype != P2P_PAF_SUBTYPE_INVALID) { | 1732 | if (p2p->next_af_subtype != P2P_PAF_SUBTYPE_INVALID) { |
@@ -1753,7 +1754,7 @@ bool brcmf_p2p_send_action_frame(struct brcmf_cfg80211_info *cfg, | |||
1753 | * care of current piggback algo, lets abort the scan here | 1754 | * care of current piggback algo, lets abort the scan here |
1754 | * itself. | 1755 | * itself. |
1755 | */ | 1756 | */ |
1756 | brcmf_notify_escan_complete(cfg, ndev, true, true); | 1757 | brcmf_notify_escan_complete(cfg, ifp, true, true); |
1757 | 1758 | ||
1758 | /* update channel */ | 1759 | /* update channel */ |
1759 | af_params->channel = cpu_to_le32(afx_hdl->peer_chan); | 1760 | af_params->channel = cpu_to_le32(afx_hdl->peer_chan); |
@@ -1820,7 +1821,7 @@ exit: | |||
1820 | clear_bit(BRCMF_P2P_STATUS_WAITING_NEXT_ACT_FRAME, &p2p->status); | 1821 | clear_bit(BRCMF_P2P_STATUS_WAITING_NEXT_ACT_FRAME, &p2p->status); |
1821 | /* if all done, turn mpc on again */ | 1822 | /* if all done, turn mpc on again */ |
1822 | if (config_af_params.mpc_onoff == 1) | 1823 | if (config_af_params.mpc_onoff == 1) |
1823 | brcmf_set_mpc(netdev_priv(ndev), 1); | 1824 | brcmf_set_mpc(ifp, 1); |
1824 | 1825 | ||
1825 | return ack; | 1826 | return ack; |
1826 | } | 1827 | } |
@@ -2040,7 +2041,7 @@ int brcmf_p2p_ifchange(struct brcmf_cfg80211_info *cfg, | |||
2040 | brcmf_err("vif for P2PAPI_BSSCFG_PRIMARY does not exist\n"); | 2041 | brcmf_err("vif for P2PAPI_BSSCFG_PRIMARY does not exist\n"); |
2041 | return -EPERM; | 2042 | return -EPERM; |
2042 | } | 2043 | } |
2043 | brcmf_notify_escan_complete(cfg, vif->ifp->ndev, true, true); | 2044 | brcmf_notify_escan_complete(cfg, vif->ifp, true, true); |
2044 | vif = p2p->bss_idx[P2PAPI_BSSCFG_CONNECTION].vif; | 2045 | vif = p2p->bss_idx[P2PAPI_BSSCFG_CONNECTION].vif; |
2045 | if (!vif) { | 2046 | if (!vif) { |
2046 | brcmf_err("vif for P2PAPI_BSSCFG_CONNECTION does not exist\n"); | 2047 | brcmf_err("vif for P2PAPI_BSSCFG_CONNECTION does not exist\n"); |
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c index 3b79f0c89c47..d4e12018dce2 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c | |||
@@ -504,12 +504,10 @@ void brcmf_set_mpc(struct brcmf_if *ifp, int mpc) | |||
504 | } | 504 | } |
505 | } | 505 | } |
506 | 506 | ||
507 | s32 | 507 | s32 brcmf_notify_escan_complete(struct brcmf_cfg80211_info *cfg, |
508 | brcmf_notify_escan_complete(struct brcmf_cfg80211_info *cfg, | 508 | struct brcmf_if *ifp, bool aborted, |
509 | struct net_device *ndev, | 509 | bool fw_abort) |
510 | bool aborted, bool fw_abort) | ||
511 | { | 510 | { |
512 | struct brcmf_if *ifp = netdev_priv(ndev); | ||
513 | struct brcmf_scan_params_le params_le; | 511 | struct brcmf_scan_params_le params_le; |
514 | struct cfg80211_scan_request *scan_request; | 512 | struct cfg80211_scan_request *scan_request; |
515 | s32 err = 0; | 513 | s32 err = 0; |
@@ -578,9 +576,9 @@ int brcmf_cfg80211_del_iface(struct wiphy *wiphy, struct wireless_dev *wdev) | |||
578 | 576 | ||
579 | if (ndev) { | 577 | if (ndev) { |
580 | if (test_bit(BRCMF_SCAN_STATUS_BUSY, &cfg->scan_status) && | 578 | if (test_bit(BRCMF_SCAN_STATUS_BUSY, &cfg->scan_status) && |
581 | cfg->escan_info.ndev == ndev) | 579 | cfg->escan_info.ifp == netdev_priv(ndev)) |
582 | brcmf_notify_escan_complete(cfg, ndev, true, | 580 | brcmf_notify_escan_complete(cfg, netdev_priv(ndev), |
583 | true); | 581 | true, true); |
584 | 582 | ||
585 | brcmf_fil_iovar_int_set(netdev_priv(ndev), "mpc", 1); | 583 | brcmf_fil_iovar_int_set(netdev_priv(ndev), "mpc", 1); |
586 | } | 584 | } |
@@ -762,7 +760,7 @@ static void brcmf_escan_prep(struct brcmf_scan_params_le *params_le, | |||
762 | } | 760 | } |
763 | 761 | ||
764 | static s32 | 762 | static s32 |
765 | brcmf_run_escan(struct brcmf_cfg80211_info *cfg, struct net_device *ndev, | 763 | brcmf_run_escan(struct brcmf_cfg80211_info *cfg, struct brcmf_if *ifp, |
766 | struct cfg80211_scan_request *request, u16 action) | 764 | struct cfg80211_scan_request *request, u16 action) |
767 | { | 765 | { |
768 | s32 params_size = BRCMF_SCAN_PARAMS_FIXED_SIZE + | 766 | s32 params_size = BRCMF_SCAN_PARAMS_FIXED_SIZE + |
@@ -791,8 +789,7 @@ brcmf_run_escan(struct brcmf_cfg80211_info *cfg, struct net_device *ndev, | |||
791 | params->action = cpu_to_le16(action); | 789 | params->action = cpu_to_le16(action); |
792 | params->sync_id = cpu_to_le16(0x1234); | 790 | params->sync_id = cpu_to_le16(0x1234); |
793 | 791 | ||
794 | err = brcmf_fil_iovar_data_set(netdev_priv(ndev), "escan", | 792 | err = brcmf_fil_iovar_data_set(ifp, "escan", params, params_size); |
795 | params, params_size); | ||
796 | if (err) { | 793 | if (err) { |
797 | if (err == -EBUSY) | 794 | if (err == -EBUSY) |
798 | brcmf_dbg(INFO, "system busy : escan canceled\n"); | 795 | brcmf_dbg(INFO, "system busy : escan canceled\n"); |
@@ -807,16 +804,15 @@ exit: | |||
807 | 804 | ||
808 | static s32 | 805 | static s32 |
809 | brcmf_do_escan(struct brcmf_cfg80211_info *cfg, struct wiphy *wiphy, | 806 | brcmf_do_escan(struct brcmf_cfg80211_info *cfg, struct wiphy *wiphy, |
810 | struct net_device *ndev, struct cfg80211_scan_request *request) | 807 | struct brcmf_if *ifp, struct cfg80211_scan_request *request) |
811 | { | 808 | { |
812 | s32 err; | 809 | s32 err; |
813 | u32 passive_scan; | 810 | u32 passive_scan; |
814 | struct brcmf_scan_results *results; | 811 | struct brcmf_scan_results *results; |
815 | struct escan_info *escan = &cfg->escan_info; | 812 | struct escan_info *escan = &cfg->escan_info; |
816 | struct brcmf_if *ifp = netdev_priv(ndev); | ||
817 | 813 | ||
818 | brcmf_dbg(SCAN, "Enter\n"); | 814 | brcmf_dbg(SCAN, "Enter\n"); |
819 | escan->ndev = ndev; | 815 | escan->ifp = ifp; |
820 | escan->wiphy = wiphy; | 816 | escan->wiphy = wiphy; |
821 | escan->escan_state = WL_ESCAN_STATE_SCANNING; | 817 | escan->escan_state = WL_ESCAN_STATE_SCANNING; |
822 | passive_scan = cfg->active_scan ? 0 : 1; | 818 | passive_scan = cfg->active_scan ? 0 : 1; |
@@ -832,19 +828,19 @@ brcmf_do_escan(struct brcmf_cfg80211_info *cfg, struct wiphy *wiphy, | |||
832 | results->count = 0; | 828 | results->count = 0; |
833 | results->buflen = WL_ESCAN_RESULTS_FIXED_SIZE; | 829 | results->buflen = WL_ESCAN_RESULTS_FIXED_SIZE; |
834 | 830 | ||
835 | err = escan->run(cfg, ndev, request, WL_ESCAN_ACTION_START); | 831 | err = escan->run(cfg, ifp, request, WL_ESCAN_ACTION_START); |
836 | if (err) | 832 | if (err) |
837 | brcmf_set_mpc(ifp, 1); | 833 | brcmf_set_mpc(ifp, 1); |
838 | return err; | 834 | return err; |
839 | } | 835 | } |
840 | 836 | ||
841 | static s32 | 837 | static s32 |
842 | brcmf_cfg80211_escan(struct wiphy *wiphy, struct net_device *ndev, | 838 | brcmf_cfg80211_escan(struct wiphy *wiphy, struct brcmf_cfg80211_vif *vif, |
843 | struct cfg80211_scan_request *request, | 839 | struct cfg80211_scan_request *request, |
844 | struct cfg80211_ssid *this_ssid) | 840 | struct cfg80211_ssid *this_ssid) |
845 | { | 841 | { |
846 | struct brcmf_if *ifp = netdev_priv(ndev); | 842 | struct brcmf_if *ifp = vif->ifp; |
847 | struct brcmf_cfg80211_info *cfg = ndev_to_cfg(ndev); | 843 | struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy); |
848 | struct cfg80211_ssid *ssids; | 844 | struct cfg80211_ssid *ssids; |
849 | struct brcmf_cfg80211_scan_req *sr = &cfg->scan_req_int; | 845 | struct brcmf_cfg80211_scan_req *sr = &cfg->scan_req_int; |
850 | u32 passive_scan; | 846 | u32 passive_scan; |
@@ -870,10 +866,8 @@ brcmf_cfg80211_escan(struct wiphy *wiphy, struct net_device *ndev, | |||
870 | } | 866 | } |
871 | 867 | ||
872 | /* If scan req comes for p2p0, send it over primary I/F */ | 868 | /* If scan req comes for p2p0, send it over primary I/F */ |
873 | if (ifp->vif == cfg->p2p.bss_idx[P2PAPI_BSSCFG_DEVICE].vif) { | 869 | if (vif == cfg->p2p.bss_idx[P2PAPI_BSSCFG_DEVICE].vif) |
874 | ifp = cfg->p2p.bss_idx[P2PAPI_BSSCFG_PRIMARY].vif->ifp; | 870 | vif = cfg->p2p.bss_idx[P2PAPI_BSSCFG_PRIMARY].vif; |
875 | ndev = ifp->ndev; | ||
876 | } | ||
877 | 871 | ||
878 | /* Arm scan timeout timer */ | 872 | /* Arm scan timeout timer */ |
879 | mod_timer(&cfg->escan_timeout, jiffies + | 873 | mod_timer(&cfg->escan_timeout, jiffies + |
@@ -894,11 +888,11 @@ brcmf_cfg80211_escan(struct wiphy *wiphy, struct net_device *ndev, | |||
894 | set_bit(BRCMF_SCAN_STATUS_BUSY, &cfg->scan_status); | 888 | set_bit(BRCMF_SCAN_STATUS_BUSY, &cfg->scan_status); |
895 | if (escan_req) { | 889 | if (escan_req) { |
896 | cfg->escan_info.run = brcmf_run_escan; | 890 | cfg->escan_info.run = brcmf_run_escan; |
897 | err = brcmf_p2p_scan_prep(wiphy, request, ifp->vif); | 891 | err = brcmf_p2p_scan_prep(wiphy, request, vif); |
898 | if (err) | 892 | if (err) |
899 | goto scan_out; | 893 | goto scan_out; |
900 | 894 | ||
901 | err = brcmf_do_escan(cfg, wiphy, ndev, request); | 895 | err = brcmf_do_escan(cfg, wiphy, vif->ifp, request); |
902 | if (err) | 896 | if (err) |
903 | goto scan_out; | 897 | goto scan_out; |
904 | } else { | 898 | } else { |
@@ -950,16 +944,15 @@ scan_out: | |||
950 | static s32 | 944 | static s32 |
951 | brcmf_cfg80211_scan(struct wiphy *wiphy, struct cfg80211_scan_request *request) | 945 | brcmf_cfg80211_scan(struct wiphy *wiphy, struct cfg80211_scan_request *request) |
952 | { | 946 | { |
953 | struct net_device *ndev = request->wdev->netdev; | 947 | struct brcmf_cfg80211_vif *vif; |
954 | s32 err = 0; | 948 | s32 err = 0; |
955 | 949 | ||
956 | brcmf_dbg(TRACE, "Enter\n"); | 950 | brcmf_dbg(TRACE, "Enter\n"); |
957 | 951 | vif = container_of(request->wdev, struct brcmf_cfg80211_vif, wdev); | |
958 | if (!check_vif_up(container_of(request->wdev, | 952 | if (!check_vif_up(vif)) |
959 | struct brcmf_cfg80211_vif, wdev))) | ||
960 | return -EIO; | 953 | return -EIO; |
961 | 954 | ||
962 | err = brcmf_cfg80211_escan(wiphy, ndev, request, NULL); | 955 | err = brcmf_cfg80211_escan(wiphy, vif, request, NULL); |
963 | 956 | ||
964 | if (err) | 957 | if (err) |
965 | brcmf_err("scan error (%d)\n", err); | 958 | brcmf_err("scan error (%d)\n", err); |
@@ -2471,7 +2464,7 @@ void brcmf_abort_scanning(struct brcmf_cfg80211_info *cfg) | |||
2471 | set_bit(BRCMF_SCAN_STATUS_ABORT, &cfg->scan_status); | 2464 | set_bit(BRCMF_SCAN_STATUS_ABORT, &cfg->scan_status); |
2472 | if (cfg->scan_request) { | 2465 | if (cfg->scan_request) { |
2473 | escan->escan_state = WL_ESCAN_STATE_IDLE; | 2466 | escan->escan_state = WL_ESCAN_STATE_IDLE; |
2474 | brcmf_notify_escan_complete(cfg, escan->ndev, true, true); | 2467 | brcmf_notify_escan_complete(cfg, escan->ifp, true, true); |
2475 | } | 2468 | } |
2476 | clear_bit(BRCMF_SCAN_STATUS_BUSY, &cfg->scan_status); | 2469 | clear_bit(BRCMF_SCAN_STATUS_BUSY, &cfg->scan_status); |
2477 | clear_bit(BRCMF_SCAN_STATUS_ABORT, &cfg->scan_status); | 2470 | clear_bit(BRCMF_SCAN_STATUS_ABORT, &cfg->scan_status); |
@@ -2483,7 +2476,7 @@ static void brcmf_cfg80211_escan_timeout_worker(struct work_struct *work) | |||
2483 | container_of(work, struct brcmf_cfg80211_info, | 2476 | container_of(work, struct brcmf_cfg80211_info, |
2484 | escan_timeout_work); | 2477 | escan_timeout_work); |
2485 | 2478 | ||
2486 | brcmf_notify_escan_complete(cfg, cfg->escan_info.ndev, true, true); | 2479 | brcmf_notify_escan_complete(cfg, cfg->escan_info.ifp, true, true); |
2487 | } | 2480 | } |
2488 | 2481 | ||
2489 | static void brcmf_escan_timeout(unsigned long data) | 2482 | static void brcmf_escan_timeout(unsigned long data) |
@@ -2534,7 +2527,6 @@ brcmf_cfg80211_escan_handler(struct brcmf_if *ifp, | |||
2534 | const struct brcmf_event_msg *e, void *data) | 2527 | const struct brcmf_event_msg *e, void *data) |
2535 | { | 2528 | { |
2536 | struct brcmf_cfg80211_info *cfg = ifp->drvr->config; | 2529 | struct brcmf_cfg80211_info *cfg = ifp->drvr->config; |
2537 | struct net_device *ndev = ifp->ndev; | ||
2538 | s32 status; | 2530 | s32 status; |
2539 | s32 err = 0; | 2531 | s32 err = 0; |
2540 | struct brcmf_escan_result_le *escan_result_le; | 2532 | struct brcmf_escan_result_le *escan_result_le; |
@@ -2547,9 +2539,8 @@ brcmf_cfg80211_escan_handler(struct brcmf_if *ifp, | |||
2547 | 2539 | ||
2548 | status = e->status; | 2540 | status = e->status; |
2549 | 2541 | ||
2550 | if (!ndev || !test_bit(BRCMF_SCAN_STATUS_BUSY, &cfg->scan_status)) { | 2542 | if (!test_bit(BRCMF_SCAN_STATUS_BUSY, &cfg->scan_status)) { |
2551 | brcmf_err("scan not ready ndev %p drv_status %x\n", ndev, | 2543 | brcmf_err("scan not ready, bssidx=%d\n", ifp->bssidx); |
2552 | !test_bit(BRCMF_SCAN_STATUS_BUSY, &cfg->scan_status)); | ||
2553 | return -EPERM; | 2544 | return -EPERM; |
2554 | } | 2545 | } |
2555 | 2546 | ||
@@ -2620,7 +2611,7 @@ brcmf_cfg80211_escan_handler(struct brcmf_if *ifp, | |||
2620 | cfg->escan_info.escan_buf; | 2611 | cfg->escan_info.escan_buf; |
2621 | brcmf_inform_bss(cfg); | 2612 | brcmf_inform_bss(cfg); |
2622 | aborted = status != BRCMF_E_STATUS_SUCCESS; | 2613 | aborted = status != BRCMF_E_STATUS_SUCCESS; |
2623 | brcmf_notify_escan_complete(cfg, ndev, aborted, | 2614 | brcmf_notify_escan_complete(cfg, ifp, aborted, |
2624 | false); | 2615 | false); |
2625 | } else | 2616 | } else |
2626 | brcmf_dbg(SCAN, "Ignored scan complete result 0x%x\n", | 2617 | brcmf_dbg(SCAN, "Ignored scan complete result 0x%x\n", |
@@ -2856,7 +2847,6 @@ brcmf_notify_sched_scan_results(struct brcmf_if *ifp, | |||
2856 | const struct brcmf_event_msg *e, void *data) | 2847 | const struct brcmf_event_msg *e, void *data) |
2857 | { | 2848 | { |
2858 | struct brcmf_cfg80211_info *cfg = ifp->drvr->config; | 2849 | struct brcmf_cfg80211_info *cfg = ifp->drvr->config; |
2859 | struct net_device *ndev = ifp->ndev; | ||
2860 | struct brcmf_pno_net_info_le *netinfo, *netinfo_start; | 2850 | struct brcmf_pno_net_info_le *netinfo, *netinfo_start; |
2861 | struct cfg80211_scan_request *request = NULL; | 2851 | struct cfg80211_scan_request *request = NULL; |
2862 | struct cfg80211_ssid *ssid = NULL; | 2852 | struct cfg80211_ssid *ssid = NULL; |
@@ -2940,7 +2930,7 @@ brcmf_notify_sched_scan_results(struct brcmf_if *ifp, | |||
2940 | } | 2930 | } |
2941 | 2931 | ||
2942 | set_bit(BRCMF_SCAN_STATUS_BUSY, &cfg->scan_status); | 2932 | set_bit(BRCMF_SCAN_STATUS_BUSY, &cfg->scan_status); |
2943 | err = brcmf_do_escan(cfg, wiphy, ndev, request); | 2933 | err = brcmf_do_escan(cfg, wiphy, ifp, request); |
2944 | if (err) { | 2934 | if (err) { |
2945 | clear_bit(BRCMF_SCAN_STATUS_BUSY, &cfg->scan_status); | 2935 | clear_bit(BRCMF_SCAN_STATUS_BUSY, &cfg->scan_status); |
2946 | goto out_err; | 2936 | goto out_err; |
@@ -3097,7 +3087,7 @@ static int brcmf_cfg80211_sched_scan_stop(struct wiphy *wiphy, | |||
3097 | brcmf_dbg(SCAN, "enter\n"); | 3087 | brcmf_dbg(SCAN, "enter\n"); |
3098 | brcmf_dev_pno_clean(ndev); | 3088 | brcmf_dev_pno_clean(ndev); |
3099 | if (cfg->sched_escan) | 3089 | if (cfg->sched_escan) |
3100 | brcmf_notify_escan_complete(cfg, ndev, true, true); | 3090 | brcmf_notify_escan_complete(cfg, netdev_priv(ndev), true, true); |
3101 | return 0; | 3091 | return 0; |
3102 | } | 3092 | } |
3103 | 3093 | ||
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.h b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.h index cd4af981e224..2907437ef438 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.h +++ b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.h | |||
@@ -238,9 +238,8 @@ struct escan_info { | |||
238 | u32 escan_state; | 238 | u32 escan_state; |
239 | u8 escan_buf[WL_ESCAN_BUF_SIZE]; | 239 | u8 escan_buf[WL_ESCAN_BUF_SIZE]; |
240 | struct wiphy *wiphy; | 240 | struct wiphy *wiphy; |
241 | struct net_device *ndev; | 241 | struct brcmf_if *ifp; |
242 | s32 (*run)(struct brcmf_cfg80211_info *cfg, | 242 | s32 (*run)(struct brcmf_cfg80211_info *cfg, struct brcmf_if *ifp, |
243 | struct net_device *ndev, | ||
244 | struct cfg80211_scan_request *request, u16 action); | 243 | struct cfg80211_scan_request *request, u16 action); |
245 | }; | 244 | }; |
246 | 245 | ||
@@ -493,8 +492,8 @@ bool brcmf_cfg80211_vif_event_armed(struct brcmf_cfg80211_info *cfg); | |||
493 | int brcmf_cfg80211_wait_vif_event_timeout(struct brcmf_cfg80211_info *cfg, | 492 | int brcmf_cfg80211_wait_vif_event_timeout(struct brcmf_cfg80211_info *cfg, |
494 | u8 action, ulong timeout); | 493 | u8 action, ulong timeout); |
495 | s32 brcmf_notify_escan_complete(struct brcmf_cfg80211_info *cfg, | 494 | s32 brcmf_notify_escan_complete(struct brcmf_cfg80211_info *cfg, |
496 | struct net_device *ndev, | 495 | struct brcmf_if *ifp, bool aborted, |
497 | bool aborted, bool fw_abort); | 496 | bool fw_abort); |
498 | void brcmf_set_mpc(struct brcmf_if *ndev, int mpc); | 497 | void brcmf_set_mpc(struct brcmf_if *ndev, int mpc); |
499 | void brcmf_abort_scanning(struct brcmf_cfg80211_info *cfg); | 498 | void brcmf_abort_scanning(struct brcmf_cfg80211_info *cfg); |
500 | 499 | ||