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

Commit 6c8dd163 authored by Myles Watson's avatar Myles Watson
Browse files

bt_target.h: Remove unused PORT_FC_DEFAULT

Bug: 327390105
Test: mma -j32
Flag: EXEMPT, build-only change
Change-Id: I6f3dcbf69472c44984b4cb0bdd68bd9c8ddd8653
parent 16bbcf44
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -577,11 +577,6 @@
#define PORT_TX_BUF_CRITICAL_WM 15
#endif

/* The RFCOMM multiplexer preferred flow control mechanism. */
#ifndef PORT_FC_DEFAULT
#define PORT_FC_DEFAULT PORT_FC_CREDIT
#endif

/******************************************************************************
 *
 * BNEP
+2 −12
Original line number Diff line number Diff line
@@ -320,8 +320,7 @@ void PORT_ParNegInd(tRFC_MCB* p_mcb, uint8_t dlci, uint16_t mtu, uint8_t cl,
   */
  /* already defined for this mux, we respond with that value. */
  if (p_mcb->flow == PORT_FC_UNDEFINED) {
    if ((PORT_FC_DEFAULT == PORT_FC_TS710) ||
        (cl == RFCOMM_PN_CONV_LAYER_TYPE_1)) {
    if (cl == RFCOMM_PN_CONV_LAYER_TYPE_1) {
      p_mcb->flow = PORT_FC_TS710;
    } else {
      p_mcb->flow = PORT_FC_CREDIT;
@@ -380,16 +379,7 @@ void PORT_ParNegCnf(tRFC_MCB* p_mcb, uint8_t dlci, uint16_t mtu, uint8_t cl,

  /* Flow control mechanism not set yet.  Negotiate flow control mechanism. */
  if (p_mcb->flow == PORT_FC_UNDEFINED) {
    /* Our stack is configured for TS07.10 and they responded with credit-based.
     */
    /* This is illegal-- negotiation fails. */
    if ((PORT_FC_DEFAULT == PORT_FC_TS710) &&
        (cl == RFCOMM_PN_CONV_LAYER_CBFC_R)) {
      log::warn("negotiation fails, index={}", p_port->handle);
      rfc_send_disc(p_mcb, p_port->dlci);
      rfc_port_closed(p_port);
      return;
    } else if (cl == RFCOMM_PN_CONV_LAYER_CBFC_R) {
    if (cl == RFCOMM_PN_CONV_LAYER_CBFC_R) {
      // Our stack is configured for credit-based and they responded with
      // credit-based.
      p_mcb->flow = PORT_FC_CREDIT;
+4 −4
Original line number Diff line number Diff line
@@ -147,10 +147,10 @@ void RFCOMM_ParameterNegotiationRequest(tRFC_MCB* p_mcb, uint8_t dlci,
    return;
  }

  /* Negotiate the flow control mechanism.  If flow control mechanism for */
  /* mux has not been set yet, use our default value.  If it has been set, */
  /* use that value. */
  flow = (p_mcb->flow == PORT_FC_UNDEFINED) ? PORT_FC_DEFAULT : p_mcb->flow;
  /* Negotiate the flow control mechanism.  If flow control mechanism for the
   * mux has not been set yet, use credits.  If it has been set, use that value.
   */
  flow = (p_mcb->flow == PORT_FC_UNDEFINED) ? PORT_FC_CREDIT : p_mcb->flow;

  /* Set convergence layer and number of credits (k) */
  if (flow == PORT_FC_CREDIT) {