#!/bin/sh

# NOTE: This file need to be modified to match specific hardwares

getWirelessInfId() {
  return
}

_getWirelessInfId() {
  local ssid="$1"
  local radio="$2"
  echo "${ssid}${radio}"
}

# getWirelessInf(ssid, radioId)
getWirelessInf() {
  echo "wlan`_getWirelessInfId $1 $2`"
}

# getStationList(index, ssid, radioId)
getStationList() {
  local ifName=`getWirelessInf $2 $3`

  iw $ifName station dump | grep Station | awk '{print $2}' | tr "\n" ";"
}

# getSsidName(index, ssid, radioId)
getSsidName() {
  local ifName=`getWirelessInf $2 $3`

  iwinfo | grep $ifName | awk -F'"' '{print $2}'
}
