|
@@ -376,7 +376,12 @@ mwifiex_cfg80211_set_channel(struct wiphy *wiphy, struct net_device *dev,
|
|
|
struct ieee80211_channel *chan,
|
|
|
enum nl80211_channel_type channel_type)
|
|
|
{
|
|
|
- struct mwifiex_private *priv = mwifiex_netdev_get_priv(dev);
|
|
|
+ struct mwifiex_private *priv;
|
|
|
+
|
|
|
+ if (dev)
|
|
|
+ priv = mwifiex_netdev_get_priv(dev);
|
|
|
+ else
|
|
|
+ priv = mwifiex_cfg80211_get_priv(wiphy);
|
|
|
|
|
|
if (priv->media_connected) {
|
|
|
wiphy_err(wiphy, "This setting is valid only when station "
|