wireless configuration – cfg80211 and nl80211 Johannes Berg 2007-01-20 2007-01-20 – Johannes Berg 1
wireless configuration – cfg80211 and nl80211
Johannes Berg
2007-01-20
2007-01-20 – Johannes Berg 1
Overview
1 cfg80211 – driver interface
2 userspace interface: nl80211
3 userspace interface: wext compatibility
4 userspace
5 future
2007-01-20 – Johannes Berg 2
cfg80211 – driver interface
Current status
• defined in include/net/cfg80211.h
• cfg80211 register/unregister with priv pointer
• struct cfg80211 ops for operations on the device
• virtual device support, identified by struct net device
• clearly defined commands, each with very limited scope
2007-01-20 – Johannes Berg 3
cfg80211 – driver interface
Current status
• defined in include/net/cfg80211.h
• cfg80211 register/unregister with priv pointer
• struct cfg80211 ops for operations on the device
• virtual device support, identified by struct net device
• clearly defined commands, each with very limited scope
2007-01-20 – Johannes Berg 3
cfg80211 – driver interface
Current status
• defined in include/net/cfg80211.h
• cfg80211 register/unregister with priv pointer
• struct cfg80211 ops for operations on the device
• virtual device support, identified by struct net device
• clearly defined commands, each with very limited scope
2007-01-20 – Johannes Berg 3
cfg80211 – driver interface
Current status
• defined in include/net/cfg80211.h
• cfg80211 register/unregister with priv pointer
• struct cfg80211 ops for operations on the device
• virtual device support, identified by struct net device
• clearly defined commands, each with very limited scope
2007-01-20 – Johannes Berg 3
cfg80211 – driver interface
Operations
• all regular operations like scanning etc.
• bookkeeping: list interfaces
2007-01-20 – Johannes Berg 4
cfg80211 – driver interface
Operations
• all regular operations like scanning etc.
• bookkeeping: list interfaces
2007-01-20 – Johannes Berg 4
userspace interface: nl80211
Current status
• based on genetlink
• userspace ABI in include/linux/nl80211.h
• code in net/wireless/nl80211.c
2007-01-20 – Johannes Berg 5
userspace interface: nl80211
Current status
• based on genetlink
• userspace ABI in include/linux/nl80211.h
• code in net/wireless/nl80211.c
2007-01-20 – Johannes Berg 5
userspace interface: nl80211
Current status
• based on genetlink
• userspace ABI in include/linux/nl80211.h
• code in net/wireless/nl80211.c
2007-01-20 – Johannes Berg 5
userspace interface: nl80211
Some details
• most operations are commands taking a single argument
• some MLME attributes are grouped together to allowconfiguring fullMAC cards in one step
2007-01-20 – Johannes Berg 6
userspace interface: nl80211
Some details
• most operations are commands taking a single argument
• some MLME attributes are grouped together to allowconfiguring fullMAC cards in one step
2007-01-20 – Johannes Berg 6
userspace interface: wext compatibility
• drivers should just implement cfg80211
• the compat layer will thunk wext calls into cfg80211
• currently both coexist
• to allow moving over gradually, a single driver can implementboth wext and cfg80211
2007-01-20 – Johannes Berg 7
userspace interface: wext compatibility
• drivers should just implement cfg80211
• the compat layer will thunk wext calls into cfg80211
• currently both coexist
• to allow moving over gradually, a single driver can implementboth wext and cfg80211
2007-01-20 – Johannes Berg 7
userspace interface: wext compatibility
• drivers should just implement cfg80211
• the compat layer will thunk wext calls into cfg80211
• currently both coexist
• to allow moving over gradually, a single driver can implementboth wext and cfg80211
2007-01-20 – Johannes Berg 7
userspace interface: wext compatibility
• drivers should just implement cfg80211
• the compat layer will thunk wext calls into cfg80211
• currently both coexist
• to allow moving over gradually, a single driver can implementboth wext and cfg80211
2007-01-20 – Johannes Berg 7
userspace
• no userspace program exists yet
• libnl needs to be extended
• once that is done, the netlink interface will be simple to use
• discussion item: userspace MLME access
2007-01-20 – Johannes Berg 8
userspace
• no userspace program exists yet
• libnl needs to be extended
• once that is done, the netlink interface will be simple to use
• discussion item: userspace MLME access
2007-01-20 – Johannes Berg 8
userspace
• no userspace program exists yet
• libnl needs to be extended
• once that is done, the netlink interface will be simple to use
• discussion item: userspace MLME access
2007-01-20 – Johannes Berg 8
userspace
• no userspace program exists yet
• libnl needs to be extended
• once that is done, the netlink interface will be simple to use
• discussion item: userspace MLME access
2007-01-20 – Johannes Berg 8
future
• 802.11w is upcoming and we will want a userspace MLME
• cfg80211/nl80211 will provide access to the MAC for theuserspace MLME
• cfg80211/nl80211 also needs to provide MLME access forfull-MAC cards
• need to define notification
2007-01-20 – Johannes Berg 9
future
• 802.11w is upcoming and we will want a userspace MLME
• cfg80211/nl80211 will provide access to the MAC for theuserspace MLME
• cfg80211/nl80211 also needs to provide MLME access forfull-MAC cards
• need to define notification
2007-01-20 – Johannes Berg 9
future
• 802.11w is upcoming and we will want a userspace MLME
• cfg80211/nl80211 will provide access to the MAC for theuserspace MLME
• cfg80211/nl80211 also needs to provide MLME access forfull-MAC cards
• need to define notification
2007-01-20 – Johannes Berg 9
future
• 802.11w is upcoming and we will want a userspace MLME
• cfg80211/nl80211 will provide access to the MAC for theuserspace MLME
• cfg80211/nl80211 also needs to provide MLME access forfull-MAC cards
• need to define notification
2007-01-20 – Johannes Berg 9
future
discussion item
I believe that we need a way to transparently access the MLME.
Should this be a userspace library or should the kernel arbitrate?
userspace pro:
• no kernel/userspace transistion necessary
kernel pro:
• nl80211 can be used – kernel just forwards messages toregistered userspace MLME
2007-01-20 – Johannes Berg 10
Thank you for your attention
2007-01-20 – Johannes Berg 11