mac80211: optimize mac address comparisons to improve performance
[openwrt.git] / package / mac80211 / patches / 551-ath9k_per_chain_signal_strength.patch
index fd607dd..a47db4e 100644 (file)
@@ -23,7 +23,7 @@
        int antenna;
 --- a/net/mac80211/sta_info.h
 +++ b/net/mac80211/sta_info.h
-@@ -312,6 +312,11 @@ struct sta_info {
+@@ -313,6 +313,11 @@ struct sta_info {
        unsigned long rx_dropped;
        int last_signal;
        struct ewma avg_signal;
@@ -37,7 +37,7 @@
  
 --- a/net/mac80211/rx.c
 +++ b/net/mac80211/rx.c
-@@ -1269,6 +1269,7 @@ ieee80211_rx_h_sta_process(struct ieee80
+@@ -1270,6 +1270,7 @@ ieee80211_rx_h_sta_process(struct ieee80
        struct sk_buff *skb = rx->skb;
        struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb);
        struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
@@ -45,7 +45,7 @@
  
        if (!sta)
                return RX_CONTINUE;
-@@ -1311,6 +1312,19 @@ ieee80211_rx_h_sta_process(struct ieee80
+@@ -1312,6 +1313,19 @@ ieee80211_rx_h_sta_process(struct ieee80
        sta->last_signal = status->signal;
        ewma_add(&sta->avg_signal, -status->signal);
  
@@ -67,7 +67,7 @@
         * exchange sequence.
 --- a/net/mac80211/sta_info.c
 +++ b/net/mac80211/sta_info.c
-@@ -255,6 +255,8 @@ struct sta_info *sta_info_alloc(struct i
+@@ -256,6 +256,8 @@ struct sta_info *sta_info_alloc(struct i
        do_posix_clock_monotonic_gettime(&uptime);
        sta->last_connected = uptime.tv_sec;
        ewma_init(&sta->avg_signal, 1024, 8);
@@ -78,7 +78,7 @@
                kfree(sta);
 --- a/include/net/cfg80211.h
 +++ b/include/net/cfg80211.h
-@@ -508,6 +508,8 @@ struct station_parameters {
+@@ -518,6 +518,8 @@ struct station_parameters {
   * @STATION_INFO_ASSOC_REQ_IES: @assoc_req_ies filled
   * @STATION_INFO_STA_FLAGS: @sta_flags filled
   * @STATION_INFO_BEACON_LOSS_COUNT: @beacon_loss_count filled
@@ -87,7 +87,7 @@
   */
  enum station_info_flags {
        STATION_INFO_INACTIVE_TIME      = 1<<0,
-@@ -529,7 +531,9 @@ enum station_info_flags {
+@@ -539,7 +541,9 @@ enum station_info_flags {
        STATION_INFO_CONNECTED_TIME     = 1<<16,
        STATION_INFO_ASSOC_REQ_IES      = 1<<17,
        STATION_INFO_STA_FLAGS          = 1<<18,
@@ -98,7 +98,7 @@
  };
  
  /**
-@@ -609,6 +613,9 @@ struct sta_bss_parameters {
+@@ -619,6 +623,9 @@ struct sta_bss_parameters {
   * @plink_state: mesh peer link state
   * @signal: signal strength of last received packet in dBm
   * @signal_avg: signal strength average in dBm
   * @txrate: current unicast bitrate from this station
   * @rxrate: current unicast bitrate to this station
   * @rx_packets: packets received from this station
-@@ -640,6 +647,11 @@ struct station_info {
+@@ -650,6 +657,11 @@ struct station_info {
        u8 plink_state;
        s8 signal;
        s8 signal_avg;
        /* Record packet only when both main_rssi and  alt_rssi is positive */
 --- a/drivers/net/wireless/ath/ath9k/ar9003_mac.c
 +++ b/drivers/net/wireless/ath/ath9k/ar9003_mac.c
-@@ -483,12 +483,12 @@ int ath9k_hw_process_rxdesc_edma(struct 
+@@ -463,12 +463,12 @@ int ath9k_hw_process_rxdesc_edma(struct 
  
        /* XXX: Keycache */
        rxs->rs_rssi = MS(rxsp->status5, AR_RxRSSICombined);
        if (ads.ds_rxstatus8 & AR_RxKeyIdxValid)
 --- a/drivers/net/wireless/ath/ath9k/debug.c
 +++ b/drivers/net/wireless/ath/ath9k/debug.c
-@@ -1047,12 +1047,12 @@ void ath_debug_stat_rx(struct ath_softc 
+@@ -990,12 +990,12 @@ void ath_debug_stat_rx(struct ath_softc 
  
        spin_lock(&sc->debug.samp_lock);
        RX_SAMP_DBG(jiffies) = jiffies;
        RX_SAMP_DBG(rate) = rs->rs_rate;
 --- a/include/linux/nl80211.h
 +++ b/include/linux/nl80211.h
-@@ -1657,6 +1657,8 @@ enum nl80211_sta_bss_param {
+@@ -1661,6 +1661,8 @@ enum nl80211_sta_bss_param {
   * @NL80211_STA_INFO_CONNECTED_TIME: time since the station is last connected
   * @NL80211_STA_INFO_STA_FLAGS: Contains a struct nl80211_sta_flag_update.
   * @NL80211_STA_INFO_BEACON_LOSS: count of times beacon loss was detected (u32)
   * @__NL80211_STA_INFO_AFTER_LAST: internal
   * @NL80211_STA_INFO_MAX: highest possible station info attribute
   */
-@@ -1680,6 +1682,8 @@ enum nl80211_sta_info {
+@@ -1684,6 +1686,8 @@ enum nl80211_sta_info {
        NL80211_STA_INFO_CONNECTED_TIME,
        NL80211_STA_INFO_STA_FLAGS,
        NL80211_STA_INFO_BEACON_LOSS,
        __NL80211_STA_INFO_AFTER_LAST,
 --- a/net/wireless/nl80211.c
 +++ b/net/wireless/nl80211.c
-@@ -2347,6 +2347,33 @@ nla_put_failure:
+@@ -2376,6 +2376,33 @@ nla_put_failure:
        return false;
  }
  
  static int nl80211_send_station(struct sk_buff *msg, u32 pid, u32 seq,
                                int flags, struct net_device *dev,
                                const u8 *mac_addr, struct station_info *sinfo)
-@@ -2393,6 +2420,18 @@ static int nl80211_send_station(struct s
+@@ -2422,6 +2449,18 @@ static int nl80211_send_station(struct s
        if (sinfo->filled & STATION_INFO_SIGNAL_AVG)
                NLA_PUT_U8(msg, NL80211_STA_INFO_SIGNAL_AVG,
                           sinfo->signal_avg);
This page took 0.038746 seconds and 4 git commands to generate.