diff options
author | Bruno Randolf <br1@einfach.org> | 2008-05-07 05:46:02 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-05-14 16:29:48 -0400 |
commit | 84e6dc9acf6825f508feae9db6b7d695e64894e0 (patch) | |
tree | aeeb3812036ef38cf8470fd583b9ec9cbe3b3d78 /drivers/net | |
parent | 736bc924fe7183dd27182a9148e78f250c1637ee (diff) |
zd1211rw: initial IBSS support
this adds initial IBSS support for the zydas zd1211rw:
convince driver that it can do IBSS mode. add mac80211 beacon_update callback.
IBSS merge and TSF updates don't work yet, but it makes the driver usable in
ad-hoc networks.
Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/zd1211rw/zd_mac.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/drivers/net/wireless/zd1211rw/zd_mac.c b/drivers/net/wireless/zd1211rw/zd_mac.c index 69c45ca99051..ee4331229f1f 100644 --- a/drivers/net/wireless/zd1211rw/zd_mac.c +++ b/drivers/net/wireless/zd1211rw/zd_mac.c | |||
@@ -751,6 +751,7 @@ static int zd_op_add_interface(struct ieee80211_hw *hw, | |||
751 | case IEEE80211_IF_TYPE_MNTR: | 751 | case IEEE80211_IF_TYPE_MNTR: |
752 | case IEEE80211_IF_TYPE_MESH_POINT: | 752 | case IEEE80211_IF_TYPE_MESH_POINT: |
753 | case IEEE80211_IF_TYPE_STA: | 753 | case IEEE80211_IF_TYPE_STA: |
754 | case IEEE80211_IF_TYPE_IBSS: | ||
754 | mac->type = conf->type; | 755 | mac->type = conf->type; |
755 | break; | 756 | break; |
756 | default: | 757 | default: |
@@ -781,7 +782,8 @@ static int zd_op_config_interface(struct ieee80211_hw *hw, | |||
781 | struct zd_mac *mac = zd_hw_mac(hw); | 782 | struct zd_mac *mac = zd_hw_mac(hw); |
782 | int associated; | 783 | int associated; |
783 | 784 | ||
784 | if (mac->type == IEEE80211_IF_TYPE_MESH_POINT) { | 785 | if (mac->type == IEEE80211_IF_TYPE_MESH_POINT || |
786 | mac->type == IEEE80211_IF_TYPE_IBSS) { | ||
785 | associated = true; | 787 | associated = true; |
786 | if (conf->beacon) { | 788 | if (conf->beacon) { |
787 | zd_mac_config_beacon(hw, conf->beacon); | 789 | zd_mac_config_beacon(hw, conf->beacon); |
@@ -941,6 +943,18 @@ static void zd_op_bss_info_changed(struct ieee80211_hw *hw, | |||
941 | } | 943 | } |
942 | } | 944 | } |
943 | 945 | ||
946 | static int zd_op_beacon_update(struct ieee80211_hw *hw, | ||
947 | struct sk_buff *skb, | ||
948 | struct ieee80211_tx_control *ctl) | ||
949 | { | ||
950 | struct zd_mac *mac = zd_hw_mac(hw); | ||
951 | zd_mac_config_beacon(hw, skb); | ||
952 | kfree_skb(skb); | ||
953 | zd_set_beacon_interval(&mac->chip, BCN_MODE_IBSS | | ||
954 | hw->conf.beacon_int); | ||
955 | return 0; | ||
956 | } | ||
957 | |||
944 | static const struct ieee80211_ops zd_ops = { | 958 | static const struct ieee80211_ops zd_ops = { |
945 | .tx = zd_op_tx, | 959 | .tx = zd_op_tx, |
946 | .start = zd_op_start, | 960 | .start = zd_op_start, |
@@ -951,6 +965,7 @@ static const struct ieee80211_ops zd_ops = { | |||
951 | .config_interface = zd_op_config_interface, | 965 | .config_interface = zd_op_config_interface, |
952 | .configure_filter = zd_op_configure_filter, | 966 | .configure_filter = zd_op_configure_filter, |
953 | .bss_info_changed = zd_op_bss_info_changed, | 967 | .bss_info_changed = zd_op_bss_info_changed, |
968 | .beacon_update = zd_op_beacon_update, | ||
954 | }; | 969 | }; |
955 | 970 | ||
956 | struct ieee80211_hw *zd_mac_alloc_hw(struct usb_interface *intf) | 971 | struct ieee80211_hw *zd_mac_alloc_hw(struct usb_interface *intf) |