tizen: Use unique directory prefix for baselibs packages
[platform/kernel/linux-rpi.git] / net / mac80211 / driver-ops.h
index c450559..2bc2fbe 100644 (file)
@@ -23,7 +23,7 @@
 static inline struct ieee80211_sub_if_data *
 get_bss_sdata(struct ieee80211_sub_if_data *sdata)
 {
-       if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN)
+       if (sdata && sdata->vif.type == NL80211_IFTYPE_AP_VLAN)
                sdata = container_of(sdata->bss, struct ieee80211_sub_if_data,
                                     u.ap);
 
@@ -638,10 +638,13 @@ static inline void drv_flush(struct ieee80211_local *local,
                             struct ieee80211_sub_if_data *sdata,
                             u32 queues, bool drop)
 {
-       struct ieee80211_vif *vif = sdata ? &sdata->vif : NULL;
+       struct ieee80211_vif *vif;
 
        might_sleep();
 
+       sdata = get_bss_sdata(sdata);
+       vif = sdata ? &sdata->vif : NULL;
+
        if (sdata && !check_sdata_in_driver(sdata))
                return;
 
@@ -657,6 +660,8 @@ static inline void drv_flush_sta(struct ieee80211_local *local,
 {
        might_sleep();
 
+       sdata = get_bss_sdata(sdata);
+
        if (sdata && !check_sdata_in_driver(sdata))
                return;