linux/drivers/staging/rtl8192e
Larry Finger e608063303 staging: rtl8192e: Convert typedef RT_RF_TYPE_DEF to enum rt_rf_type_def
Remove typedef from enum.
Rename enum.
Rename uses.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-24 10:52:57 -05:00
..
Kconfig staging/rtl81*: build as loadable modules only 2011-04-04 22:46:15 -07:00
Makefile staging: rtl8192e: Remove conditional code associated with EEPROM_OLD_FORMAT_SUPPORT 2011-08-23 21:33:27 -05:00
TODO rtl8192e: Add a TODO 2011-08-23 20:04:16 -05:00
dot11d.c From: wlanfae <wlanfae@realtek.com> 2011-08-23 19:00:42 -05:00
dot11d.h From: wlanfae <wlanfae@realtek.com> 2011-08-23 19:00:42 -05:00
internal.h staging: rtl8192e: Remove dead code associated with CONFIG_CRYPTO_HMAC 2011-08-23 21:19:35 -05:00
kmap_types.h From: wlanfae <wlanfae@realtek.com> 2011-08-23 19:00:42 -05:00
license From: wlanfae <wlanfae@realtek.com> 2011-08-23 19:00:42 -05:00
r819xE_cmdpkt.c staging: rtl8192e: Don't copy dev pointer to skb 2011-03-14 12:24:48 -07:00
r819xE_cmdpkt.h staging: rtl8192e: Pass priv to cmdpkt functions 2011-03-14 12:24:48 -07:00
r819xE_firmware.c staging: rtl8192e: Don't copy dev pointer to skb 2011-03-14 12:24:48 -07:00
r819xE_phy.c Fix common misspellings 2011-03-31 11:26:23 -03:00
r819xE_phy.h staging: rtl8192e: Pass ieee80211_device to callbacks 2011-03-14 12:24:46 -07:00
r819xE_phyreg.h
r8180_93cx6.c staging: rtl8192e: Pass r8192_priv to eprom_read 2011-03-07 13:31:43 -08:00
r8180_93cx6.h staging: rtl8192e: Pass r8192_priv to eprom_read 2011-03-07 13:31:43 -08:00
r8190P_def.h staging: rtl8192e: Convert typedef INTERFACE_SELECT_8190PCI to enum interface_select_8190pci 2011-08-24 10:35:41 -05:00
r8190P_hwimg.c From: wlanfae <wlanfae@realtek.com> 2011-08-23 19:00:42 -05:00
r8190P_hwimg.h From: wlanfae <wlanfae@realtek.com> 2011-08-23 19:00:42 -05:00
r8190P_rtl8256.c staging: rtl8192e: Convert typedef HT_CHANNEL_WIDTH to enum ht_channel_width 2011-08-24 10:49:01 -05:00
r8190P_rtl8256.h staging: rtl8192e: Convert typedef HT_CHANNEL_WIDTH to enum ht_channel_width 2011-08-24 10:49:01 -05:00
r8190_rtl8256.c staging: rtl8192e: Pass r8192_priv to MgntActSet_RF_State 2011-03-07 13:31:45 -08:00
r8190_rtl8256.h staging: rtl8192e: Pass r8192_priv to MgntActSet_RF_State 2011-03-07 13:31:45 -08:00
r8192E.h Merge branch 'staging-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6 2011-07-25 23:26:34 -07:00
r8192E_cmdpkt.c staging: rtl8192e: Convert typedef r8192_priv to struct r8192_priv 2011-08-24 01:52:26 -05:00
r8192E_cmdpkt.h staging: rtl8192e: Convert typedef cmpk_element_e to enum cmpk_element 2011-08-24 10:36:11 -05:00
r8192E_core.c Merge branch 'staging-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6 2011-07-25 23:26:34 -07:00
r8192E_core.c.porig From: wlanfae <wlanfae@realtek.com> 2011-08-23 19:00:42 -05:00
r8192E_core.c.rej From: wlanfae <wlanfae@realtek.com> 2011-08-23 19:00:42 -05:00
r8192E_dev.c staging: rtl8192e: Convert typedef LED_CTL_MODE to enum led_ctl_mode 2011-08-24 10:52:56 -05:00
r8192E_dev.h staging: rtl8192e: Convert typedef cb_desc to struct cb_desc 2011-08-24 01:42:49 -05:00
r8192E_dm.c staging: rtl8192e: Pass priv to cmdpkt functions 2011-03-14 12:24:48 -07:00
r8192E_dm.h staging: rtl8192e: Pass rtl8192_priv to dm functions 2011-03-14 12:24:47 -07:00
r8192E_firmware.c staging: rtl8192e: Convert typedef opt_rst_type_e to enum opt_rst_type 2011-08-24 10:37:10 -05:00
r8192E_firmware.h staging: rtl8192e: Convert typedef firmware_status_e to enum firmware_status 2011-08-24 10:47:21 -05:00
r8192E_hw.h staging: rtl8192e: Convert typedef BaseBand_Config_Type to enum baseband_config 2011-08-24 10:47:41 -05:00
r8192E_hwimg.c From: wlanfae <wlanfae@realtek.com> 2011-08-23 19:00:42 -05:00
r8192E_hwimg.h staging: rtl8192e: Fix compilation warnings 2011-08-23 21:50:58 -05:00
r8192E_phy.c staging: rtl8192e: Convert typedef HT_EXTCHNL_OFFSET to enum ht_extchnl_offset 2011-08-24 10:49:30 -05:00
r8192E_phy.h staging: rtl8192e: Convert typedef HT_EXTCHNL_OFFSET to enum ht_extchnl_offset 2011-08-24 10:49:30 -05:00
r8192E_phyreg.h From: wlanfae <wlanfae@realtek.com> 2011-08-23 19:00:42 -05:00
r8192E_wx.c staging: rtl8192e: Pass ieee80211_device to callbacks 2011-03-14 12:24:45 -07:00
r8192E_wx.h staging: rtl8192e: Make functions static 2011-02-23 14:10:09 -08:00
r8192_pm.c staging: rtl8192e: Pass r8192_priv to MgntActSet_RF_State 2011-03-07 13:31:45 -08:00
r8192_pm.h Staging: rtl8192e: Use the standard config option for PM functions 2010-05-11 11:35:56 -07:00
readme From: wlanfae <wlanfae@realtek.com> 2011-08-23 19:00:42 -05:00
rtl819x_BA.h staging: rtl8192e: Convert typedef DELBA_PARAM_SET to union delba_param_set 2011-08-24 01:55:03 -05:00
rtl819x_BAProc.c staging: rtl8192e: Convert typedef TR_SELECT to enum tr_select 2011-08-24 10:52:27 -05:00
rtl819x_HT.h staging: rtl8192e: Convert typedef RT_HT_CAPBILITY to enum rt_ht_capability 2011-08-24 10:52:23 -05:00
rtl819x_HTProc.c staging: rtl8192e: Convert typedef RT_HT_CAPBILITY to enum rt_ht_capability 2011-08-24 10:52:23 -05:00
rtl819x_Qos.h staging: rtl8192e: Convert typedef ACM_METHOD to enum acm_method 2011-08-24 10:52:26 -05:00
rtl819x_TS.h staging: rtl8192e: Convert typedef TR_SELECT to enum tr_select 2011-08-24 10:52:27 -05:00
rtl819x_TSProc.c staging: rtl8192e: Convert typedef TR_SELECT to enum tr_select 2011-08-24 10:52:27 -05:00
rtl_cam.c rtl8192e: Remove extra ifdefs 2011-08-23 20:02:27 -05:00
rtl_cam.h From: wlanfae <wlanfae@realtek.com> 2011-08-23 19:00:42 -05:00
rtl_core.c staging: rtl8192e: Convert typedef RESET_TYPE to enum reset_type 2011-08-24 10:52:36 -05:00
rtl_core.h staging: rtl8192e: Convert typedef TWO_PORT_STATUS to enum two_port_status 2011-08-24 10:52:38 -05:00
rtl_crypto.h staging: rtl8192e: Remove dead code associated with CONFIG_CRYPTO_HMAC 2011-08-23 21:19:35 -05:00
rtl_debug.c staging: rtl8192e: Convert typedef RF90_RADIO_PATH_E to enum rf90_radio_path 2011-08-24 10:48:19 -05:00
rtl_debug.h staging: rtl8192e: Convert typedef DBGP_FLAG_E to enum dbgp_flag 2011-08-24 10:52:39 -05:00
rtl_dm.c staging: rtl8192e: Convert typedef r8192_priv to struct r8192_priv 2011-08-24 01:52:26 -05:00
rtl_dm.h staging: rtl8192e: Convert typedef DM_DBG_E to enum dm_dbg 2011-08-24 10:52:49 -05:00
rtl_eeprom.c From: wlanfae <wlanfae@realtek.com> 2011-08-23 19:00:42 -05:00
rtl_eeprom.h From: wlanfae <wlanfae@realtek.com> 2011-08-23 19:00:42 -05:00
rtl_ethtool.c rtl8192e: Remove extra ifdefs 2011-08-23 20:02:27 -05:00
rtl_pci.c rtl8192e: Remove extra ifdefs 2011-08-23 20:02:27 -05:00
rtl_pci.h staging: rtl8192e: Convert typedef mp_adapter to struct mp_adapter 2011-08-24 01:44:33 -05:00
rtl_pm.c staging: rtl8192e: Remove references to ENABLE_GPIO_RADIO_CTL 2011-08-23 20:25:56 -05:00
rtl_pm.h rtl8192e: Remove extra ifdefs 2011-08-23 20:02:27 -05:00
rtl_ps.c staging: rtl8192e: Convert typedef RT_POWER_SAVE_CONTROL to struct rt_pwr_save_ctrl 2011-08-24 01:21:36 -05:00
rtl_ps.h staging: rtl8192e: Remove dead code associated with CONFIG_ASPM_OR_D3 2011-08-23 20:24:18 -05:00
rtl_wx.c staging: rtl8192e: Convert typedef adhoc_peers_info_t to struct adhoc_peers_info 2011-08-24 01:51:49 -05:00
rtl_wx.h From: wlanfae <wlanfae@realtek.com> 2011-08-23 19:00:42 -05:00
rtllib.h staging: rtl8192e: Convert typedef RT_RF_TYPE_DEF to enum rt_rf_type_def 2011-08-24 10:52:57 -05:00
rtllib_crypt.c From: wlanfae <wlanfae@realtek.com> 2011-08-23 19:00:42 -05:00
rtllib_crypt.h staging: rtl8192e: Convert typedef buffer to struct buffer 2011-08-24 01:52:53 -05:00
rtllib_crypt_ccmp.c staging: rtl8192e: Convert typedef cb_desc to struct cb_desc 2011-08-24 01:42:49 -05:00
rtllib_crypt_tkip.c staging: rtl8192e: Convert typedef cb_desc to struct cb_desc 2011-08-24 01:42:49 -05:00
rtllib_crypt_wep.c staging: rtl8192e: Convert typedef buffer to struct buffer 2011-08-24 01:52:53 -05:00
rtllib_endianfree.h From: wlanfae <wlanfae@realtek.com> 2011-08-23 19:00:42 -05:00
rtllib_module.c staging: rtl8192e: Convert typedef SW_CAM_TABLE to struct sw_cam_table 2011-08-24 01:23:14 -05:00
rtllib_rx.c staging: rtl8192e: Convert typedef HT_CHANNEL_WIDTH to enum ht_channel_width 2011-08-24 10:49:01 -05:00
rtllib_softmac.c staging: rtl8192e: Convert typedef cb_desc to struct cb_desc 2011-08-24 01:42:49 -05:00
rtllib_softmac_wx.c staging: rtl8192e: Convert typedef HT_EXTCHNL_OFFSET to enum ht_extchnl_offset 2011-08-24 10:49:30 -05:00
rtllib_tx.c staging: rtl8192e: Convert typedef cb_desc to struct cb_desc 2011-08-24 01:42:49 -05:00
rtllib_wx.c staging: rtl8192e: Convert typedef HT_CAPABILITY_ELE to struct ht_capab_ele 2011-08-24 00:56:09 -05:00

readme

What this layer should do

- It mantain the old mechanism as alternative, so the
  ipw2100 driver works with really few changes.
- Encapsulate / Decapsulate rtllib packet
- Handle fragmentation
- Optionally provide an alterantive mechanism for netif queue stop/wake,
  so that the rtllib layer will pass one fragment per time instead of
  one txb struct per time. so the driver can stop the queue in the middle
  of a packet.
- Provide two different TX interfaces for cards that can handle management
  frames on one HW queue, and data on another, and for cards that have only
  one HW queue  (the latter untested and very, very rough).
- Optionally provide the logic for handling IBSS/MASTER/MONITOR/BSS modes
  and for the channel, essid and wap get/set wireless extension requests.
  so that the driver has only to change channel when the ieee stack tell it.
- Optionally provide a scanning mechanism so that the driver has not to
  worry about this, just implement the set channel calback and pass
  frames to the upper layer
- Optionally provide the bss client protocol handshaking (just with open
  authentication)
- Optionally provide the probe request send mechanism
- Optionally provide the bss master mode logic to handle association
  protocol (only open authentication) and probe responses.
- SW wep encryption (with open authentication)
- It collects some stats
- It provides beacons to the card when it ask for them

What this layer doesn't do (yet)
- Perform shared authentication
- Have full support for master mode (the AP should loop back in the air
  frames from an associated client to another. This could be done easily
  with few lines of code, and it is done in my previous version of the
  stach, but a table of association must be keept and a disassociation
  policy must be decided and implemented.
- Handle cleanly the full ieee 802.11 protocol. In AP mode it never
  disassociate clients, and it is really prone to always allow access.
  In bss client mode it is a bit rough with AP deauth and disassoc requests.
- It has not any entry point to view the collected stats.
- Altought it takes care of the card supported rates in the management frame
  it sends, support for rate changing on TXed packet is not complete.
- Give up once associated in bss client mode (it never detect a
  signal loss condition to disassociate and restart scanning)
- Provide a mechanism for enabling the TX in monitor mode, so
  userspace programs can TX raw packets.
- Provide a mechanism for cards that need that the SW take care of beacon
  TX completely, in sense that the SW has to enqueue by itself beacons
  to the card so it TX them (if any...)
APIs

Callback functions in the original stack has been mantained.
following has been added (from rtllib.h)

	/* Softmac-generated frames (mamagement) are TXed via this
	 * callback if the flag IEEE_SOFTMAC_SINGLE_QUEUE is
	 * not set. As some cards may have different HW queues that
	 * one might want to use for data and management frames
	 * the option to have two callbacks might be useful.
	 * This fucntion can't sleep.
	 */
	int (*softmac_hard_start_xmit)(struct sk_buff *skb,
			       struct net_device *dev);

	/* used instead of hard_start_xmit (not softmac_hard_start_xmit)
	 * if the IEEE_SOFTMAC_TX_QUEUE feature is used to TX data
	 * frames. I the option IEEE_SOFTMAC_SINGLE_QUEUE is also set
	 * then also management frames are sent via this callback.
	 * This function can't sleep.
	 */
	void (*softmac_data_hard_start_xmit)(struct sk_buff *skb,
			       struct net_device *dev);

	/* stops the HW queue for DATA frames. Useful to avoid
	 * waste time to TX data frame when we are reassociating
	 * This function can sleep.
	 */
	void (*data_hard_stop)(struct net_device *dev);

	/* OK this is complementar to data_poll_hard_stop */
	void (*data_hard_resume)(struct net_device *dev);

	/* ask to the driver to retune the radio .
	 * This function can sleep. the driver should ensure
	 * the radio has been swithced before return.
	 */
	void (*set_chan)(struct net_device *dev,short ch);

	/* These are not used if the ieee stack takes care of
	 * scanning (IEEE_SOFTMAC_SCAN feature set).
	 * In this case only the set_chan is used.
	 *
	 * The syncro version is similar to the start_scan but
	 * does not return until all channels has been scanned.
	 * this is called in user context and should sleep,
	 * it is called in a work_queue when swithcing to ad-hoc mode
	 * or in behalf of iwlist scan when the card is associated
	 * and root user ask for a scan.
	 * the fucntion stop_scan should stop both the syncro and
	 * background scanning and can sleep.
	 * The fucntion start_scan should initiate the background
	 * scanning and can't sleep.
	 */
	void (*scan_syncro)(struct net_device *dev);
	void (*start_scan)(struct net_device *dev);
	void (*stop_scan)(struct net_device *dev);

	/* indicate the driver that the link state is changed
	 * for example it may indicate the card is associated now.
	 * Driver might be interested in this to apply RX filter
	 * rules or simply light the LINK led
	 */
	void (*link_change)(struct net_device *dev);

Functions hard_data_[resume/stop] are optional and should not be used
if the driver decides to uses data+management frames enqueue in a
single HQ queue (thus using just the softmac_hard_data_start_xmit
callback).

Function that the driver can use are:

rtllib_get_beacon             - this is called by the driver when
                                   the HW needs a beacon.
rtllib_softmac_start_protocol - this should normally be called in the
                                   driver open function
rtllib_softmac_stop_protocol  - the opposite of the above
rtllib_wake_queue             - this is similar to netif_wake_queue
rtllib_reset_queue            - this throw away fragments pending(if any)
rtllib_stop_queue             - this is similar to netif_stop_queue


known BUGS:
- When performing syncro scan (possiblily when swithcing to ad-hoc mode
  and when running iwlist scan when associated) there is still an odd
  behaviour.. I have not looked in this more accurately (yet).

locking:
locking is done by means of three structures.
1- ieee->lock (by means of spin_[un]lock_irq[save/restore]
2- ieee->wx_sem
3- ieee->scan_sem

the lock 1 is what protect most of the critical sections in the ieee stack.
the lock 2 is used to avoid that more than one of the SET wireless extension
handlers (as well as start/stop protocol function) are running at the same time.
the lock 1 is used when we need to modify or read the shared data in the wx handlers.
In other words the lock 2 will prevent one SET action will run across another SET
action (by make sleep the 2nd one) but allow GET actions, while the lock 1
make atomic those little shared data access in both GET and SET operation.
So get operation will be never be delayed really: they will never sleep..
Furthermore in the top of some SET operations a flag is set before acquiring
the lock. This is an help to make the previous running SET operation to
finish faster if needed (just in case the second one will totally undo the
first, so there is not need to complete the 1st really.. ).
The background scanning mechaninsm is protected by the lock 1 except for the
workqueue. this wq is here just to let the set_chan callback sleep (I thinked it
might be appreciated by USB network card driver developer). In this case the lock 3
take its turn.
Thus the stop function needs both the locks.
Funny in the syncro scan the lock 2 play its role (as both the syncro_scan
function and the stop scan function are called with this semaphore held).