summaryrefslogtreecommitdiff
path: root/fs/compat.c
diff options
context:
space:
mode:
authorJavier Lopez <jlopex@gmail.com>2011-06-01 11:26:13 +0200
committerJohn W. Linville <linville@tuxdriver.com>2011-06-01 15:11:00 -0400
commit7882513bacb176ab4aacceefdd035ca9479da4fb (patch)
tree3713b8ab49b4ca2c81f92feb950c86a4171744c4 /fs/compat.c
parent0f93c79404e1eaa5207f6d8a7aea14119808d382 (diff)
mac80211_hwsim driver support userspace frame tx/rx
This patch adds to mac80211_hwsim the capability to send traffic via userspace. Frame exchange between kernel and user spaces is done through generic netlink communication protocol. A new generic netlink family MAC80211_HWSIM is proposed, this family contains three basic commands HWSIM_CMD_REGISTER, which is the command used to register a new traffic listener, HWSIM_CMD_FRAME, to exchange the frames from kernel to user and vice-versa, and HWSIM_CMD_TX_INFO_FRAME which returns from user all the information about retransmissions, rates, rx signal, and so on. How it works: Once the driver is loaded the MAC80211_HWSIM family will be registered. In the absence of userspace daemon, the driver itselfs implements a perfect wireless medium as it did in the past. When a daemon sends a HWSIM_CMD_REGISTER command, the module stores the application PID, and from this moment all frames will be sent to the registered daemon. The user space application will be in charge of process/forward all frames broadcast by any mac80211_hwsim radio. If the user application is stopped, the kernel module will detect the release of the socket and it will switch back to in-kernel perfect channel simulation. The userspace daemon must be waiting for incoming HWSIM_CMD_FRAME commands sent from kernel, for each HWSIM_CMD_FRAME command the application will try to broadcast this frame to all mac80211_hwsim radios, however the application may decide to forward/drop this frame. In the case of forwarding the frame, a new HWSIM_CMD_FRAME command will be created, all necessary attributes will be populated and the frame will be sent back to the kernel. Also after the frame broadcast phase, a HWSIM_CMD_TX_INFO_FRAME command will be sent from userspace to kernel, this command contains all the information regarding the transmission, such as number of tries, rates, ack signal, etc. You can find the actual implementation of wireless mediumd daemon (wmediumd) at: * Last version tarball: https://github.com/jlopex/cozybit/tarball/master * Or visiting my github tree: https://github.com/jlopex/cozybit/tree Signed-off-by: Javier Lopez <jlopex@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'fs/compat.c')
0 files changed, 0 insertions, 0 deletions