func: static brcmf_cfg80211_dump_station(struct wiphy *wiphy, struct net_device int idx, u8 *mac, struct station_info *sinfo) struct brcmf_cfg80211_info * cfg = wiphy_to_cfg ( wiphy ) ; struct brcmf_if * ifp = netdev_priv ( ndev ) ; s32 err ; if ( idx == 0 )  cfg -> assoclist . count = cpu_to_le32 ( BRCMF_MAX_ASSOCLIST ); err = brcmf_fil_cmd_data_get ( ifp , BRCMF_C_GET_ASSOCLIST , & cfg -> assoclist , sizeof ( cfg -> assoclist ) ); if ( err )  if ( idx < le32_to_cpu ( cfg -> assoclist . count ) )  return brcmf_cfg80211_get_station ( wiphy , ndev , mac , sinfo ) ; static brcmf_cfg80211_get_station(struct wiphy *wiphy, struct net_device const u8 *mac, struct station_info *sinfo) struct brcmf_if * ifp = netdev_priv ( ndev ) ; if ( ! check_vif_up ( ifp -> vif ) )  static bool check_vif_up(struct brcmf_cfg80211_vif *vif) if ( ! test_bit ( BRCMF_VIF_STATUS_READY , & vif -> sme_state ) )  return false ; return true ; if ( brcmf_is_ibssmode ( ifp -> vif ) )  static bool brcmf_is_ibssmode(struct brcmf_cfg80211_vif *vif) return vif -> wdev . iftype == NL80211_IFTYPE_ADHOC ; return brcmf_cfg80211_get_station_ibss ( ifp , sinfo ) ; static brcmf_cfg80211_get_station_ibss(struct brcmf_if struct station_info *sinfo) struct brcmf_scb_val_le scbval ; s32 err ; err = brcmf_fil_cmd_int_get ( ifp , BRCMF_C_GET_RATE , & rate ); if ( err < 0 )  memset ( & scbval , 0 , sizeof ( scbval ) ); err = brcmf_fil_cmd_data_get ( ifp , BRCMF_C_GET_RSSI , & scbval , sizeof ( scbval ) ); if ( err )  brcmf_err ( "BRCMF_C_GET_RSSI error (%d)\n" , err ); return err ; rssi = le32_to_cpu ( scbval . val ); sinfo -> signal = rssi; if ( err )  brcmf_err ( "BRCMF_C_GET_GET_PKTCNTS error (%d)\n" , err ); return err ; sinfo -> filled |= BIT ( NL80211_STA_INFO_RX_PACKETS ) | BIT ( NL80211_STA_INFO_RX_DROP_MISC ) | BIT ( NL80211_STA_INFO_TX_PACKETS ) | BIT ( NL80211_STA_INFO_TX_FAILED ); sinfo -> rx_packets = le32_to_cpu ( pktcnt . rx_good_pkt ); sinfo -> rx_dropped_misc = le32_to_cpu ( pktcnt . rx_bad_pkt ); sinfo -> tx_packets = le32_to_cpu ( pktcnt . tx_good_pkt ); sinfo -> tx_failed = le32_to_cpu ( pktcnt . tx_bad_pkt ); 