Merge commit 'c1e140bf79d817d4a7aa9932eb98b0359c87af33' from mac80211-next
[cascardo/linux.git] / drivers / staging / rtl8723au / os_dep / ioctl_cfg80211.c
index 3d26955..c5800ae 100644 (file)
@@ -275,7 +275,8 @@ static int rtw_cfg80211_inform_bss(struct rtw_adapter *padapter,
                            &pnetwork->network)) {
                notify_signal = 100 * translate_percentage_to_dbm(padapter->recvpriv.signal_strength);  /* dbm */
        } else {
-               notify_signal = 100 * translate_percentage_to_dbm(pnetwork->network.PhyInfo.SignalStrength);    /* dbm */
+               notify_signal = 100 * translate_percentage_to_dbm(
+                       pnetwork->network.SignalStrength);      /* dbm */
        }
 
        bss = cfg80211_inform_bss(wiphy, notify_channel,
@@ -471,7 +472,6 @@ static int rtw_cfg80211_ap_set_encryption(struct net_device *dev, u8 key_index,
                                          int set_tx, const u8 *sta_addr,
                                          struct key_params *keyparms)
 {
-       int ret = 0;
        int key_len;
        struct sta_info *psta = NULL, *pbcmc_sta = NULL;
        struct rtw_adapter *padapter = netdev_priv(dev);
@@ -708,7 +708,7 @@ static int rtw_cfg80211_ap_set_encryption(struct net_device *dev, u8 key_index,
 
 exit:
 
-       return ret;
+       return 0;
 }
 #endif
 
@@ -850,7 +850,6 @@ static int rtw_cfg80211_set_encryption(struct net_device *dev, u8 key_index,
                                            dot11PrivacyAlgrthm;
                                }
                        }
-               } else if (check_fwstate(pmlmepriv, WIFI_ADHOC_STATE)) {        /* adhoc mode */
                }
        }
 
@@ -1092,17 +1091,17 @@ static int cfg80211_rtw_get_station(struct wiphy *wiphy,
                        goto exit;
                }
 
-               sinfo->filled |= STATION_INFO_SIGNAL;
+               sinfo->filled |= BIT(NL80211_STA_INFO_SIGNAL);
                sinfo->signal = translate_percentage_to_dbm(padapter->recvpriv.
                                                            signal_strength);
 
-               sinfo->filled |= STATION_INFO_TX_BITRATE;
+               sinfo->filled |= BIT(NL80211_STA_INFO_TX_BITRATE);
                sinfo->txrate.legacy = rtw_get_cur_max_rate(padapter);
 
-               sinfo->filled |= STATION_INFO_RX_PACKETS;
+               sinfo->filled |= BIT(NL80211_STA_INFO_RX_PACKETS);
                sinfo->rx_packets = sta_rx_data_pkts(psta);
 
-               sinfo->filled |= STATION_INFO_TX_PACKETS;
+               sinfo->filled |= BIT(NL80211_STA_INFO_TX_PACKETS);
                sinfo->tx_packets = psta->sta_stats.tx_pkts;
        }
 
@@ -2365,7 +2364,6 @@ void rtw_cfg80211_indicate_sta_assoc(struct rtw_adapter *padapter,
                                             u.reassoc_req.variable);
 
                sinfo.filled = 0;
-               sinfo.filled = STATION_INFO_ASSOC_REQ_IES;
                sinfo.assoc_req_ies = pmgmt_frame + ie_offset;
                sinfo.assoc_req_ies_len = frame_len - ie_offset;
                cfg80211_new_sta(ndev, hdr->addr2, &sinfo, GFP_ATOMIC);
@@ -2432,20 +2430,16 @@ void rtw_cfg80211_indicate_sta_disassoc(struct rtw_adapter *padapter,
 
 static int rtw_cfg80211_monitor_if_open(struct net_device *ndev)
 {
-       int ret = 0;
-
        DBG_8723A("%s\n", __func__);
 
-       return ret;
+       return 0;
 }
 
 static int rtw_cfg80211_monitor_if_close(struct net_device *ndev)
 {
-       int ret = 0;
-
        DBG_8723A("%s\n", __func__);
 
-       return ret;
+       return 0;
 }
 
 static int rtw_cfg80211_monitor_if_xmit_entry(struct sk_buff *skb,
@@ -2574,11 +2568,9 @@ fail:
 static int
 rtw_cfg80211_monitor_if_set_mac_address(struct net_device *ndev, void *addr)
 {
-       int ret = 0;
-
        DBG_8723A("%s\n", __func__);
 
-       return ret;
+       return 0;
 }
 
 static const struct net_device_ops rtw_cfg80211_monitor_if_ops = {