Skip to contentSkip to conversation

stb0899: set FE_HAS_SIGNAL flag in read_status

PATCH In review Andreas Regel 2 participants 2 messages Feb 28, 2012 – Feb 29, 2012 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 stb0899: set FE_HAS_SIGNAL flag in read_status

In stb0899_read_status the FE_HAS_SIGNAL flag was not set in case of a successful carrier lock. This change fixes that.

---
 drivers/media/dvb/frontends/stb0899_drv.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/media/dvb/frontends/stb0899_drv.c +0 -0
index 38565be..4a58afc 100644
@@ -1071,7 +1071,7 @@ static int stb0899_read_status(struct dvb_frontend *fe, enum fe_status *status)
 			reg  = stb0899_read_reg(state, STB0899_VSTATUS);
 			if (STB0899_GETFIELD(VSTATUS_LOCKEDVIT, reg)) {
 				dprintk(state->verbose, FE_DEBUG, 1, "--------> FE_HAS_CARRIER | 

FE_HAS_LOCK");
- *status |= FE_HAS_CARRIER | FE_HAS_LOCK;
+ *status |= FE_HAS_SIGNAL | FE_HAS_CARRIER | FE_HAS_LOCK;
reg = stb0899_read_reg(state, STB0899_PLPARM);
if (STB0899_GETFIELD(VITCURPUN, reg)) {
@@ -1088,7 +1088,7 @@ static int stb0899_read_status(struct dvb_frontend *fe, enum fe_status *status)
if (internal->lock) {
reg = STB0899_READ_S2REG(STB0899_S2DEMOD, DMD_STAT2);
if (STB0899_GETFIELD(UWP_LOCK, reg) && STB0899_GETFIELD(CSM_LOCK,
reg)) {
- *status |= FE_HAS_CARRIER;
+ *status |= FE_HAS_SIGNAL | FE_HAS_CARRIER;
dprintk(state->verbose, FE_DEBUG, 1,
"UWP & CSM Lock ! ---> DVB-S2 FE_HAS_CARRIER");
-- 1.7.2.5

Acked-by on v1 1/2
#1 lore raw
Quoted 21 lines · Andreas Regel

In stb0899_read_status the FE_HAS_SIGNAL flag was not set in case of a successful carrier lock. This change fixes that.

---
 drivers/media/dvb/frontends/stb0899_drv.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/media/dvb/frontends/stb0899_drv.c +1 -1
index 38565be..4a58afc 100644
@@ -1071,7 +1071,7 @@ static int stb0899_read_status(struct dvb_frontend *fe, enum fe_status *status)
             reg  = stb0899_read_reg(state, STB0899_VSTATUS);
             if (STB0899_GETFIELD(VSTATUS_LOCKEDVIT, reg)) {
                 dprintk(state->verbose, FE_DEBUG, 1, "--------> FE_HAS_CARRIER | FE_HAS_LOCK");
-                *status |= FE_HAS_CARRIER | FE_HAS_LOCK;
+                *status |= FE_HAS_SIGNAL | FE_HAS_CARRIER | FE_HAS_LOCK;
                  reg = stb0899_read_reg(state, STB0899_PLPARM);
                 if (STB0899_GETFIELD(VITCURPUN, reg)) {

drivers/media/dvb/frontends/stb0899_drv.c static int stb0899_read_status(struct dvb_frontend *fe, enum fe_status *status) · line 1093

Quoted 7 lines
drivers/media/dvb/frontends/stb0899_drv.c +1 -1
@@ -1088,7 +1088,7 @@ static int stb0899_read_status(struct dvb_frontend *fe, enum fe_status *status)
         if (internal->lock) {
             reg = STB0899_READ_S2REG(STB0899_S2DEMOD, DMD_STAT2);
             if (STB0899_GETFIELD(UWP_LOCK, reg) && STB0899_GETFIELD(CSM_LOCK, reg)) {
-                *status |= FE_HAS_CARRIER;
+                *status |= FE_HAS_SIGNAL | FE_HAS_CARRIER;
                 dprintk(state->verbose, FE_DEBUG, 1,
                     "UWP & CSM Lock ! ---> DVB-S2 FE_HAS_CARRIER");