This will fix a NULL pointer exception when working in master mode. When a master mode interface is added, the bssid is initialized, when config_interface() is called the bssid is invalid (only with master mode) so we cannot use that, instead the bssid inside the interface structure should be used. Signed-off-by: Ivo van Doorn <IvDoorn@xxxxxxxxx> --- diff --git a/drivers/net/wireless/mac80211/rt2x00/rt2x00lib.c b/drivers/net/wireless/mac80211/rt2x00/rt2x00lib.c index e882182..8dacf00 100644 --- a/drivers/net/wireless/mac80211/rt2x00/rt2x00lib.c +++ b/drivers/net/wireless/mac80211/rt2x00/rt2x00lib.c @@ -480,6 +480,7 @@ int rt2x00lib_config_interface(struct ieee80211_hw *hw, int if_id, struct ieee80211_if_conf *conf) { struct rt2x00_dev *rt2x00dev = hw->priv; + struct interface *intf = &rt2x00dev->interface; /* * Monitor mode does not need configuring. @@ -488,7 +489,7 @@ int rt2x00lib_config_interface(struct ieee80211_hw *hw, int if_id, */ if (conf->type == IEEE80211_IF_TYPE_MNTR) return 0; - else if (conf->type != rt2x00dev->interface.type) + else if (conf->type != intf->type) return -EINVAL; /* @@ -497,13 +498,13 @@ int rt2x00lib_config_interface(struct ieee80211_hw *hw, int if_id, * should now be set. */ if (conf->type != IEEE80211_IF_TYPE_AP) - memcpy(&rt2x00dev->interface.bssid, conf->bssid, ETH_ALEN); + memcpy(&intf->bssid, conf->bssid, ETH_ALEN); /* * Enable configuration. */ rt2x00dev->lib_ops->config_type(rt2x00dev, conf->type); - rt2x00dev->lib_ops->config_bssid(rt2x00dev, conf->bssid); + rt2x00dev->lib_ops->config_bssid(rt2x00dev, intf->bssid); return 0; } - To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html