summaryrefslogtreecommitdiffstats
path: root/sys/dev/if_ndis
Commit message (Collapse)AuthorAgeFilesLines
* Change three methods in struct ieee80211com, namely ic_updateslot,glebius2015-05-251-5/+5
| | | | | | | | ic_update_mcast and ic_update_promisc, to pass pointer to the ieee80211com, not to the ifnet. Sponsored by: Netflix Sponsored by: Nginx, Inc.
* Set ic_softc in all 802.11 drivers. Not required right now, but will beglebius2015-05-251-0/+1
| | | | | | | used quite soon. Sponsored by: Netflix Sponsored by: Nginx, Inc.
* Make net80211 drivers supply their device name to the net80211 layer, soglebius2015-05-251-0/+1
| | | | | | | that the latter doesn't need to go through struct ifnet to get their name. Sponsored by: Netflix Sponsored by: Nginx, Inc.
* CALLOUT_MPSAFE has lost its meaning since r141428, i.e., for more than tenjkim2015-05-221-2/+2
| | | | | | | | | | years for head. However, it is continuously misused as the mpsafe argument for callout_init(9). Deprecate the flag and clean up callout_init() calls to make them more consistent. Differential Revision: https://reviews.freebsd.org/D2613 Reviewed by: jhb MFC after: 2 weeks
* Prepare for supporting driver-overridden curchan when submitting scanadrian2015-05-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | results. Right now the scan infrastructure assumes the channel is under net80211 control, and that when receiving beacon frames for scanning, the current channel is indeed what ic_curchan is set to. But firmware NICs with firmware scan support need more than this - they can do background scans whilst hiding the off-channel behaviour from net80211. Ie, net80211 still thinks everything is associated and on the main channel, but it's getting scan results from all the background traffic. However sta_add() pays attention to ic_curchan and discards scan results that aren't on the right channel. CCK beacon frames can be decoded from adjacent channels so the receive path and sta_add discard these as appropriate. This is fine for software scanning like for ath(4), but not for firmware NICs. So with those, the whole concept of background firmware scanning won't work without major hacks (eg, overriding ic_curchan before calling the beacon input / scan add.) As part of my scan overhaul, modify sta_add() and the scan_add() APIs to take an explicit current channel. The normal RX path will set it to ic_curchan so it's a no-op. However, drivers may decide to (eventually!) override the scan method to set the "right" current channel based on what the firmware reports the scan state is. So for example, iwn, rsu and other NICs will eventually do this: * driver issues scan start firmware command; * firmware sends a "scan start on channel X" notify; * firmware sends a bunch of beacon RX's as part of the scan results; * .. and the driver will replace scan_add() curchan with channel X, so scan results are correct. * firmware sends a "scan start on channel Y" notify; * firmware sends more beacons... * .. the driver replaces scan_add() curchan with channel Y. Note: * Eventually, net80211 should eventually grow the idea of a per-packet current channel. It's possible in various modes (eg WAVE, P2P, etc) that individual frames can come in from different channels and that is under firmware control rather than driver/net80211 control, so we should support that.
* Remove MAXBSIZE use from drivers where it has nothing to do.mav2015-03-221-1/+2
| | | | | | | In some cases limits are just not needed, in others -- DFLTPHYS is the right constant to use instead. MFC after: 1 month
* Mechanically convert to if_inc_counter().glebius2014-09-191-5/+5
|
* When anouncing link state changes on an 802.11 interface with a vap,jhb2014-08-291-8/+11
| | | | | | | | | announce the change on the vap's ifnet instead of the main ifnet. This matches the behavior of other wireless drivers in the tree and allows the default devd configuration to correctly start dhclient automatically after an ndis wireless device associates. MFC after: 2 weeks
* Include necessary headers that now are available due to pollutionglebius2013-10-282-0/+2
| | | | | | | via if_var.h. Sponsored by: Netflix Sponsored by: Nginx, Inc.
* The r48589 promised to remove implicit inclusion of if_var.h soon. Prepareglebius2013-10-264-0/+5
| | | | | | | | to this event, adding if_var.h to files that do need it. Also, include all includes that now are included due to implicit pollution via if_var.h Sponsored by: Netflix Sponsored by: Nginx, Inc.
* Give (*ext_free) an int return value allowing for very sophisticatedandre2013-08-251-2/+2
| | | | | | | | external mbuf buffer management capabilities in the future. For now only EXT_FREE_OK is defined with current legacy behavior. Sponsored by: The FreeBSD Foundation
* Mechanically substitute flags from historic mbuf allocator withglebius2012-12-041-3/+3
| | | | malloc(9) flags in sys/dev.
* Convert a number of drivers to obtaining their parent DMA tag from theirscottl2012-03-121-1/+1
| | | | PCI device attachment.
* ether_ifattach() sets if_mtu to ETHERMTU, don't bother set it againkevlo2012-01-071-1/+0
| | | | Reviewed by: yongari
* In sys/dev/if_ndis/if_ndis_pccard.c, fix a bug where a garbage rid wasdim2012-01-031-1/+1
| | | | | | | | passed to resource_list_add(). The rid that was just returned by bus_alloc_resource_any() should have been used instead. Reviewed by: jhb MFC after: 1 week
* Fix some net80211 enum nits:bschmidt2011-12-171-7/+7
| | | | | | | | | | - ic_vap_create() uses an ieee80211_opmode argument - ieee80211_rate2media() takes an ieee80211_phymode argument - ieee80211_plcp2rate() takes an ieee80211_phytype argument - cast to enum ieee80211_protmode and ieee80211_roamingmode to silence compiler warnings Submitted by: arundel@
* - There's no need to overwrite the default device method with the defaultmarius2011-11-221-3/+1
| | | | | | | | | | one. Interestingly, these are actually the default for quite some time (bus_generic_driver_added(9) since r52045 and bus_generic_print_child(9) since r52045) but even recently added device drivers do this unnecessarily. Discussed with: jhb, marcel - While at it, use DEVMETHOD_END. Discussed with: jhb - Also while at it, use __FBSDID.
* Revert the ndis part of r212122, windrv_stub.c already adds a MODULE_VERSIONthompsa2011-01-221-1/+0
| | | | | | | | and this breaks loading miniport drivers from loader.conf Reported by: Yuri <yuri^rawbw^com> Submitted by: Paul B Mahol MFC after: 3 days
* Don't try to free an unassigned pointer.bschmidt2011-01-071-4/+1
| | | | | Submitted by: Paul B Mahol <onemda at gmail.com> MFC after: 1 week
* Fix a bug introduced in r216518. The ndis_subsys field holds the PCItijl2010-12-191-7/+19
| | | | | | | subdevice ID in addition to the subvendor ID. Reported by: Paul B Mahol 'onemda gmail com' Approved by: kib (mentor)
* Use convenience functions where possible instead of accessing the PCItijl2010-12-181-9/+4
| | | | | | | | | | | | | configuration registers directly. Remove pci_enable_io calls where they are redundant. The PCI bus driver will set the right bits when the corresponding bus resource is activated. Remove redundant pci_* function calls from suspend/resume methods. The bus driver already saves and restores the PCI configuration. Reviewed by: jhb Approved by: kib (mentor)
* Use bus_alloc_resource_any() instead of bus_alloc_resource(). Besides beingjhb2010-12-162-16/+14
| | | | | | | cleaner, this fixes problems where the code was using ~0 instead of ~0ul for the upper bound on "any" resources. MFC after: 1 month
* There is no reason to call rt_ifmsg(), remove it.bschmidt2010-10-191-4/+0
| | | | | Submitted by: Paul B Mahol <onemda at gmail.com> MFC after: 1 week
* WPA_CSE_WEP104 was being incorrectly checked.rpaulo2010-10-131-1/+1
| | | | Found with: clang
* Add missing MODULE_VERSION() definitions, this resolves problems aroundthompsa2010-09-011-0/+1
| | | | | | | | duplicate module loads. PR: usb/125736 Submitted by: danger, mm Reviewed by: hselasky
* Remove extraneous semicolons, no functional changes.mbr2010-01-071-1/+1
| | | | | Submitted by: Marc Balmer <marc@msys.ch> MFC after: 1 week
* len must be int, not size_trpaulo2010-01-061-1/+1
| | | | Submitted by: novel
* Add net80211 media status reporting.rpaulo2010-01-051-8/+19
| | | | | PR: 142197 Submitted by: Paul <onemda at gmail.com>
* Set correct USB device descriptionthompsa2009-12-221-0/+1
| | | | Submitted by: Paul B Mahol
* Pass all IEs to net80211.rpaulo2009-12-141-18/+5
| | | | | | PR: 141376 Submitted by: Paul <onemda at gmail.com> MFC after: 1 week
* ndis_scan_results() can sleep if the scan results are not ready whenjhb2009-12-021-9/+5
| | | | | | | | | ndis_scan() is called. However, ndis_scan() is invoked from softclock() and cannot sleep. Move ndis_scan_results() to the ndis' driver's scan_end hook instead. Submitted by: Paul B Mahol onemda of gmail MFC after: 1 week
* Big style cleanup. While there remove references to FreeBSD versionsrpaulo2009-11-022-124/+66
| | | | | | older than 6.0. Submitted by: Paul B Mahol <onemda at gmail.com>
* Fix a bad use of NULL instead of zero for int comparison. Sorry for thecokane2009-10-011-3/+3
| | | | | | | breakage. Submitted by: bz, des, onemda MFC after: 3 days
* style(9) fixes (always compare pointers to NULL)cokane2009-10-011-3/+3
| | | | | | | | Also, the previous commit to sys/dev/if_ndis/if_ndis.c also included the removal of a call to ndis_setstate_80211 that is no longer needed. Submitted by: sam MFC after: 3 days
* Correct a bug that could lead to a kernel panic if a user attempted tocokane2009-09-301-10/+3
| | | | | | | | | perform 802.11 operations directly on the ndis0 interface before the first VAP (wlan0) had been created. This would lead to a NULL-pointer dereference in the kernel. Submitted by: Paul B. Mahol <onemda@gmail.com> MFC after: 3 days
* The ndis_scan function may be started after ndis vap have been destroyedcokane2009-09-221-0/+5
| | | | | | PR: kern/138632 Submitted by: Paul B. Mahol <onemda at gmail.com> MFC after: 3 days
* Fix regression in last set of commits. Submitted via e-mail and thencokane2009-07-201-0/+2
| | | | | | | | | nagged again via PR. Thank Paul for his persistence and contributions. PR: 136895 Submitted by: Paul B. Mahol <onemda@gmail.com> Reviewed by: sam (timeout, 10 days), weongyo (timeout, 10 days), me Approved by: re (Kostik Belousov <kostikbel@gmail.com>)
* Use if_maddr_rlock()/if_maddr_runlock() rather than IF_ADDR_LOCK()/rwatson2009-06-261-3/+3
| | | | | | | | | | | | | IF_ADDR_UNLOCK() across network device drivers when accessing the per-interface multicast address list, if_multiaddrs. This will allow us to change the locking strategy without affecting our driver programming interface or binary interface. For two wireless drivers, remove unnecessary locking, since they don't actually access the multicast address list. Approved by: re (kib) MFC after: 6 weeks
* Code cleanup by moving some repetitive code into an ndis_get_bssid_listcokane2009-06-231-37/+39
| | | | | | helper function. Also, add ieee80211_announce() call for bootverbose case. Submitted by: Paul B. Mahol <onemda@gmail.com>
* - Make struct usb_xfer opaque so that drivers can not access the internalsthompsa2009-06-234-4/+4
| | | | - Reduce the number of headers needed for a usb driver, the common case is just usb.h and usbdi.h
* Replace use of ic->ic_flags with vap->iv_flags to operate on per-vap flagscokane2009-06-181-8/+10
| | | | | | for ndis 802.11 work. Submitted by: Paul B. Mahol <onemda@gmail.com>
* s/usb2_/usb_|usbd_/ on all function names for the USB stack.thompsa2009-06-151-3/+3
|
* Fix an LORcokane2009-06-101-6/+0
| | | | | Submitted by: Paul B. Mahol <onemda@gmail.com> MFC after: 1 week
* Commit missed driver_info to driver_ivar change in usb_attach_args.thompsa2009-06-081-2/+2
| | | | Pointed out by: kib
* fix setting of ni_txratesam2009-06-021-25/+1
| | | | Submitted by: "Paul B. Mahol" <onemda@gmail.com>
* s/usb2_/usb_/ on all typedefs for the USB stack.thompsa2009-05-291-1/+1
|
* s/usb2_/usb_/ on all C structs for the USB stack.thompsa2009-05-282-5/+5
|
* Fix a few variable renames of usb2_mode outside dev/usb.thompsa2009-05-211-1/+1
|
* update for net80211 rx api changesam2009-05-201-3/+1
|
* Create a taskqueue for each wireless interface which provides a serialisedthompsa2009-05-022-94/+56
| | | | | | | | | | | | | | | | | | | | | | | sleepable context for net80211 driver callbacks. This removes the need for USB and firmware based drivers to roll their own code to defer the chip programming for state changes, scan requests, channel changes and mcast/promisc updates. When a driver callback completes the hardware state is now guaranteed to have been updated and is in sync with net80211 layer. This nukes around 1300 lines of code from the wireless device drivers making them more readable and less race prone. The net80211 layer has been updated as follows - all state/channel changes are serialised on the taskqueue. - ieee80211_new_state() always queues and can now be called from any context - scanning runs from a single taskq function and executes to completion. driver callbacks are synchronous so the channel, phy mode and rx filters are guaranteed to be set in hardware before probe request frames are transmitted. Help and contributions from Sam Leffler. Reviewed by: sam
OpenPOWER on IntegriCloud