diff options
author | Felix Fietkau <nbd@openwrt.org> | 2013-04-26 10:52:03 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2013-04-26 10:52:03 +0000 |
commit | accc6e309e9f9ce94ce34c7b2cdf60e16c78d1e1 (patch) | |
tree | 3b2ebce435696f7f85164376efffbc7758012c20 /package/mac80211/patches/869-brcmsmac-add-beacon-template-support.patch | |
parent | bc453a52b2c3b3da4dba056048cb83db195fe189 (diff) | |
download | upstream-accc6e309e9f9ce94ce34c7b2cdf60e16c78d1e1.tar.gz upstream-accc6e309e9f9ce94ce34c7b2cdf60e16c78d1e1.tar.bz2 upstream-accc6e309e9f9ce94ce34c7b2cdf60e16c78d1e1.zip |
mac80211: update to wireless-testing 2013-04-16 + backports
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 36448
Diffstat (limited to 'package/mac80211/patches/869-brcmsmac-add-beacon-template-support.patch')
-rw-r--r-- | package/mac80211/patches/869-brcmsmac-add-beacon-template-support.patch | 266 |
1 files changed, 0 insertions, 266 deletions
diff --git a/package/mac80211/patches/869-brcmsmac-add-beacon-template-support.patch b/package/mac80211/patches/869-brcmsmac-add-beacon-template-support.patch deleted file mode 100644 index cbed0f1015..0000000000 --- a/package/mac80211/patches/869-brcmsmac-add-beacon-template-support.patch +++ /dev/null @@ -1,266 +0,0 @@ ---- a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c -+++ b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c -@@ -1,5 +1,6 @@ - /* - * Copyright (c) 2010 Broadcom Corporation -+ * Copyright (c) 2013 Hauke Mehrtens <hauke@hauke-m.de> - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above -@@ -522,9 +523,17 @@ brcms_ops_bss_info_changed(struct ieee80 - brcms_c_set_addrmatch(wl->wlc, RCM_BSSID_OFFSET, info->bssid); - spin_unlock_bh(&wl->lock); - } -- if (changed & BSS_CHANGED_BEACON) -+ if (changed & BSS_CHANGED_BEACON) { - /* Beacon data changed, retrieve new beacon (beaconing modes) */ -- brcms_err(core, "%s: beacon changed\n", __func__); -+ struct sk_buff *beacon; -+ u16 tim_offset = 0; -+ -+ spin_lock_bh(&wl->lock); -+ beacon = ieee80211_beacon_get_tim(hw, vif, &tim_offset, NULL); -+ brcms_c_set_new_beacon(wl->wlc, beacon, tim_offset, -+ info->dtim_period); -+ spin_unlock_bh(&wl->lock); -+ } - - if (changed & BSS_CHANGED_BEACON_ENABLED) { - /* Beaconing should be enabled/disabled (beaconing modes) */ ---- a/drivers/net/wireless/brcm80211/brcmsmac/main.c -+++ b/drivers/net/wireless/brcm80211/brcmsmac/main.c -@@ -1,5 +1,6 @@ - /* - * Copyright (c) 2010 Broadcom Corporation -+ * Copyright (c) 2013 Hauke Mehrtens <hauke@hauke-m.de> - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above -@@ -450,6 +451,8 @@ static void brcms_c_detach_mfree(struct - kfree(wlc->corestate); - kfree(wlc->hw->bandstate[0]); - kfree(wlc->hw); -+ if (wlc->beacon) -+ dev_kfree_skb_any(wlc->beacon); - - /* free the wlc */ - kfree(wlc); -@@ -4086,10 +4089,14 @@ void brcms_c_wme_setparams(struct brcms_ - *shm_entry++); - } - -- if (suspend) { -+ if (suspend) - brcms_c_suspend_mac_and_wait(wlc); -+ -+ brcms_c_update_beacon(wlc); -+ brcms_c_update_probe_resp(wlc, false); -+ -+ if (suspend) - brcms_c_enable_mac(wlc); -- } - } - - static void brcms_c_edcf_setparams(struct brcms_c_info *wlc, bool suspend) -@@ -7379,6 +7386,107 @@ int brcms_c_get_header_len(void) - return TXOFF; - } - -+static void brcms_c_beacon_write(struct brcms_c_info *wlc, -+ struct sk_buff *beacon, u16 tim_offset, -+ u16 dtim_period, bool bcn0, bool bcn1) -+{ -+ size_t len; -+ struct ieee80211_tx_info *tx_info; -+ struct brcms_hardware *wlc_hw = wlc->hw; -+ struct ieee80211_hw *ieee_hw = brcms_c_pub(wlc)->ieee_hw; -+ -+ /* Get tx_info */ -+ tx_info = IEEE80211_SKB_CB(beacon); -+ -+ len = min_t(size_t, beacon->len, BCN_TMPL_LEN); -+ wlc->bcn_rspec = ieee80211_get_tx_rate(ieee_hw, tx_info)->hw_value; -+ -+ brcms_c_compute_plcp(wlc, wlc->bcn_rspec, -+ len + FCS_LEN - D11_PHY_HDR_LEN, beacon->data); -+ -+ /* "Regular" and 16 MBSS but From 8ed8e29b19dba95a7a6c2364c2bb32d926601713 Mon Sep 17 00:00:00 2001
From: Giedrius Trainavicius <giedrius@blokas.io>
Date: Thu, 5 Jan 2017 02:38:16 +0200
Subject: [PATCH] pisound improvements:
* Added a writable sysfs object to enable scripts / user space software
to blink MIDI activity LEDs for variable duration.
* Improved hw_param constraints setting.
* Added compatibility with S16_LE sample format.
* Exposed some simple placeholder volume controls, so the card appears
in volumealsa widget.
Signed-off-by: Giedrius Trainavicius <giedrius@blokas.io>
---
sound/soc/bcm/pisound.c | 175 ++++++++++++++++++++++++++++++++++++++++++------
1 file changed, 154 insertions(+), 21 deletions(-)
--- a/sound/soc/bcm/pisound.c
+++ b/sound/soc/bcm/pisound.c
@@ -36,6 +36,7 @@
#include <sound/jack.h>
#include <sound/rawmidi.h>
#include <sound/asequencer.h>
+#include <sound/control.h>
static int pisnd_spi_init(struct device *dev);
static void pisnd_spi_uninit(void);
@@ -214,6 +215,9 @@ static char g_serial_num[11];
static char g_id[25];
static char g_version[5];
+static uint8_t g_ledFlashDuration;
+static bool g_ledFlashDurationChanged;
+
DEFINE_KFIFO(spi_fifo_in, uint8_t, FIFO_SIZE);
DEFINE_KFIFO(spi_fifo_out, uint8_t, FIFO_SIZE);
@@ -396,8 +400,13 @@ static void pisnd_work_handler(struct wo
val = 0;
tx = 0;
- if (kfifo_get(&spi_fifo_out, &val))
+ if (g_ledFlashDurationChanged) {
+ tx = 0xf000 | g_ledFlashDuration;
+ g_ledFlashDuration = 0;
+ g_ledFlashDurationChanged = false;
+ } else if (kfifo_get(&spi_fifo_out, &val)) {
tx = 0x0f00 | val;
+ }
rx = spi_transfer16(tx);
@@ -410,6 +419,7 @@ static void pisnd_work_handler(struct wo
} while (rx != 0
|| !kfifo_is_empty(&spi_fifo_out)
|| pisnd_spi_has_more()
+ || g_ledFlashDurationChanged
);
if (!kfifo_is_empty(&spi_fifo_in) && g_recvCallback)
@@ -569,7 +579,7 @@ static int pisnd_spi_init(struct device
}
/* Flash the LEDs. */
- spi_transfer16(0xf000);
+ spi_transfer16(0xf008);
ret = pisnd_spi_gpio_irq_init(dev);
if (ret < 0) {
@@ -610,6 +620,14 @@ static void pisnd_spi_uninit(void)
pisnd_spi_gpio_uninit();
}
+static void pisnd_spi_flash_leds(uint8_t duration)
+{
+ g_ledFlashDuration = duration;
wiphy *wiphy; - struct scb pri_scb; -+ -+ struct sk_buff *beacon; -+ u16 beacon_tim_offset; -+ u16 beacon_dtim_period; - }; - - /* antsel module specific state */ -@@ -630,7 +636,6 @@ extern u16 brcms_c_compute_rtscts_dur(st - extern void brcms_c_inval_dma_pkts(struct brcms_hardware *hw, - struct ieee80211_sta *sta, - void (*dma_callback_fn)); --extern void brcms_c_update_beacon(struct brcms_c_info *wlc); - extern void brcms_c_update_probe_resp(struct brcms_c_info *wlc, bool suspend); - extern int brcms_c_set_nmode(struct brcms_c_info *wlc); - extern void brcms_c_beacon_phytxctl_txant_upd(struct brcms_c_info *wlc, ---- a/drivers/net/wireless/brcm80211/brcmsmac/pub.h -+++ b/drivers/net/wireless/brcm80211/brcmsmac/pub.h -@@ -332,5 +332,9 @@ extern bool brcms_c_check_radio_disabled - extern void brcms_c_mute(struct brcms_c_info *wlc, bool on); - extern bool brcms_c_tx_flush_completed(struct brcms_c_info *wlc); - extern void brcms_c_start_station(struct brcms_c_info *wlc, u8 *addr); -+extern void brcms_c_update_beacon(struct brcms_c_info *wlc); -+extern void brcms_c_set_new_beacon(struct brcms_c_info *wlc, -+ struct sk_buff *beacon, u16 tim_offset, -+ u16 dtim_period); - - #endif /* _BRCM_PUB_H_ */ |