| @@ -452,9 +452,9 @@ static void cfg80211_mgmt_registrations_update(struct wireless_dev *wdev) · 451 unmodified lines |
| 452 | | 452 | |
| 453 | lockdep_assert_held(&rdev->wiphy.mtx); | 453 | lockdep_assert_held(&rdev->wiphy.mtx); |
| 454 | | 454 | |
| 455 | spin_lock_bh(&wdev->mgmt_registrations_lock); | 455 | spin_lock_bh(&rdev->mgmt_registrations_lock); |
| 456 | if (!wdev->mgmt_registrations_need_update) { | 456 | if (!wdev->mgmt_registrations_need_update) { |
| 457 | spin_unlock_bh(&wdev->mgmt_registrations_lock); | 457 | spin_unlock_bh(&rdev->mgmt_registrations_lock); |
| 458 | return; | 458 | return; |
| 459 | } | 459 | } |
| 460 | | 460 | |
| @@ -479,7 +479,7 @@ static void cfg80211_mgmt_registrations_update(struct wireless_dev *wdev) · 18 unmodified lines |
| 479 | rcu_read_unlock(); | 479 | rcu_read_unlock(); |
| 480 | | 480 | |
| 481 | wdev->mgmt_registrations_need_update = 0; | 481 | wdev->mgmt_registrations_need_update = 0; |
| 482 | spin_unlock_bh(&wdev->mgmt_registrations_lock); | 482 | spin_unlock_bh(&rdev->mgmt_registrations_lock); |
| 483 | | 483 | |
| 484 | rdev_update_mgmt_frame_registrations(rdev, wdev, &upd); | 484 | rdev_update_mgmt_frame_registrations(rdev, wdev, &upd); |
| 485 | } | 485 | } |
| @@ -503,6 +503,7 @@ int cfg80211_mlme_register_mgmt(struct wireless_dev *wdev, u32 snd_portid, · 17 unmodified lines |
| 503 | int match_len, bool multicast_rx, | 503 | int match_len, bool multicast_rx, |
| 504 | struct netlink_ext_ack *extack) | 504 | struct netlink_ext_ack *extack) |
| 505 | { | 505 | { |
| | 506 | struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy); |
| 506 | struct cfg80211_mgmt_registration *reg, *nreg; | 507 | struct cfg80211_mgmt_registration *reg, *nreg; |
| 507 | int err = 0; | 508 | int err = 0; |
| 508 | u16 mgmt_type; | 509 | u16 mgmt_type; |
| @@ -548,7 +549,7 @@ int cfg80211_mlme_register_mgmt(struct wireless_dev *wdev, u32 snd_portid, · 39 unmodified lines |
| 548 | if (!nreg) | 549 | if (!nreg) |
| 549 | return -ENOMEM; | 550 | return -ENOMEM; |
| 550 | | 551 | |
| 551 | spin_lock_bh(&wdev->mgmt_registrations_lock); | 552 | spin_lock_bh(&rdev->mgmt_registrations_lock); |
| 552 | | 553 | |
| 553 | list_for_each_entry(reg, &wdev->mgmt_registrations, list) { | 554 | list_for_each_entry(reg, &wdev->mgmt_registrations, list) { |
| 554 | int mlen = min(match_len, reg->match_len); | 555 | int mlen = min(match_len, reg->match_len); |
| @@ -583,7 +584,7 @@ int cfg80211_mlme_register_mgmt(struct wireless_dev *wdev, u32 snd_portid, · 28 unmodified lines |
| 583 | list_add(&nreg->list, &wdev->mgmt_registrations); | 584 | list_add(&nreg->list, &wdev->mgmt_registrations); |
| 584 | } | 585 | } |
| 585 | wdev->mgmt_registrations_need_update = 1; | 586 | wdev->mgmt_registrations_need_update = 1; |
| 586 | spin_unlock_bh(&wdev->mgmt_registrations_lock); | 587 | spin_unlock_bh(&rdev->mgmt_registrations_lock); |
| 587 | | 588 | |
| 588 | cfg80211_mgmt_registrations_update(wdev); | 589 | cfg80211_mgmt_registrations_update(wdev); |
| 589 | | 590 | |
| @@ -591,7 +592,7 @@ int cfg80211_mlme_register_mgmt(struct wireless_dev *wdev, u32 snd_portid, · 1 unmodified line |
| 591 | | 592 | |
| 592 | out: | 593 | out: |
| 593 | kfree(nreg); | 594 | kfree(nreg); |
| 594 | spin_unlock_bh(&wdev->mgmt_registrations_lock); | 595 | spin_unlock_bh(&rdev->mgmt_registrations_lock); |
| 595 | | 596 | |
| 596 | return err; | 597 | return err; |
| 597 | } | 598 | } |
| @@ -602,7 +603,7 @@ void cfg80211_mlme_unregister_socket(struct wireless_dev *wdev, u32 nlportid) · 4 unmodified lines |
| 602 | struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy); | 603 | struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy); |
| 603 | struct cfg80211_mgmt_registration *reg, *tmp; | 604 | struct cfg80211_mgmt_registration *reg, *tmp; |
| 604 | | 605 | |
| 605 | spin_lock_bh(&wdev->mgmt_registrations_lock); | 606 | spin_lock_bh(&rdev->mgmt_registrations_lock); |
| 606 | | 607 | |
| 607 | list_for_each_entry_safe(reg, tmp, &wdev->mgmt_registrations, list) { | 608 | list_for_each_entry_safe(reg, tmp, &wdev->mgmt_registrations, list) { |
| 608 | if (reg->nlportid != nlportid) | 609 | if (reg->nlportid != nlportid) |
| @@ -615,7 +616,7 @@ void cfg80211_mlme_unregister_socket(struct wireless_dev *wdev, u32 nlportid) · 6 unmodified lines |
| 615 | schedule_work(&rdev->mgmt_registrations_update_wk); | 616 | schedule_work(&rdev->mgmt_registrations_update_wk); |
| 616 | } | 617 | } |
| 617 | | 618 | |
| 618 | spin_unlock_bh(&wdev->mgmt_registrations_lock); | 619 | spin_unlock_bh(&rdev->mgmt_registrations_lock); |
| 619 | | 620 | |
| 620 | if (nlportid && rdev->crit_proto_nlportid == nlportid) { | 621 | if (nlportid && rdev->crit_proto_nlportid == nlportid) { |
| 621 | rdev->crit_proto_nlportid = 0; | 622 | rdev->crit_proto_nlportid = 0; |
| @@ -628,15 +629,16 @@ void cfg80211_mlme_unregister_socket(struct wireless_dev *wdev, u32 nlportid) · 6 unmodified lines |
| 628 | | 629 | |
| 629 | void cfg80211_mlme_purge_registrations(struct wireless_dev *wdev) | 630 | void cfg80211_mlme_purge_registrations(struct wireless_dev *wdev) |
| 630 | { | 631 | { |
| | 632 | struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy); |
| 631 | struct cfg80211_mgmt_registration *reg, *tmp; | 633 | struct cfg80211_mgmt_registration *reg, *tmp; |
| 632 | | 634 | |
| 633 | spin_lock_bh(&wdev->mgmt_registrations_lock); | 635 | spin_lock_bh(&rdev->mgmt_registrations_lock); |
| 634 | list_for_each_entry_safe(reg, tmp, &wdev->mgmt_registrations, list) { | 636 | list_for_each_entry_safe(reg, tmp, &wdev->mgmt_registrations, list) { |
| 635 | list_del(®->list); | 637 | list_del(®->list); |
| 636 | kfree(reg); | 638 | kfree(reg); |
| 637 | } | 639 | } |
| 638 | wdev->mgmt_registrations_need_update = 1; | 640 | wdev->mgmt_registrations_need_update = 1; |
| 639 | spin_unlock_bh(&wdev->mgmt_registrations_lock); | 641 | spin_unlock_bh(&rdev->mgmt_registrations_lock); |
| 640 | | 642 | |
| 641 | cfg80211_mgmt_registrations_update(wdev); | 643 | cfg80211_mgmt_registrations_update(wdev); |
| 642 | } | 644 | } |
| @@ -784,7 +786,7 @@ bool cfg80211_rx_mgmt_khz(struct wireless_dev *wdev, int freq, int sig_dbm, · 141 unmodified lines |
| 784 | data = buf + ieee80211_hdrlen(mgmt->frame_control); | 786 | data = buf + ieee80211_hdrlen(mgmt->frame_control); |
| 785 | data_len = len - ieee80211_hdrlen(mgmt->frame_control); | 787 | data_len = len - ieee80211_hdrlen(mgmt->frame_control); |
| 786 | | 788 | |
| 787 | spin_lock_bh(&wdev->mgmt_registrations_lock); | 789 | spin_lock_bh(&rdev->mgmt_registrations_lock); |
| 788 | | 790 | |
| 789 | list_for_each_entry(reg, &wdev->mgmt_registrations, list) { | 791 | list_for_each_entry(reg, &wdev->mgmt_registrations, list) { |
| 790 | if (reg->frame_type != ftype) | 792 | if (reg->frame_type != ftype) |
| @@ -808,7 +810,7 @@ bool cfg80211_rx_mgmt_khz(struct wireless_dev *wdev, int freq, int sig_dbm, · 17 unmodified lines |
| 808 | break; | 810 | break; |
| 809 | } | 811 | } |
| 810 | | 812 | |
| 811 | spin_unlock_bh(&wdev->mgmt_registrations_lock); | 813 | spin_unlock_bh(&rdev->mgmt_registrations_lock); |
| 812 | | 814 | |
| 813 | trace_cfg80211_return_bool(result); | 815 | trace_cfg80211_return_bool(result); |
| 814 | return result; | 816 | return result; |