ath9k: Summarize hw state per channel context
Group and set hw state (opmode, primary_sta, beacon conf) per channel context instead of whole list of vifs. This would allow each channel context to run in different mode (STA/AP). Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:

committed by
John W. Linville

parent
ca900ac9d9
commit
9a9c4fbc3f
@@ -750,13 +750,13 @@ static ssize_t read_file_misc(struct file *file, char __user *user_buf,
|
||||
{
|
||||
struct ath_softc *sc = file->private_data;
|
||||
struct ath_common *common = ath9k_hw_common(sc->sc_ah);
|
||||
struct ieee80211_hw *hw = sc->hw;
|
||||
struct ath9k_vif_iter_data iter_data;
|
||||
struct ath_chanctx *ctx;
|
||||
char buf[512];
|
||||
unsigned int len = 0;
|
||||
ssize_t retval = 0;
|
||||
unsigned int reg;
|
||||
u32 rxfilter;
|
||||
u32 rxfilter, i;
|
||||
|
||||
len += scnprintf(buf + len, sizeof(buf) - len,
|
||||
"BSSID: %pM\n", common->curbssid);
|
||||
@@ -826,14 +826,20 @@ static ssize_t read_file_misc(struct file *file, char __user *user_buf,
|
||||
|
||||
len += scnprintf(buf + len, sizeof(buf) - len, "\n");
|
||||
|
||||
ath9k_calculate_iter_data(hw, NULL, &iter_data);
|
||||
i = 0;
|
||||
ath_for_each_chanctx(sc, ctx) {
|
||||
if (!ctx->assigned || list_empty(&ctx->vifs))
|
||||
continue;
|
||||
ath9k_calculate_iter_data(sc, ctx, &iter_data);
|
||||
|
||||
len += scnprintf(buf + len, sizeof(buf) - len,
|
||||
"VIF-COUNTS: AP: %i STA: %i MESH: %i WDS: %i"
|
||||
" ADHOC: %i TOTAL: %hi BEACON-VIF: %hi\n",
|
||||
iter_data.naps, iter_data.nstations, iter_data.nmeshes,
|
||||
iter_data.nwds, iter_data.nadhocs,
|
||||
sc->nvifs, sc->nbcnvifs);
|
||||
len += scnprintf(buf + len, sizeof(buf) - len,
|
||||
"VIF-COUNTS: CTX %i AP: %i STA: %i MESH: %i WDS: %i",
|
||||
i++, iter_data.naps, iter_data.nstations,
|
||||
iter_data.nmeshes, iter_data.nwds);
|
||||
len += scnprintf(buf + len, sizeof(buf) - len,
|
||||
" ADHOC: %i TOTAL: %hi BEACON-VIF: %hi\n",
|
||||
iter_data.nadhocs, sc->nvifs, sc->nbcnvifs);
|
||||
}
|
||||
|
||||
if (len > sizeof(buf))
|
||||
len = sizeof(buf);
|
||||
|
Reference in New Issue
Block a user