#include <string.h>
#include <byteswap.h>
#include <stdlib.h>
#include <gpxe/settings.h>
#include <gpxe/if_arp.h>
#include <gpxe/ethernet.h>
#include <gpxe/ieee80211.h>
#include <gpxe/netdevice.h>
#include <gpxe/net80211.h>
#include <gpxe/sec80211.h>
#include <gpxe/timer.h>
#include <gpxe/nap.h>
#include <unistd.h>
#include <errno.h>
Go to the source code of this file.
Data Structures | |
| struct | net80211_rx_info |
| Information associated with a received management packet. More... | |
| struct | net80211_probe_ctx |
| Context for a probe operation. More... | |
| struct | net80211_assoc_ctx |
| Context for the association task. More... | |
Defines | |
| #define | EINVAL_PKT_TOO_SHORT ( EINVAL | EUNIQ_01 ) |
| #define | EINVAL_PKT_VERSION ( EINVAL | EUNIQ_02 ) |
| #define | EINVAL_PKT_NOT_DATA ( EINVAL | EUNIQ_03 ) |
| #define | EINVAL_PKT_NOT_FROMDS ( EINVAL | EUNIQ_04 ) |
| #define | EINVAL_PKT_LLC_HEADER ( EINVAL | EUNIQ_05 ) |
| #define | EINVAL_CRYPTO_REQUEST ( EINVAL | EUNIQ_06 ) |
| #define | EINVAL_ACTIVE_SCAN ( EINVAL | EUNIQ_07 ) |
| #define | E80211_STATUS(stat) |
| Make return status code from 802.11 status code. | |
| #define | E80211_REASON(reas) |
| Make return status code from 802.11 reason code. | |
| #define | NET80211_PROBE_GATHER 1 |
| Seconds to wait after finding a network, to possibly find better APs for it. | |
| #define | NET80211_PROBE_GATHER_ALL 2 |
| Seconds to wait after finding a network, to possibly find other networks. | |
| #define | NET80211_PROBE_TIMEOUT 6 |
| Seconds to allow a probe to take if no network has been found. | |
| #define | ASSOC_TIMEOUT TICKS_PER_SEC |
| Number of ticks to wait for replies to association management frames. | |
| #define | ASSOC_RETRIES 2 |
| Number of times to try sending a particular association management frame. | |
| #define | LQ_SMOOTH 7 |
| Smoothing factor (1-7) for link quality calculation. | |
Functions | |
| FILE_LICENCE (GPL2_OR_LATER) | |
| static int | net80211_netdev_open (struct net_device *netdev) |
| Open 802.11 device and start association. | |
| static void | net80211_netdev_close (struct net_device *netdev) |
| Close 802.11 device. | |
| static int | net80211_netdev_transmit (struct net_device *netdev, struct io_buffer *iobuf) |
| Transmit packet on 802.11 device. | |
| static void | net80211_netdev_poll (struct net_device *netdev) |
| Poll 802.11 device for received packets and completed transmissions. | |
| static void | net80211_netdev_irq (struct net_device *netdev, int enable) |
| Enable or disable interrupts for 802.11 device. | |
| static int | net80211_ll_push (struct net_device *netdev, struct io_buffer *iobuf, const void *ll_dest, const void *ll_source, uint16_t net_proto) |
| Add 802.11 link-layer header. | |
| static int | net80211_ll_pull (struct net_device *netdev, struct io_buffer *iobuf, const void **ll_dest, const void **ll_source, uint16_t *net_proto) |
| static void | net80211_add_channels (struct net80211_device *dev, int start, int len, int txpower) |
| Add channels to 802.11 device. | |
| static void | net80211_filter_hw_channels (struct net80211_device *dev) |
| Filter 802.11 device channels for hardware capabilities. | |
| static void | net80211_set_rtscts_rate (struct net80211_device *dev) |
| Pick TX rate for RTS/CTS packets based on data rate. | |
| static int | net80211_process_capab (struct net80211_device *dev, u16 capab) |
| Update 802.11 device state to reflect received capabilities field. | |
| static int | net80211_process_ie (struct net80211_device *dev, union ieee80211_ie *ie, void *ie_end) |
| Update 802.11 device state to reflect received information elements. | |
| static union ieee80211_ie * | net80211_marshal_request_info (struct net80211_device *dev, union ieee80211_ie *ie) |
| Create information elements for outgoing probe or association packet. | |
| static void | net80211_step_associate (struct process *proc) |
| Step 802.11 association process. | |
| static void | net80211_handle_auth (struct net80211_device *dev, struct io_buffer *iob) |
| Handle receipt of 802.11 authentication frame. | |
| static void | net80211_handle_assoc_reply (struct net80211_device *dev, struct io_buffer *iob) |
| Handle receipt of 802.11 association reply frame. | |
| static int | net80211_send_disassoc (struct net80211_device *dev, int reason, int deauth) |
| Send 802.11 disassociation frame. | |
| static void | net80211_handle_mgmt (struct net80211_device *dev, struct io_buffer *iob, int signal) |
| Handle receipt of 802.11 management frame. | |
| static void | net80211_free_frags (struct net80211_device *dev, int fcid) |
| Free buffers used by 802.11 fragment cache entry. | |
| static struct io_buffer * | net80211_accum_frags (struct net80211_device *dev, int fcid, int nfrags, int size) |
| Accumulate 802.11 fragments into one I/O buffer. | |
| static void | net80211_rx_frag (struct net80211_device *dev, struct io_buffer *iob, int signal) |
| Handle receipt of 802.11 fragment. | |
| static int | net80211_check_settings_update (void) |
| Check for 802.11 SSID or key updates. | |
| static int | net80211_rate_is_erp (u16 rate) |
| Determine whether a transmission rate uses ERP/OFDM. | |
| u16 | net80211_duration (struct net80211_device *dev, int bytes, u16 rate) |
| Calculate one frame's contribution to 802.11 duration field. | |
| static int | net80211_ll_pull (struct net_device *netdev __unused, struct io_buffer *iobuf, const void **ll_dest, const void **ll_source, uint16_t *net_proto) |
| Remove 802.11 link-layer header. | |
| struct net80211_device * | net80211_get (struct net_device *netdev) |
| Get 802.11 device from wrapping network device. | |
| int | net80211_keep_mgmt (struct net80211_device *dev, int enable) |
| Set state of 802.11 device keeping management frames. | |
| struct io_buffer * | net80211_mgmt_dequeue (struct net80211_device *dev, int *signal) |
| Get 802.11 management frame. | |
| int | net80211_tx_mgmt (struct net80211_device *dev, u16 fc, u8 dest[6], struct io_buffer *iob) |
| Transmit 802.11 management frame. | |
| struct net80211_device * | net80211_alloc (size_t priv_size) |
| Allocate 802.11 device. | |
| int | net80211_register (struct net80211_device *dev, struct net80211_device_operations *ops, struct net80211_hw_info *hw) |
| Register 802.11 device with network stack. | |
| void | net80211_unregister (struct net80211_device *dev) |
| Unregister 802.11 device from network stack. | |
| void | net80211_free (struct net80211_device *dev) |
| Free 802.11 device. | |
| static void | net80211_set_state (struct net80211_device *dev, short clear, short set, u16 status) |
| Set state of 802.11 device. | |
| struct net80211_probe_ctx * | net80211_probe_start (struct net80211_device *dev, const char *essid, int active) |
| Begin probe of 802.11 networks. | |
| int | net80211_probe_step (struct net80211_probe_ctx *ctx) |
| Continue probe of 802.11 networks. | |
| struct net80211_wlan * | net80211_probe_finish_best (struct net80211_probe_ctx *ctx) |
| Finish probe of 802.11 networks, returning best-signal network found. | |
| struct list_head * | net80211_probe_finish_all (struct net80211_probe_ctx *ctx) |
| Finish probe of 802.11 networks, returning all networks found. | |
| void | net80211_free_wlan (struct net80211_wlan *wlan) |
| Free WLAN structure. | |
| void | net80211_free_wlanlist (struct list_head *list) |
| Free list of WLAN structures. | |
| void | net80211_autoassociate (struct net80211_device *dev) |
| Start 802.11 association process. | |
| void | net80211_set_rate_idx (struct net80211_device *dev, int rate) |
| Set data transmission rate for 802.11 device. | |
| int | net80211_change_channel (struct net80211_device *dev, int channel) |
| Configure 802.11 device to transmit on a certain channel. | |
| int | net80211_prepare_probe (struct net80211_device *dev, int band, int active) |
| Prepare 802.11 device channel and rate set for scanning. | |
| int | net80211_prepare_assoc (struct net80211_device *dev, struct net80211_wlan *wlan) |
| Prepare 802.11 device channel and rate set for communication. | |
| int | net80211_send_auth (struct net80211_device *dev, struct net80211_wlan *wlan, int method) |
| Send 802.11 initial authentication frame. | |
| int | net80211_send_assoc (struct net80211_device *dev, struct net80211_wlan *wlan) |
| Send 802.11 association frame. | |
| void | net80211_deauthenticate (struct net80211_device *dev, int rc) |
| Deauthenticate from current network and try again. | |
| static void | net80211_update_link_quality (struct net80211_device *dev, struct io_buffer *iob) |
| Update link quality information based on received beacon. | |
| void | net80211_rx (struct net80211_device *dev, struct io_buffer *iob, int signal, u16 rate) |
| Handle receipt of 802.11 frame. | |
| void | net80211_rx_err (struct net80211_device *dev, struct io_buffer *iob, int rc) |
| Indicate an error in receiving a packet. | |
| void | net80211_tx_complete (struct net80211_device *dev, struct io_buffer *iob, int retries, int rc) |
| Indicate the completed transmission of a packet. | |
Variables | |
| static struct list_head | net80211_devices = LIST_HEAD_INIT ( net80211_devices ) |
| List of 802.11 devices. | |
| static struct net80211_device_operations | net80211_null_ops |
| Set of device operations that does nothing. | |
| struct settings_applicator net80211_applicator | __settings_applicator |
| 802.11 settings applicator | |
| struct setting net80211_ssid_setting | __setting |
| The network name to associate with. | |
| static struct net_device_operations | net80211_netdev_ops |
| Network device operations for a wrapped 802.11 device. | |
| static u8 | net80211_ll_broadcast [] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff } |
| 802.11 broadcast MAC address | |
| static struct ll_protocol net80211_ll_protocol | __ll_protocol |
| 802.11 link-layer protocol | |
Definition in file net80211.c.
| #define EINVAL_PKT_TOO_SHORT ( EINVAL | EUNIQ_01 ) |
| #define EINVAL_PKT_VERSION ( EINVAL | EUNIQ_02 ) |
| #define EINVAL_PKT_NOT_DATA ( EINVAL | EUNIQ_03 ) |
| #define EINVAL_PKT_NOT_FROMDS ( EINVAL | EUNIQ_04 ) |
| #define EINVAL_PKT_LLC_HEADER ( EINVAL | EUNIQ_05 ) |
| #define EINVAL_CRYPTO_REQUEST ( EINVAL | EUNIQ_06 ) |
| #define EINVAL_ACTIVE_SCAN ( EINVAL | EUNIQ_07 ) |
| #define E80211_STATUS | ( | stat | ) |
Value:
( ((stat & 0x20)? EHOSTUNREACH : ECONNREFUSED) \ | ((stat & 0x1f) << 8) )
Definition at line 73 of file net80211.c.
Referenced by net80211_set_state().
| #define E80211_REASON | ( | reas | ) |
Value:
( ((reas & 0x20)? ENETRESET : ECONNRESET) \ | ((reas & 0x1f) << 8) )
Definition at line 77 of file net80211.c.
Referenced by net80211_set_state().
| #define NET80211_PROBE_GATHER 1 |
Seconds to wait after finding a network, to possibly find better APs for it.
This is used when a specific SSID to scan for is specified.
Definition at line 1267 of file net80211.c.
Referenced by net80211_probe_step().
| #define NET80211_PROBE_GATHER_ALL 2 |
Seconds to wait after finding a network, to possibly find other networks.
This is used when an empty SSID is specified, to scan for all networks.
Definition at line 1274 of file net80211.c.
Referenced by net80211_probe_step().
| #define NET80211_PROBE_TIMEOUT 6 |
Seconds to allow a probe to take if no network has been found.
Definition at line 1277 of file net80211.c.
Referenced by net80211_probe_step().
| #define ASSOC_TIMEOUT TICKS_PER_SEC |
Number of ticks to wait for replies to association management frames.
Definition at line 1647 of file net80211.c.
Referenced by net80211_step_associate().
| #define ASSOC_RETRIES 2 |
Number of times to try sending a particular association management frame.
Definition at line 1650 of file net80211.c.
Referenced by net80211_step_associate().
| #define LQ_SMOOTH 7 |
Smoothing factor (1-7) for link quality calculation.
Definition at line 2414 of file net80211.c.
Referenced by net80211_update_link_quality().
| FILE_LICENCE | ( | GPL2_OR_LATER | ) |
| static int net80211_rate_is_erp | ( | u16 | rate | ) | [inline, static] |
Determine whether a transmission rate uses ERP/OFDM.
| rate | Rate in 100 kbps units |
| is_erp | TRUE if the rate is an ERP/OFDM rate |
Definition at line 422 of file net80211.c.
Referenced by net80211_duration().
00423 { 00424 if ( rate == 10 || rate == 20 || rate == 55 || rate == 110 ) 00425 return 0; 00426 return 1; 00427 }
| static int net80211_ll_pull | ( | struct net_device *netdev | __unused, | |
| struct io_buffer * | iobuf, | |||
| const void ** | ll_dest, | |||
| const void ** | ll_source, | |||
| uint16_t * | net_proto | |||
| ) | [static] |
Remove 802.11 link-layer header.
| netdev | Wrapping network device | |
| iobuf | I/O buffer |
| ll_dest | Link-layer destination address | |
| ll_source | Link-layer source | |
| net_proto | Network-layer protocol, in network byte order | |
| rc | Return status code |
Definition at line 559 of file net80211.c.
References ieee80211_frame::addr1, ieee80211_frame::addr3, ieee80211_llc_snap_header::ctrl, io_buffer::data, DBGC, ieee80211_llc_snap_header::dsap, EINVAL_PKT_LLC_HEADER, EINVAL_PKT_NOT_DATA, EINVAL_PKT_NOT_FROMDS, EINVAL_PKT_TOO_SHORT, EINVAL_PKT_VERSION, ieee80211_llc_snap_header::ethertype, ieee80211_frame::fc, IEEE80211_FC_FROMDS, IEEE80211_FC_SUBTYPE, IEEE80211_FC_TODS, IEEE80211_FC_TYPE, IEEE80211_FC_VERSION, IEEE80211_LLC_CTRL, IEEE80211_LLC_DSAP, IEEE80211_LLC_HEADER_LEN, IEEE80211_LLC_SSAP, IEEE80211_STYPE_DATA, IEEE80211_THIS_VERSION, IEEE80211_TYP_FRAME_HEADER_LEN, IEEE80211_TYPE_DATA, iob_len(), iob_pull, netdev, ieee80211_llc_snap_header::oui, net_device::priv, and ieee80211_llc_snap_header::ssap.
00563 { 00564 struct ieee80211_frame *hdr = iobuf->data; 00565 struct ieee80211_llc_snap_header *lhdr = 00566 ( void * ) hdr + IEEE80211_TYP_FRAME_HEADER_LEN; 00567 00568 /* Bunch of sanity checks */ 00569 if ( iob_len ( iobuf ) < IEEE80211_TYP_FRAME_HEADER_LEN + 00570 IEEE80211_LLC_HEADER_LEN ) { 00571 DBGC ( netdev->priv, "802.11 %p packet too short (%zd bytes)\n", 00572 netdev->priv, iob_len ( iobuf ) ); 00573 return -EINVAL_PKT_TOO_SHORT; 00574 } 00575 00576 if ( ( hdr->fc & IEEE80211_FC_VERSION ) != IEEE80211_THIS_VERSION ) { 00577 DBGC ( netdev->priv, "802.11 %p packet invalid version %04x\n", 00578 netdev->priv, hdr->fc & IEEE80211_FC_VERSION ); 00579 return -EINVAL_PKT_VERSION; 00580 } 00581 00582 if ( ( hdr->fc & IEEE80211_FC_TYPE ) != IEEE80211_TYPE_DATA || 00583 ( hdr->fc & IEEE80211_FC_SUBTYPE ) != IEEE80211_STYPE_DATA ) { 00584 DBGC ( netdev->priv, "802.11 %p packet not data/data (fc=%04x)\n", 00585 netdev->priv, hdr->fc ); 00586 return -EINVAL_PKT_NOT_DATA; 00587 } 00588 00589 if ( ( hdr->fc & ( IEEE80211_FC_TODS | IEEE80211_FC_FROMDS ) ) != 00590 IEEE80211_FC_FROMDS ) { 00591 DBGC ( netdev->priv, "802.11 %p packet not from DS (fc=%04x)\n", 00592 netdev->priv, hdr->fc ); 00593 return -EINVAL_PKT_NOT_FROMDS; 00594 } 00595 00596 if ( lhdr->dsap != IEEE80211_LLC_DSAP || lhdr->ssap != IEEE80211_LLC_SSAP || 00597 lhdr->ctrl != IEEE80211_LLC_CTRL || lhdr->oui[0] || lhdr->oui[1] || 00598 lhdr->oui[2] ) { 00599 DBGC ( netdev->priv, "802.11 %p LLC header is not plain EtherType " 00600 "encapsulator: %02x->%02x [%02x] %02x:%02x:%02x %04x\n", 00601 netdev->priv, lhdr->dsap, lhdr->ssap, lhdr->ctrl, 00602 lhdr->oui[0], lhdr->oui[1], lhdr->oui[2], lhdr->ethertype ); 00603 return -EINVAL_PKT_LLC_HEADER; 00604 } 00605 00606 iob_pull ( iobuf, sizeof ( *hdr ) + sizeof ( *lhdr ) ); 00607 00608 *ll_dest = hdr->addr1; 00609 *ll_source = hdr->addr3; 00610 *net_proto = lhdr->ethertype; 00611 return 0; 00612 }
| int net80211_tx_mgmt | ( | struct net80211_device * | dev, | |
| u16 | fc, | |||
| u8 | dest[6], | |||
| struct io_buffer * | iob | |||
| ) |
Transmit 802.11 management frame.
| dev | 802.11 device | |
| fc | Frame Control flags for management frame | |
| dest | Destination access point | |
| iob | I/O buffer |
| rc | Return status code |
It is required that iob have at least 24 bytes of headroom reserved before its data start.
Definition at line 723 of file net80211.c.
References ieee80211_frame::addr1, ieee80211_frame::addr2, ieee80211_frame::addr3, net80211_device::crypto, ieee80211_frame::duration, EINVAL_CRYPTO_REQUEST, net80211_crypto::encrypt, ETH_ALEN, ieee80211_frame::fc, free_iob(), IEEE80211_FC_PROTECTED, IEEE80211_MAKESEQ, IEEE80211_THIS_VERSION, IEEE80211_TYP_FRAME_HEADER_LEN, IEEE80211_TYPE_MGMT, iob_push, net80211_device::last_tx_seqnr, net_device::ll_addr, memcpy, net80211_duration(), net80211_device::netdev, netdev_tx(), net80211_device::rate, net80211_device::rates, and ieee80211_frame::seq.
Referenced by net80211_probe_step(), net80211_send_assoc(), net80211_send_auth(), and net80211_send_disassoc().
00725 { 00726 struct ieee80211_frame *hdr = iob_push ( iob, 00727 IEEE80211_TYP_FRAME_HEADER_LEN ); 00728 00729 hdr->fc = IEEE80211_THIS_VERSION | IEEE80211_TYPE_MGMT | 00730 ( fc & ~IEEE80211_FC_PROTECTED ); 00731 hdr->duration = net80211_duration ( dev, 10, dev->rates[dev->rate] ); 00732 hdr->seq = IEEE80211_MAKESEQ ( ++dev->last_tx_seqnr, 0 ); 00733 00734 memcpy ( hdr->addr1, dest, ETH_ALEN ); /* DA = RA */ 00735 memcpy ( hdr->addr2, dev->netdev->ll_addr, ETH_ALEN ); /* SA = TA */ 00736 memcpy ( hdr->addr3, dest, ETH_ALEN ); /* BSSID */ 00737 00738 if ( fc & IEEE80211_FC_PROTECTED ) { 00739 if ( ! dev->crypto ) 00740 return -EINVAL_CRYPTO_REQUEST; 00741 00742 struct io_buffer *eiob = dev->crypto->encrypt ( dev->crypto, 00743 iob ); 00744 free_iob ( iob ); 00745 iob = eiob; 00746 } 00747 00748 return netdev_tx ( dev->netdev, iob ); 00749 }
| static void net80211_set_state | ( | struct net80211_device * | dev, | |
| short | clear, | |||
| short | set, | |||
| u16 | status | |||
| ) | [inline, static] |
Set state of 802.11 device.
| dev | 802.11 device | |
| clear | Bitmask of flags to clear | |
| set | Bitmask of flags to set | |
| status | Status or reason code for most recent operation |
Clearing authentication also clears association; clearing association also clears security handshaking state. Clearing association removes the link-up flag from the wrapping net_device, but setting it does not automatically set the flag; that is left to the judgment of higher-level code.
Definition at line 874 of file net80211.c.
References net80211_device::assoc_rc, net80211_device_operations::config, E80211_REASON, E80211_STATUS, NET80211_ASSOCIATED, NET80211_AUTHENTICATED, NET80211_CFG_ASSOC, NET80211_CRYPTO_SYNCED, NET80211_IS_REASON, NET80211_PROBED, NET80211_STATUS_MASK, net80211_device::netdev, netdev_link_down(), netdev_link_err(), net80211_device::op, and net80211_device::state.
Referenced by net80211_autoassociate(), net80211_handle_assoc_reply(), net80211_handle_auth(), net80211_handle_mgmt(), net80211_prepare_assoc(), net80211_send_assoc(), net80211_send_auth(), and net80211_send_disassoc().
00877 { 00878 /* The conditions in this function are deliberately formulated 00879 to be decidable at compile-time in most cases. Since clear 00880 and set are generally passed as constants, the body of this 00881 function can be reduced down to a few statements by the 00882 compiler. */ 00883 00884 const int statmsk = NET80211_STATUS_MASK | NET80211_IS_REASON; 00885 00886 if ( clear & NET80211_PROBED ) 00887 clear |= NET80211_AUTHENTICATED; 00888 00889 if ( clear & NET80211_AUTHENTICATED ) 00890 clear |= NET80211_ASSOCIATED; 00891 00892 if ( clear & NET80211_ASSOCIATED ) 00893 clear |= NET80211_CRYPTO_SYNCED; 00894 00895 dev->state = ( dev->state & ~clear ) | set; 00896 dev->state = ( dev->state & ~statmsk ) | ( status & statmsk ); 00897 00898 if ( clear & NET80211_ASSOCIATED ) 00899 netdev_link_down ( dev->netdev ); 00900 00901 if ( ( clear | set ) & NET80211_ASSOCIATED ) 00902 dev->op->config ( dev, NET80211_CFG_ASSOC ); 00903 00904 if ( status != 0 ) { 00905 if ( status & NET80211_IS_REASON ) 00906 dev->assoc_rc = -E80211_REASON ( status ); 00907 else 00908 dev->assoc_rc = -E80211_STATUS ( status ); 00909 netdev_link_err ( dev->netdev, dev->assoc_rc ); 00910 } 00911 }
| static void net80211_update_link_quality | ( | struct net80211_device * | dev, | |
| struct io_buffer * | iob | |||
| ) | [static] |
Update link quality information based on received beacon.
| dev | 802.11 device | |
| iob | I/O buffer containing beacon |
| rc | Return status code |
Definition at line 2423 of file net80211.c.
References ieee80211_frame::data, io_buffer::data, ieee80211_beacon, net80211_device::last_beacon_timestamp, LQ_SMOOTH, NET80211_ASSOCIATED, net80211_device::rx_beacon_interval, net80211_device::state, and u32.
Referenced by net80211_handle_mgmt().
02425 { 02426 struct ieee80211_frame *hdr = iob->data; 02427 struct ieee80211_beacon *beacon; 02428 u32 dt, rxi; 02429 02430 if ( ! ( dev->state & NET80211_ASSOCIATED ) ) 02431 return; 02432 02433 beacon = ( struct ieee80211_beacon * ) hdr->data; 02434 dt = ( u32 ) ( beacon->timestamp - dev->last_beacon_timestamp ); 02435 rxi = dev->rx_beacon_interval; 02436 02437 rxi = ( LQ_SMOOTH * rxi ) + ( ( 8 - LQ_SMOOTH ) * dt ); 02438 dev->rx_beacon_interval = rxi >> 3; 02439 02440 dev->last_beacon_timestamp = beacon->timestamp; 02441 }
struct list_head net80211_devices = LIST_HEAD_INIT ( net80211_devices ) [static] |
struct net80211_device_operations net80211_null_ops [static] |
Set of device operations that does nothing.
Definition at line 85 of file net80211.c.
Referenced by net80211_alloc(), net80211_netdev_open(), and net80211_unregister().
struct net_device_operations net80211_netdev_ops [static] |
Initial value:
{
.open = net80211_netdev_open,
.close = net80211_netdev_close,
.transmit = net80211_netdev_transmit,
.poll = net80211_netdev_poll,
.irq = net80211_netdev_irq,
}
Definition at line 399 of file net80211.c.
u8 net80211_ll_broadcast[] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff } [static] |
802.11 broadcast MAC address
Definition at line 411 of file net80211.c.
Referenced by net80211_alloc(), and net80211_probe_step().
struct ll_protocol net80211_ll_protocol __ll_protocol [static] |
Initial value:
{
.name = "802.11",
.push = net80211_ll_push,
.pull = net80211_ll_pull,
.init_addr = eth_init_addr,
.ntoa = eth_ntoa,
.mc_hash = eth_mc_hash,
.eth_addr = eth_eth_addr,
.ll_proto = htons ( ARPHRD_ETHER ),
.hw_addr_len = ETH_ALEN,
.ll_addr_len = ETH_ALEN,
.ll_header_len = IEEE80211_TYP_FRAME_HEADER_LEN +
IEEE80211_LLC_HEADER_LEN,
}
Definition at line 615 of file net80211.c.
1.5.7.1