From patchwork Wed Oct 22 12:03:55 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peer, Ilan" X-Patchwork-Id: 402233 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from maxx.maxx.shmoo.com (maxx.shmoo.com [205.134.188.171]) by ozlabs.org (Postfix) with ESMTP id 8579014007D for ; Thu, 23 Oct 2014 05:04:28 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id CBA1617C102; Wed, 22 Oct 2014 14:04:24 -0400 (EDT) X-Virus-Scanned: amavisd-new at maxx.shmoo.com Received: from maxx.maxx.shmoo.com ([127.0.0.1]) by localhost (maxx.shmoo.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XpUgpf7DknN1; Wed, 22 Oct 2014 14:04:24 -0400 (EDT) Received: from maxx.shmoo.com (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id B684D17C12D; Wed, 22 Oct 2014 14:03:16 -0400 (EDT) X-Original-To: mailman-post+hostap@maxx.shmoo.com Delivered-To: mailman-post+hostap@maxx.shmoo.com Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id D5A9917C12D for ; Wed, 22 Oct 2014 14:03:14 -0400 (EDT) X-Virus-Scanned: amavisd-new at maxx.shmoo.com Received: from maxx.maxx.shmoo.com ([127.0.0.1]) by localhost (maxx.shmoo.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yxqvMdzLMj-r for ; Wed, 22 Oct 2014 14:03:07 -0400 (EDT) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id D4CE317C102 for ; Wed, 22 Oct 2014 14:02:59 -0400 (EDT) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP; 22 Oct 2014 11:01:51 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.04,770,1406617200"; d="scan'208";a="623379215" Received: from unknown (HELO ipeer-e6430-3.jer.intel.com) ([10.12.217.164]) by orsmga002.jf.intel.com with ESMTP; 22 Oct 2014 11:02:08 -0700 From: Ilan Peer To: hostap@lists.shmoo.com Subject: [PATCH v2 04/13] WMM AC: driver: add add_tx_ts and del_tx_ts driver ops Date: Wed, 22 Oct 2014 08:03:55 -0400 Message-Id: <1413979444-4051-5-git-send-email-ilan.peer@intel.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1413979444-4051-1-git-send-email-ilan.peer@intel.com> References: <1413979444-4051-1-git-send-email-ilan.peer@intel.com> Cc: Moshe Benji , Moshe Benji X-BeenThere: hostap@lists.shmoo.com X-Mailman-Version: 2.1.11 Precedence: list List-Id: HostAP Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: hostap-bounces@lists.shmoo.com Errors-To: hostap-bounces@lists.shmoo.com From: Moshe Benji Add add_tx_ts and del_tx_ts ops to notify the driver about tspecs to add / delete. Additionally, add wmm_ac_supported flag to indicate whether the driver supports wmm ac. Signed-off-by: Moshe Benji Signed-off-by: Eliad Peller --- src/drivers/driver.h | 24 ++++++++++++++++++++++++ wpa_supplicant/driver_i.h | 18 ++++++++++++++++++ wpa_supplicant/wpa_supplicant.c | 2 ++ wpa_supplicant/wpa_supplicant_i.h | 1 + 4 files changed, 45 insertions(+) diff --git a/src/drivers/driver.h b/src/drivers/driver.h index 0cde9c5..cba1e09 100644 --- a/src/drivers/driver.h +++ b/src/drivers/driver.h @@ -1048,6 +1048,8 @@ struct wpa_driver_capa { #define WPA_DRIVER_FLAGS_MESH 0x0000000100000000ULL u64 flags; + unsigned int wmm_ac_supported:1; + int max_scan_ssids; int max_sched_scan_ssids; int sched_scan_supported; @@ -2795,6 +2797,28 @@ struct wpa_driver_ops { int (*switch_channel)(void *priv, struct csa_settings *settings); /** + * add_tx_ts - Add traffic stream + * @priv: Private driver interface data + * @tsid: traffic stream ID + * @addr: receiver address + * @user_prio: user priority of the traffic stream + * @admitted_time: admitted time for this TS in units + * of 32 microsecond periods (per second). + * Returns: 0 on success, -1 on failure + */ + int (*add_tx_ts)(void *priv, u8 tsid, const u8 *addr, u8 user_prio, + u16 admitted_time); + + /** + * del_tx_ts - Delete traffic stream + * @priv: Private driver interface data + * @tsid: traffic stream ID + * @addr: receiver address + * Returns: 0 on success, -1 on failure + */ + int (*del_tx_ts)(void *priv, u8 tsid, const u8 *addr); + + /** * start_dfs_cac - Listen for radar interference on the channel * @priv: Private driver interface data * @freq: Channel parameters diff --git a/wpa_supplicant/driver_i.h b/wpa_supplicant/driver_i.h index 18a5457..4a6d38c 100644 --- a/wpa_supplicant/driver_i.h +++ b/wpa_supplicant/driver_i.h @@ -609,6 +609,24 @@ static inline int wpa_drv_switch_channel(struct wpa_supplicant *wpa_s, return wpa_s->driver->switch_channel(wpa_s->drv_priv, settings); } +static inline int wpa_drv_add_ts(struct wpa_supplicant *wpa_s, u8 tsid, + const u8 *address, u8 user_priority, + u16 admitted_time) +{ + if (!wpa_s->driver->add_tx_ts) + return -1; + return wpa_s->driver->add_tx_ts(wpa_s->drv_priv, tsid, address, + user_priority, admitted_time); +} + +static inline int wpa_drv_del_ts(struct wpa_supplicant *wpa_s, u8 tid, + const u8 *address) +{ + if (!wpa_s->driver->del_tx_ts) + return -1; + return wpa_s->driver->del_tx_ts(wpa_s->drv_priv, tid, address); +} + static inline int wpa_drv_wnm_oper(struct wpa_supplicant *wpa_s, enum wnm_oper oper, const u8 *peer, u8 *buf, u16 *buf_len) diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c index 27afa83..090d967 100644 --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c @@ -3800,7 +3800,9 @@ static int wpa_supplicant_init_iface(struct wpa_supplicant *wpa_s, wpa_s->extended_capa_len = capa.extended_capa_len; wpa_s->num_multichan_concurrent = capa.num_multichan_concurrent; + wpa_s->wmm_ac_supported = capa.wmm_ac_supported; } + if (wpa_s->max_remain_on_chan == 0) wpa_s->max_remain_on_chan = 1000; diff --git a/wpa_supplicant/wpa_supplicant_i.h b/wpa_supplicant/wpa_supplicant_i.h index b26c319..443065d 100644 --- a/wpa_supplicant/wpa_supplicant_i.h +++ b/wpa_supplicant/wpa_supplicant_i.h @@ -875,6 +875,7 @@ struct wpa_supplicant { struct l2_packet_data *l2_test; #endif /* CONFIG_TESTING_OPTIONS */ + unsigned int wmm_ac_supported:1; struct wmm_ac_assoc_data *wmm_ac_assoc_info; };