Page MenuHomeFreeBSD

net80211 drivers: remove dead code in <drv>_parent() from some drivers
Needs ReviewPublic

Authored by avos on Feb 21 2016, 6:11 PM.

Details

Reviewers
adrian
Summary

For now, this method is called only in two cases:

  1. when the first vap is started (<drv>_init() is called here), or
  2. when the last vap is stopped (<drv>_stop() will be called in case when it was not called previously).

For other cases (IFF_PROMISC/IFF_ALLMULTI flags change, another vap addition) it's not called - so, anything other than <drv>_init()/<drv>_stop() is considered as dead code (and moved into appropriate places).

Changes:
upgt(4), ural(4), urtw(4), zyd(4) - just drop any code, related to multicast packet filter/promiscuous mode setting update (supports only one vap at a time, will be called via appropriate callbacks).
ral(4), run(4), wi(4) - if needed, state will be updated via ieee80211_promisc() anyway.
ath(4), mwl(4), bwn(4) - move code to <drv>_vap_create()
otus(4) - call ieee80211_stop() on error.

Notes:
wi(4) - note about hostap vs promiscuous mode incompatibility was moved to wi_update_promisc()
bwn(4) - previous version contains recursive locking + manpage says, that there is no multi-vap support (so, this code may be unneeded at all)

Test Plan

untested

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

avos retitled this revision from to net80211 drivers: remove dead code in <drv>_parent() from some drivers.
avos updated this object.
avos edited the test plan for this revision. (Show Details)
avos added a reviewer: adrian.
avos set the repository for this revision to rS FreeBSD src repository - subversion.

Let's get this tested. Except for if_wi, leave that alone for now (until I actually freaking fix it, sigh.)

Sorry, but it's still completely untested (similar change was done previously for rum(4)).

Ok. Let's put out a call to get this tested once the scan stuff is in -HEAD.