Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f48ecb19 authored by John W. Linville's avatar John W. Linville
Browse files

Merge branch 'for-upstream' of...

Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next



Johan Hedberg <johan.hedberg@gmail.com> says:

"Here's another bluetooth-next pull request for 3.19. We've got:

 - Various fixes, cleanups and improvements to ieee802154/mac802154
 - Support for a Broadcom BCM20702A1 variant
 - Lots of lockdep fixes
 - Fixed handling of LE CoC errors that should trigger SMP"

Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parents 47b6308b a86c02ea
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -4699,6 +4699,7 @@ F: net/mac802154/
F:	drivers/net/ieee802154/
F:	include/linux/nl802154.h
F:	include/linux/ieee802154.h
F:	include/net/nl802154.h
F:	include/net/mac802154.h
F:	include/net/af_ieee802154.h
F:	include/net/cfg802154.h
+2 −0
Original line number Diff line number Diff line
@@ -106,6 +106,8 @@ static const struct usb_device_id btusb_table[] = {
	{ USB_DEVICE(0x0b05, 0x17b5) },
	{ USB_DEVICE(0x0b05, 0x17cb) },
	{ USB_DEVICE(0x413c, 0x8197) },
	{ USB_DEVICE(0x13d3, 0x3404),
	  .driver_info = BTUSB_BCM_PATCHRAM },

	/* Foxconn - Hon Hai */
	{ USB_VENDOR_AND_INTERFACE_INFO(0x0489, 0xff, 0x01, 0x01) },
+1 −1
Original line number Diff line number Diff line
@@ -74,7 +74,7 @@ static int ath_wakeup_ar3k(struct tty_struct *tty)

	status = tty->driver->ops->tiocmget(tty);

	/* Disable Automatic RTSCTS */
	/* Enable Automatic RTSCTS */
	ktermios.c_cflag |= CRTSCTS;
	status = tty_set_termios(tty, &ktermios);

+38 −42
Original line number Diff line number Diff line
@@ -46,10 +46,6 @@ struct at86rf2xx_chip_data {
	u16 t_off_to_tx_on;
	u16 t_frame;
	u16 t_p_ack;
	/* short interframe spacing time */
	u16 t_sifs;
	/* long interframe spacing time */
	u16 t_lifs;
	/* completion timeout for tx in msecs */
	u16 t_tx_timeout;
	int rssi_base_val;
@@ -719,19 +715,10 @@ at86rf230_tx_complete(void *context)

	enable_irq(lp->spi->irq);

	if (lp->max_frame_retries <= 0) {
		/* Interfame spacing time, which is phy depend.
		 * TODO
		 * Move this handling in MAC 802.15.4 layer.
		 * This is currently a workaround to avoid fragmenation issues.
		 */
		if (skb->len > 18)
			udelay(lp->data->t_lifs);
	if (lp->max_frame_retries <= 0)
		ieee802154_xmit_complete(lp->hw, skb, true);
	else
			udelay(lp->data->t_sifs);
	}

	ieee802154_xmit_complete(lp->hw, skb);
		ieee802154_xmit_complete(lp->hw, skb, false);
}

static void
@@ -1038,6 +1025,36 @@ at86rf212_set_channel(struct at86rf230_local *lp, u8 page, u8 channel)
	if (rc < 0)
		return rc;

	/* This sets the symbol_duration according frequency on the 212.
	 * TODO move this handling while set channel and page in cfg802154.
	 * We can do that, this timings are according 802.15.4 standard.
	 * If we do that in cfg802154, this is a more generic calculation.
	 *
	 * This should also protected from ifs_timer. Means cancel timer and
	 * init with a new value. For now, this is okay.
	 */
	if (channel == 0) {
		if (page == 0) {
			/* SUB:0 and BPSK:0 -> BPSK-20 */
			lp->hw->phy->symbol_duration = 50;
		} else {
			/* SUB:1 and BPSK:0 -> BPSK-40 */
			lp->hw->phy->symbol_duration = 25;
		}
	} else {
		if (page == 0)
			/* SUB:0 and BPSK:1 -> OQPSK-100/200/400 */
			lp->hw->phy->symbol_duration = 40;
		else
			/* SUB:1 and BPSK:1 -> OQPSK-250/500/1000 */
			lp->hw->phy->symbol_duration = 16;
	}

	lp->hw->phy->lifs_period = IEEE802154_LIFS_PERIOD *
				   lp->hw->phy->symbol_duration;
	lp->hw->phy->sifs_period = IEEE802154_SIFS_PERIOD *
				   lp->hw->phy->symbol_duration;

	return at86rf230_write_subreg(lp, SR_CHANNEL, channel);
}

@@ -1047,23 +1064,11 @@ at86rf230_channel(struct ieee802154_hw *hw, u8 page, u8 channel)
	struct at86rf230_local *lp = hw->priv;
	int rc;

	if (page > 31 ||
	    !(lp->hw->phy->channels_supported[page] & BIT(channel))) {
		WARN_ON(1);
		return -EINVAL;
	}

	rc = lp->data->set_channel(lp, page, channel);
	if (rc < 0)
		return rc;

	/* Wait for PLL */
	usleep_range(lp->data->t_channel_switch,
		     lp->data->t_channel_switch + 10);
	hw->phy->current_channel = channel;
	hw->phy->current_page = page;

	return 0;
	return rc;
}

static int
@@ -1179,9 +1184,6 @@ at86rf230_set_csma_params(struct ieee802154_hw *hw, u8 min_be, u8 max_be,
	struct at86rf230_local *lp = hw->priv;
	int rc;

	if (min_be > max_be || max_be > 8 || retries > 5)
		return -EINVAL;

	rc = at86rf230_write_subreg(lp, SR_MIN_BE, min_be);
	if (rc)
		return rc;
@@ -1199,9 +1201,6 @@ at86rf230_set_frame_retries(struct ieee802154_hw *hw, s8 retries)
	struct at86rf230_local *lp = hw->priv;
	int rc = 0;

	if (retries < -1 || retries > 15)
		return -EINVAL;

	lp->tx_aret = retries >= 0;
	lp->max_frame_retries = retries;

@@ -1263,8 +1262,6 @@ static struct at86rf2xx_chip_data at86rf233_data = {
	.t_off_to_tx_on = 80,
	.t_frame = 4096,
	.t_p_ack = 545,
	.t_sifs = 192,
	.t_lifs = 640,
	.t_tx_timeout = 2000,
	.rssi_base_val = -91,
	.set_channel = at86rf23x_set_channel,
@@ -1279,8 +1276,6 @@ static struct at86rf2xx_chip_data at86rf231_data = {
	.t_off_to_tx_on = 110,
	.t_frame = 4096,
	.t_p_ack = 545,
	.t_sifs = 192,
	.t_lifs = 640,
	.t_tx_timeout = 2000,
	.rssi_base_val = -91,
	.set_channel = at86rf23x_set_channel,
@@ -1295,8 +1290,6 @@ static struct at86rf2xx_chip_data at86rf212_data = {
	.t_off_to_tx_on = 200,
	.t_frame = 4096,
	.t_p_ack = 545,
	.t_sifs = 192,
	.t_lifs = 640,
	.t_tx_timeout = 2000,
	.rssi_base_val = -100,
	.set_channel = at86rf212_set_channel,
@@ -1432,6 +1425,7 @@ at86rf230_detect_device(struct at86rf230_local *lp)
		lp->data = &at86rf231_data;
		lp->hw->phy->channels_supported[0] = 0x7FFF800;
		lp->hw->phy->current_channel = 11;
		lp->hw->phy->symbol_duration = 16;
		break;
	case 7:
		chip = "at86rf212";
@@ -1441,6 +1435,7 @@ at86rf230_detect_device(struct at86rf230_local *lp)
			lp->hw->phy->channels_supported[0] = 0x00007FF;
			lp->hw->phy->channels_supported[2] = 0x00007FF;
			lp->hw->phy->current_channel = 5;
			lp->hw->phy->symbol_duration = 25;
		} else {
			rc = -ENOTSUPP;
		}
@@ -1450,6 +1445,7 @@ at86rf230_detect_device(struct at86rf230_local *lp)
		lp->data = &at86rf233_data;
		lp->hw->phy->channels_supported[0] = 0x7FFF800;
		lp->hw->phy->current_channel = 13;
		lp->hw->phy->symbol_duration = 16;
		break;
	default:
		chip = "unkown";
+0 −3
Original line number Diff line number Diff line
@@ -58,9 +58,6 @@ fakelb_hw_channel(struct ieee802154_hw *hw, u8 page, u8 channel)
{
	pr_debug("set channel to %d\n", channel);

	hw->phy->current_page = page;
	hw->phy->current_channel = channel;

	return 0;
}

Loading