Changeset 33586


Ignore:
Timestamp:
2012-09-28T20:29:16+02:00 (5 years ago)
Author:
nbd
Message:

iw: update to 3.6 and add support for configuring antenna gain

Location:
trunk/package/iw
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/package/iw/Makefile

    r30347 r33586  
    99 
    1010PKG_NAME:=iw 
    11 PKG_VERSION:=3.3 
     11PKG_VERSION:=3.6 
    1212PKG_RELEASE:=1 
    1313 
    1414PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 
    1515PKG_SOURCE_URL:=http://wireless.kernel.org/download/iw/ 
    16 PKG_MD5SUM:=146ad14cdeb39fb88b21efdbb28787d1 
     16PKG_MD5SUM:=1c18bfbbc8773629e5e8ac733a39540c 
    1717 
    1818include $(INCLUDE_DIR)/package.mk 
  • trunk/package/iw/patches/001-nl80211_h_sync.patch

    r31323 r33586  
    11--- a/nl80211.h 
    22+++ b/nl80211.h 
    3 @@ -156,21 +156,23 @@ 
    4   * @NL80211_CMD_DEL_KEY: delete a key identified by %NL80211_ATTR_KEY_IDX 
    5   *     or %NL80211_ATTR_MAC. 
     3@@ -565,6 +565,14 @@ 
     4  *     %NL80211_ATTR_IFINDEX is now on %NL80211_ATTR_WIPHY_FREQ with 
     5  *     %NL80211_ATTR_WIPHY_CHANNEL_TYPE. 
    66  * 
    7 - * @NL80211_CMD_GET_BEACON: retrieve beacon information (returned in a 
    8 - *     %NL80222_CMD_NEW_BEACON message) 
    9 - * @NL80211_CMD_SET_BEACON: set the beacon on an access point interface 
    10 - *     using the %NL80211_ATTR_BEACON_INTERVAL, %NL80211_ATTR_DTIM_PERIOD, 
    11 - *     %NL80211_ATTR_BEACON_HEAD and %NL80211_ATTR_BEACON_TAIL attributes. 
    12 - *     Following attributes are provided for drivers that generate full Beacon 
    13 - *     and Probe Response frames internally: %NL80211_ATTR_SSID, 
    14 + * @NL80211_CMD_GET_BEACON: (not used) 
    15 + * @NL80211_CMD_SET_BEACON: change the beacon on an access point interface 
    16 + *     using the %NL80211_ATTR_BEACON_HEAD and %NL80211_ATTR_BEACON_TAIL 
    17 + *     attributes. For drivers that generate the beacon and probe responses 
    18 + *     internally, the following attributes must be provided: %NL80211_ATTR_IE, 
    19 + *     %NL80211_ATTR_IE_PROBE_RESP and %NL80211_ATTR_IE_ASSOC_RESP. 
    20 + * @NL80211_CMD_START_AP: Start AP operation on an AP interface, parameters 
    21 + *     are like for %NL80211_CMD_SET_BEACON, and additionally parameters that 
    22 + *     do not change are used, these include %NL80211_ATTR_BEACON_INTERVAL, 
    23 + *     %NL80211_ATTR_DTIM_PERIOD, %NL80211_ATTR_SSID, 
    24   *     %NL80211_ATTR_HIDDEN_SSID, %NL80211_ATTR_CIPHERS_PAIRWISE, 
    25   *     %NL80211_ATTR_CIPHER_GROUP, %NL80211_ATTR_WPA_VERSIONS, 
    26   *     %NL80211_ATTR_AKM_SUITES, %NL80211_ATTR_PRIVACY, 
    27 - *     %NL80211_ATTR_AUTH_TYPE, %NL80211_ATTR_IE, %NL80211_ATTR_IE_PROBE_RESP, 
    28 - *     %NL80211_ATTR_IE_ASSOC_RESP. 
    29 - * @NL80211_CMD_NEW_BEACON: add a new beacon to an access point interface, 
    30 - *     parameters are like for %NL80211_CMD_SET_BEACON. 
    31 - * @NL80211_CMD_DEL_BEACON: remove the beacon, stop sending it 
    32 + *     %NL80211_ATTR_AUTH_TYPE and %NL80211_ATTR_INACTIVITY_TIMEOUT. 
    33 + * @NL80211_CMD_NEW_BEACON: old alias for %NL80211_CMD_START_AP 
    34 + * @NL80211_CMD_STOP_AP: Stop AP operation on the given interface 
    35 + * @NL80211_CMD_DEL_BEACON: old alias for %NL80211_CMD_STOP_AP 
    36   * 
    37   * @NL80211_CMD_GET_STATION: Get station attributes for station identified by 
    38   *     %NL80211_ATTR_MAC on the interface identified by %NL80211_ATTR_IFINDEX. 
    39 @@ -367,6 +369,11 @@ 
    40   *     %NL80211_ATTR_WIPHY_FREQ, %NL80211_ATTR_CONTROL_PORT, 
    41   *     %NL80211_ATTR_CONTROL_PORT_ETHERTYPE and 
    42   *     %NL80211_ATTR_CONTROL_PORT_NO_ENCRYPT. 
    43 + *     Background scan period can optionally be 
    44 + *     specified in %NL80211_ATTR_BG_SCAN_PERIOD, 
    45 + *     if not specified default background scan configuration 
    46 + *     in driver is used and if period value is 0, bg scan will be disabled. 
    47 + *     This attribute is ignored if driver does not support roam scan. 
    48   *     It is also sent as an event, with the BSSID and response IEs when the 
    49   *     connection is established or failed to be established. This can be 
    50   *     determined by the STATUS_CODE attribute. 
    51 @@ -541,6 +548,11 @@ 
    52   * @NL80211_CMD_SET_NOACK_MAP: sets a bitmap for the individual TIDs whether 
    53   *      No Acknowledgement Policy should be applied. 
    54   * 
    55 + * @NL80211_CMD_CH_SWITCH_NOTIFY: An AP or GO may decide to switch channels 
    56 + *     independently of the userspace SME, send this event indicating 
    57 + *     %NL80211_ATTR_IFINDEX is now on %NL80211_ATTR_WIPHY_FREQ with 
    58 + *     %NL80211_ATTR_WIPHY_CHANNEL_TYPE. 
     7+ * @NL80211_CMD_START_P2P_DEVICE: Start the given P2P Device, identified by 
     8+ *     its %NL80211_ATTR_WDEV identifier. It must have been created with 
     9+ *     %NL80211_CMD_NEW_INTERFACE previously. After it has been started, the 
     10+ *     P2P Device can be used for P2P operations, e.g. remain-on-channel and 
     11+ *     public action frame TX. 
     12+ * @NL80211_CMD_STOP_P2P_DEVICE: Stop the given P2P Device, identified by 
     13+ *     its %NL80211_ATTR_WDEV identifier. 
    5914+ * 
    6015  * @NL80211_CMD_MAX: highest used command number 
    6116  * @__NL80211_CMD_AFTER_LAST: internal use 
    6217  */ 
    63 @@ -565,8 +577,10 @@ enum nl80211_commands { 
     18@@ -708,6 +716,9 @@ enum nl80211_commands { 
    6419  
    65         NL80211_CMD_GET_BEACON, 
    66         NL80211_CMD_SET_BEACON, 
    67 -       NL80211_CMD_NEW_BEACON, 
    68 -       NL80211_CMD_DEL_BEACON, 
    69 +       NL80211_CMD_START_AP, 
    70 +       NL80211_CMD_NEW_BEACON = NL80211_CMD_START_AP, 
    71 +       NL80211_CMD_STOP_AP, 
    72 +       NL80211_CMD_DEL_BEACON = NL80211_CMD_STOP_AP, 
     20        NL80211_CMD_CH_SWITCH_NOTIFY, 
    7321  
    74         NL80211_CMD_GET_STATION, 
    75         NL80211_CMD_SET_STATION, 
    76 @@ -680,6 +694,8 @@ enum nl80211_commands { 
    77   
    78         NL80211_CMD_SET_NOACK_MAP, 
    79   
    80 +       NL80211_CMD_CH_SWITCH_NOTIFY, 
     22+       NL80211_CMD_START_P2P_DEVICE, 
     23+       NL80211_CMD_STOP_P2P_DEVICE, 
    8124+ 
    8225        /* add new commands above here */ 
    8326  
    8427        /* used to define NL80211_CMD_MAX below */ 
    85 @@ -1193,6 +1209,19 @@ enum nl80211_commands { 
    86   * @NL80211_ATTR_NOACK_MAP: This u16 bitmap contains the No Ack Policy of 
    87   *      up to 16 TIDs. 
    88   * 
    89 + * @NL80211_ATTR_INACTIVITY_TIMEOUT: timeout value in seconds, this can be 
    90 + *     used by the drivers which has MLME in firmware and does not have support 
    91 + *     to report per station tx/rx activity to free up the staion entry from 
    92 + *     the list. This needs to be used when the driver advertises the 
    93 + *     capability to timeout the stations. 
    94 + * 
    95 + * @NL80211_ATTR_RX_SIGNAL_DBM: signal strength in dBm (as a 32-bit int); 
    96 + *     this attribute is (depending on the driver capabilities) added to 
    97 + *     received frames indicated with %NL80211_CMD_FRAME. 
    98 + * 
    99 + * @NL80211_ATTR_BG_SCAN_PERIOD: Background scan period in seconds 
    100 + *      or 0 to disable background scan. 
    101 + * 
    102   * @NL80211_ATTR_MAX: highest attribute number currently defined 
    103   * @__NL80211_ATTR_AFTER_LAST: internal use 
    104   */ 
    105 @@ -1438,6 +1467,12 @@ enum nl80211_attrs { 
     28@@ -1506,6 +1517,8 @@ enum nl80211_attrs { 
    10629  
    107         NL80211_ATTR_NOACK_MAP, 
     30        NL80211_ATTR_USER_REG_HINT_TYPE, 
    10831  
    109 +       NL80211_ATTR_INACTIVITY_TIMEOUT, 
    110 + 
    111 +       NL80211_ATTR_RX_SIGNAL_DBM, 
    112 + 
    113 +       NL80211_ATTR_BG_SCAN_PERIOD, 
     32+       NL80211_ATTR_WIPHY_ANTENNA_GAIN, 
    11433+ 
    11534        /* add attributes here, update the policy in nl80211.c */ 
    11635  
    11736        __NL80211_ATTR_AFTER_LAST, 
    118 @@ -1475,6 +1510,7 @@ enum nl80211_attrs { 
    119  #define NL80211_ATTR_FEATURE_FLAGS NL80211_ATTR_FEATURE_FLAGS 
     37@@ -1575,6 +1588,10 @@ enum nl80211_attrs { 
     38  * @NL80211_IFTYPE_MESH_POINT: mesh point 
     39  * @NL80211_IFTYPE_P2P_CLIENT: P2P client 
     40  * @NL80211_IFTYPE_P2P_GO: P2P group owner 
     41+ * @NL80211_IFTYPE_P2P_DEVICE: P2P device interface type, this is not a netdev 
     42+ *     and therefore can't be created in the normal ways, use the 
     43+ *     %NL80211_CMD_START_P2P_DEVICE and %NL80211_CMD_STOP_P2P_DEVICE 
     44+ *     commands to create and destroy one 
     45  * @NL80211_IFTYPE_MAX: highest interface type number currently defined 
     46  * @NUM_NL80211_IFTYPES: number of defined interface types 
     47  * 
     48@@ -1593,6 +1610,7 @@ enum nl80211_iftype { 
     49        NL80211_IFTYPE_MESH_POINT, 
     50        NL80211_IFTYPE_P2P_CLIENT, 
     51        NL80211_IFTYPE_P2P_GO, 
     52+       NL80211_IFTYPE_P2P_DEVICE, 
    12053  
    121  #define NL80211_MAX_SUPP_RATES                 32 
    122 +#define NL80211_MAX_SUPP_HT_RATES              77 
    123  #define NL80211_MAX_SUPP_REG_RULES             32 
    124  #define NL80211_TKIP_DATA_OFFSET_ENCR_KEY      0 
    125  #define NL80211_TKIP_DATA_OFFSET_TX_MIC_KEY    16 
    126 @@ -1536,7 +1572,11 @@ enum nl80211_iftype { 
    127   * @NL80211_STA_FLAG_WME: station is WME/QoS capable 
    128   * @NL80211_STA_FLAG_MFP: station uses management frame protection 
    129   * @NL80211_STA_FLAG_AUTHENTICATED: station is authenticated 
    130 - * @NL80211_STA_FLAG_TDLS_PEER: station is a TDLS peer 
    131 + * @NL80211_STA_FLAG_TDLS_PEER: station is a TDLS peer -- this flag should 
    132 + *     only be used in managed mode (even in the flags mask). Note that the 
    133 + *     flag can't be changed, it is only valid while adding a station, and 
    134 + *     attempts to change it will silently be ignored (rather than rejected 
    135 + *     as errors.) 
    136   * @NL80211_STA_FLAG_MAX: highest station flag number currently defined 
    137   * @__NL80211_STA_FLAG_AFTER_LAST: internal use 
    138   */ 
    139 @@ -1651,6 +1691,10 @@ enum nl80211_sta_bss_param { 
    140   *     containing info as possible, see &enum nl80211_sta_bss_param 
    141   * @NL80211_STA_INFO_CONNECTED_TIME: time since the station is last connected 
     54        /* keep last */ 
     55        NUM_NL80211_IFTYPES, 
     56@@ -1744,6 +1762,8 @@ enum nl80211_sta_bss_param { 
    14257  * @NL80211_STA_INFO_STA_FLAGS: Contains a struct nl80211_sta_flag_update. 
    143 + * @NL80211_STA_INFO_BEACON_LOSS: count of times beacon loss was detected (u32) 
    144 + * @NL80211_STA_INFO_T_OFFSET: timing offset with respect to this STA (s64) 
     58  * @NL80211_STA_INFO_BEACON_LOSS: count of times beacon loss was detected (u32) 
     59  * @NL80211_STA_INFO_T_OFFSET: timing offset with respect to this STA (s64) 
    14560+ * @NL80211_STA_INFO_CHAIN_SIGNAL: per-chain signal strength of last PPDU 
    14661+ * @NL80211_STA_INFO_CHAIN_SIGNAL_AVG: per-chain signal strength average 
     
    14863  * @NL80211_STA_INFO_MAX: highest possible station info attribute 
    14964  */ 
    150 @@ -1673,6 +1717,10 @@ enum nl80211_sta_info { 
    151         NL80211_STA_INFO_BSS_PARAM, 
    152         NL80211_STA_INFO_CONNECTED_TIME, 
     65@@ -1768,6 +1788,8 @@ enum nl80211_sta_info { 
    15366        NL80211_STA_INFO_STA_FLAGS, 
    154 +       NL80211_STA_INFO_BEACON_LOSS, 
    155 +       NL80211_STA_INFO_T_OFFSET, 
     67        NL80211_STA_INFO_BEACON_LOSS, 
     68        NL80211_STA_INFO_T_OFFSET, 
    15669+       NL80211_STA_INFO_CHAIN_SIGNAL, 
    15770+       NL80211_STA_INFO_CHAIN_SIGNAL_AVG, 
     
    15972        /* keep last */ 
    16073        __NL80211_STA_INFO_AFTER_LAST, 
    161 @@ -2098,8 +2146,18 @@ enum nl80211_mntr_flags { 
    162   * TUs) during which a mesh STA can send only one Action frame containing a 
    163   * PERR element. 
    164   * 
    165 + * @NL80211_MESHCONF_FORWARDING: set Mesh STA as forwarding or non-forwarding 
    166 + * or forwarding entity (default is TRUE - forwarding entity) 
    167 + * 
    168 + * @NL80211_MESHCONF_RSSI_THRESHOLD: RSSI threshold in dBm. This specifies the 
    169 + * threshold for average signal strength of candidate station to establish 
    170 + * a peer link. 
    171 + * 
    172   * @NL80211_MESHCONF_ATTR_MAX: highest possible mesh configuration attribute 
    173   * 
    174 + * @NL80211_MESHCONF_SYNC_OFFSET_MAX_NEIGHBOR: maximum number of neighbors 
    175 + * to synchronize to for 11s default synchronization method (see 11C.12.2.2) 
    176 + * 
    177   * @__NL80211_MESHCONF_ATTR_AFTER_LAST: internal use 
    178   */ 
    179  enum nl80211_meshconf_params { 
    180 @@ -2122,6 +2180,9 @@ enum nl80211_meshconf_params { 
    181         NL80211_MESHCONF_HWMP_RANN_INTERVAL, 
    182         NL80211_MESHCONF_GATE_ANNOUNCEMENTS, 
    183         NL80211_MESHCONF_HWMP_PERR_MIN_INTERVAL, 
    184 +       NL80211_MESHCONF_FORWARDING, 
    185 +       NL80211_MESHCONF_RSSI_THRESHOLD, 
    186 +       NL80211_MESHCONF_SYNC_OFFSET_MAX_NEIGHBOR, 
    187   
    188         /* keep last */ 
    189         __NL80211_MESHCONF_ATTR_AFTER_LAST, 
    190 @@ -2161,6 +2222,11 @@ enum nl80211_meshconf_params { 
    191   * complete (unsecured) mesh peering without the need of a userspace daemon. 
    192   * 
    193   * @NL80211_MESH_SETUP_ATTR_MAX: highest possible mesh setup attribute number 
    194 + * 
    195 + * @NL80211_MESH_SETUP_ENABLE_VENDOR_SYNC: Enable this option to use a 
    196 + * vendor specific synchronization method or disable it to use the default 
    197 + * neighbor offset synchronization 
    198 + * 
    199   * @__NL80211_MESH_SETUP_ATTR_AFTER_LAST: Internal use 
    200   */ 
    201  enum nl80211_mesh_setup_params { 
    202 @@ -2170,6 +2236,7 @@ enum nl80211_mesh_setup_params { 
    203         NL80211_MESH_SETUP_IE, 
    204         NL80211_MESH_SETUP_USERSPACE_AUTH, 
    205         NL80211_MESH_SETUP_USERSPACE_AMPE, 
    206 +       NL80211_MESH_SETUP_ENABLE_VENDOR_SYNC, 
    207   
    208         /* keep last */ 
    209         __NL80211_MESH_SETUP_ATTR_AFTER_LAST, 
    210 @@ -2179,7 +2246,7 @@ enum nl80211_mesh_setup_params { 
    211  /** 
    212   * enum nl80211_txq_attr - TX queue parameter attributes 
    213   * @__NL80211_TXQ_ATTR_INVALID: Attribute number 0 is reserved 
    214 - * @NL80211_TXQ_ATTR_QUEUE: TX queue identifier (NL80211_TXQ_Q_*) 
    215 + * @NL80211_TXQ_ATTR_AC: AC identifier (NL80211_AC_*) 
    216   * @NL80211_TXQ_ATTR_TXOP: Maximum burst time in units of 32 usecs, 0 meaning 
    217   *     disabled 
    218   * @NL80211_TXQ_ATTR_CWMIN: Minimum contention window [a value of the form 
    219 @@ -2192,7 +2259,7 @@ enum nl80211_mesh_setup_params { 
    220   */ 
    221  enum nl80211_txq_attr { 
    222         __NL80211_TXQ_ATTR_INVALID, 
    223 -       NL80211_TXQ_ATTR_QUEUE, 
    224 +       NL80211_TXQ_ATTR_AC, 
    225         NL80211_TXQ_ATTR_TXOP, 
    226         NL80211_TXQ_ATTR_CWMIN, 
    227         NL80211_TXQ_ATTR_CWMAX, 
    228 @@ -2203,13 +2270,21 @@ enum nl80211_txq_attr { 
    229         NL80211_TXQ_ATTR_MAX = __NL80211_TXQ_ATTR_AFTER_LAST - 1 
    230  }; 
    231   
    232 -enum nl80211_txq_q { 
    233 -       NL80211_TXQ_Q_VO, 
    234 -       NL80211_TXQ_Q_VI, 
    235 -       NL80211_TXQ_Q_BE, 
    236 -       NL80211_TXQ_Q_BK 
    237 +enum nl80211_ac { 
    238 +       NL80211_AC_VO, 
    239 +       NL80211_AC_VI, 
    240 +       NL80211_AC_BE, 
    241 +       NL80211_AC_BK, 
    242 +       NL80211_NUM_ACS 
    243  }; 
    244   
    245 +/* backward compat */ 
    246 +#define NL80211_TXQ_ATTR_QUEUE NL80211_TXQ_ATTR_AC 
    247 +#define NL80211_TXQ_Q_VO       NL80211_AC_VO 
    248 +#define NL80211_TXQ_Q_VI       NL80211_AC_VI 
    249 +#define NL80211_TXQ_Q_BE       NL80211_AC_BE 
    250 +#define NL80211_TXQ_Q_BK       NL80211_AC_BK 
    251 + 
    252  enum nl80211_channel_type { 
    253         NL80211_CHAN_NO_HT, 
    254         NL80211_CHAN_HT20, 
    255 @@ -2395,12 +2470,15 @@ enum nl80211_key_attributes { 
    256   *     in an array of rates as defined in IEEE 802.11 7.3.2.2 (u8 values with 
    257   *     1 = 500 kbps) but without the IE length restriction (at most 
    258   *     %NL80211_MAX_SUPP_RATES in a single array). 
    259 + * @NL80211_TXRATE_MCS: HT (MCS) rates allowed for TX rate selection 
    260 + *     in an array of MCS numbers. 
    261   * @__NL80211_TXRATE_AFTER_LAST: internal 
    262   * @NL80211_TXRATE_MAX: highest TX rate attribute 
    263   */ 
    264  enum nl80211_tx_rate_attributes { 
    265         __NL80211_TXRATE_INVALID, 
    266         NL80211_TXRATE_LEGACY, 
    267 +       NL80211_TXRATE_MCS, 
    268   
    269         /* keep last */ 
    270         __NL80211_TXRATE_AFTER_LAST, 
    271 @@ -2786,10 +2864,13 @@ enum nl80211_ap_sme_features { 
    272   *     TX status to the socket error queue when requested with the 
    273   *     socket option. 
    274   * @NL80211_FEATURE_HT_IBSS: This driver supports IBSS with HT datarates. 
    275 + * @NL80211_FEATURE_INACTIVITY_TIMER: This driver takes care of freeing up 
    276 + *     the connected inactive stations in AP mode. 
     74@@ -2994,12 +3016,18 @@ enum nl80211_ap_sme_features { 
     75  * @NL80211_FEATURE_CELL_BASE_REG_HINTS: This driver has been tested 
     76  *     to work properly to suppport receiving regulatory hints from 
     77  *     cellular base stations. 
     78+ * @NL80211_FEATURE_P2P_DEVICE_NEEDS_CHANNEL: If this is set, an active 
     79+ *     P2P Device (%NL80211_IFTYPE_P2P_DEVICE) requires its own channel 
     80+ *     in the interface combinations, even when it's only used for scan 
     81+ *     and remain-on-channel. This could be due to, for example, the 
     82+ *     remain-on-channel implementation requiring a channel context. 
    27783  */ 
    27884 enum nl80211_feature_flags { 
    279         NL80211_FEATURE_SK_TX_STATUS    = 1 << 0, 
    280         NL80211_FEATURE_HT_IBSS         = 1 << 1, 
    281 +       NL80211_FEATURE_INACTIVITY_TIMER = 1 << 2, 
     85-       NL80211_FEATURE_SK_TX_STATUS    = 1 << 0, 
     86-       NL80211_FEATURE_HT_IBSS         = 1 << 1, 
     87-       NL80211_FEATURE_INACTIVITY_TIMER = 1 << 2, 
     88-       NL80211_FEATURE_CELL_BASE_REG_HINTS = 1 << 3, 
     89+       NL80211_FEATURE_SK_TX_STATUS                    = 1 << 0, 
     90+       NL80211_FEATURE_HT_IBSS                         = 1 << 1, 
     91+       NL80211_FEATURE_INACTIVITY_TIMER                = 1 << 2, 
     92+       NL80211_FEATURE_CELL_BASE_REG_HINTS             = 1 << 3, 
     93+       NL80211_FEATURE_P2P_DEVICE_NEEDS_CHANNEL        = 1 << 4, 
    28294 }; 
    28395  
  • trunk/package/iw/patches/100-rx_rate.patch

    r30347 r33586  
    11--- a/station.c 
    22+++ b/station.c 
    3 @@ -29,13 +29,43 @@ enum plink_actions { 
     3@@ -29,13 +29,47 @@ enum plink_actions { 
    44        PLINK_ACTION_BLOCK, 
    55 }; 
     
    1111+       static struct nla_policy rate_policy[NL80211_RATE_INFO_MAX + 1] = { 
    1212+               [NL80211_RATE_INFO_BITRATE] = { .type = NLA_U16 }, 
     13+               [NL80211_RATE_INFO_BITRATE32] = { .type = NLA_U32 }, 
    1314+               [NL80211_RATE_INFO_MCS] = { .type = NLA_U8 }, 
    1415+               [NL80211_RATE_INFO_40_MHZ_WIDTH] = { .type = NLA_FLAG }, 
     
    2223+               fprintf(stderr, "failed to parse nested rate attributes!\n"); 
    2324+       } else { 
     25+               int rate = 0; 
    2426+               printf("\n\t%s:\t", name); 
    25 +               if (rinfo[NL80211_RATE_INFO_BITRATE]) { 
    26 +                       int rate = nla_get_u16(rinfo[NL80211_RATE_INFO_BITRATE]); 
     27+               if (rinfo[NL80211_RATE_INFO_BITRATE32]) 
     28+                       rate = nla_get_u32(rinfo[NL80211_RATE_INFO_BITRATE32]); 
     29+               else if (rinfo[NL80211_RATE_INFO_BITRATE]) 
     30+                       rate = nla_get_u16(rinfo[NL80211_RATE_INFO_BITRATE]); 
     31+               if (rate > 0) 
    2732+                       printf("%d.%d MBit/s", rate / 10, rate % 10); 
    28 +               } 
    2933+ 
    3034+               if (rinfo[NL80211_RATE_INFO_MCS]) 
     
    4650        struct nl80211_sta_flag_update *sta_flags; 
    4751        static struct nla_policy stats_policy[NL80211_STA_INFO_MAX + 1] = { 
    48 @@ -46,6 +76,7 @@ static int print_sta_handler(struct nl_m 
    49                 [NL80211_STA_INFO_TX_PACKETS] = { .type = NLA_U32 }, 
     52@@ -47,6 +81,7 @@ static int print_sta_handler(struct nl_m 
    5053                [NL80211_STA_INFO_SIGNAL] = { .type = NLA_U8 }, 
     54                [NL80211_STA_INFO_T_OFFSET] = { .type = NLA_U64 }, 
    5155                [NL80211_STA_INFO_TX_BITRATE] = { .type = NLA_NESTED }, 
    5256+               [NL80211_STA_INFO_RX_BITRATE] = { .type = NLA_NESTED }, 
     
    5458                [NL80211_STA_INFO_PLID] = { .type = NLA_U16 }, 
    5559                [NL80211_STA_INFO_PLINK_STATE] = { .type = NLA_U8 }, 
    56 @@ -55,13 +86,6 @@ static int print_sta_handler(struct nl_m 
     60@@ -56,14 +91,6 @@ static int print_sta_handler(struct nl_m 
    5761                        { .minlen = sizeof(struct nl80211_sta_flag_update) }, 
    5862        }; 
     
    6064-       static struct nla_policy rate_policy[NL80211_RATE_INFO_MAX + 1] = { 
    6165-               [NL80211_RATE_INFO_BITRATE] = { .type = NLA_U16 }, 
     66-               [NL80211_RATE_INFO_BITRATE32] = { .type = NLA_U32 }, 
    6267-               [NL80211_RATE_INFO_MCS] = { .type = NLA_U8 }, 
    6368-               [NL80211_RATE_INFO_40_MHZ_WIDTH] = { .type = NLA_FLAG }, 
     
    6873                  genlmsg_attrlen(gnlh, 0), NULL); 
    6974  
    70 @@ -114,25 +138,8 @@ static int print_sta_handler(struct nl_m 
    71                 printf("\n\tsignal avg:\t%d dBm", 
    72                         (int8_t)nla_get_u8(sinfo[NL80211_STA_INFO_SIGNAL_AVG])); 
     75@@ -119,28 +146,8 @@ static int print_sta_handler(struct nl_m 
     76                printf("\n\tToffset:\t%lld us", 
     77                        (unsigned long long)nla_get_u64(sinfo[NL80211_STA_INFO_T_OFFSET])); 
    7378  
    7479-       if (sinfo[NL80211_STA_INFO_TX_BITRATE]) { 
     
    7782-                       fprintf(stderr, "failed to parse nested rate attributes!\n"); 
    7883-               } else { 
     84-                       int rate = 0; 
    7985-                       printf("\n\ttx bitrate:\t"); 
    80 -                       if (rinfo[NL80211_RATE_INFO_BITRATE]) { 
    81 -                               int rate = nla_get_u16(rinfo[NL80211_RATE_INFO_BITRATE]); 
     86-                       if (rinfo[NL80211_RATE_INFO_BITRATE32]) 
     87-                               rate = nla_get_u32(rinfo[NL80211_RATE_INFO_BITRATE32]); 
     88-                       else if (rinfo[NL80211_RATE_INFO_BITRATE]) 
     89-                               rate = nla_get_u16(rinfo[NL80211_RATE_INFO_BITRATE]); 
     90-                       if (rate > 0) 
    8291-                               printf("%d.%d MBit/s", rate / 10, rate % 10); 
    83 -                       } 
    8492- 
    8593-                       if (rinfo[NL80211_RATE_INFO_MCS]) 
  • trunk/package/iw/patches/110-per_chain_signal_strength.patch

    r30347 r33586  
    11--- a/station.c 
    22+++ b/station.c 
    3 @@ -61,6 +61,33 @@ static void print_sta_bitrate(struct nla 
     3@@ -65,6 +65,33 @@ static void print_sta_bitrate(struct nla 
    44        } 
    55 } 
     
    3535 { 
    3636        struct nlattr *tb[NL80211_ATTR_MAX + 1]; 
    37 @@ -84,7 +111,10 @@ static int print_sta_handler(struct nl_m 
     37@@ -89,7 +116,10 @@ static int print_sta_handler(struct nl_m 
    3838                [NL80211_STA_INFO_TX_FAILED] = { .type = NLA_U32 }, 
    3939                [NL80211_STA_INFO_STA_FLAGS] = 
     
    4646        nla_parse(tb, NL80211_ATTR_MAX, genlmsg_attrdata(gnlh, 0), 
    4747                  genlmsg_attrlen(gnlh, 0), NULL); 
    48 @@ -131,12 +161,18 @@ static int print_sta_handler(struct nl_m 
     48@@ -136,12 +166,19 @@ static int print_sta_handler(struct nl_m 
    4949        if (sinfo[NL80211_STA_INFO_TX_FAILED]) 
    5050                printf("\n\ttx failed:\t%u", 
     
    6666+                       (int8_t)nla_get_u8(sinfo[NL80211_STA_INFO_SIGNAL_AVG]), 
    6767+                       chain); 
    68   
    69         print_sta_bitrate(sinfo[NL80211_STA_INFO_TX_BITRATE], "tx bitrate"); 
    70         print_sta_bitrate(sinfo[NL80211_STA_INFO_RX_BITRATE], "rx bitrate"); 
     68+ 
     69        if (sinfo[NL80211_STA_INFO_T_OFFSET]) 
     70                printf("\n\tToffset:\t%lld us", 
     71                        (unsigned long long)nla_get_u64(sinfo[NL80211_STA_INFO_T_OFFSET])); 
  • trunk/package/iw/patches/120-tdls_peer_indentation.patch

    r30347 r33586  
    11--- a/station.c 
    22+++ b/station.c 
    3 @@ -258,7 +258,7 @@ static int print_sta_handler(struct nl_m 
     3@@ -267,7 +267,7 @@ static int print_sta_handler(struct nl_m 
    44                } 
    55  
Note: See TracChangeset for help on using the changeset viewer.